Merge pull request #9931 from aspangaro/9.0_accountancy
Fix Specific finename for FEC export only available on general ledger export
This commit is contained in:
commit
58b7201529
@ -151,6 +151,7 @@ if ($action == 'export_csv')
|
|||||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||||
|
|
||||||
$filename = 'balance';
|
$filename = 'balance';
|
||||||
|
$type_export = 'balance';
|
||||||
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
||||||
|
|
||||||
$result = $object->fetchAllBalance($sortorder, $sortfield, 0, 0, $filter);
|
$result = $object->fetchAllBalance($sortorder, $sortfield, 0, 0, $filter);
|
||||||
|
|||||||
@ -218,6 +218,7 @@ class AccountancyExport
|
|||||||
|
|
||||||
// Define name of file to save
|
// Define name of file to save
|
||||||
$filename = 'general_ledger-'.$this->getFormatCode($conf->global->ACCOUNTING_EXPORT_MODELCSV);
|
$filename = 'general_ledger-'.$this->getFormatCode($conf->global->ACCOUNTING_EXPORT_MODELCSV);
|
||||||
|
$type_export = 'general_ledger';
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
||||||
|
|
||||||
|
|||||||
@ -750,6 +750,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||||
|
|
||||||
$filename = 'journal';
|
$filename = 'journal';
|
||||||
|
$type_export = 'journal';
|
||||||
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
||||||
|
|
||||||
// CSV header line
|
// CSV header line
|
||||||
|
|||||||
@ -429,6 +429,7 @@ $userstatic = new User($db);
|
|||||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||||
|
|
||||||
$filename = 'journal';
|
$filename = 'journal';
|
||||||
|
$type_export = 'journal';
|
||||||
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
||||||
|
|
||||||
// Model Cegid Expert Export
|
// Model Cegid Expert Export
|
||||||
|
|||||||
@ -586,6 +586,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||||
|
|
||||||
$filename = 'journal';
|
$filename = 'journal';
|
||||||
|
$type_export = 'journal';
|
||||||
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
||||||
|
|
||||||
$companystatic = new Fournisseur($db);
|
$companystatic = new Fournisseur($db);
|
||||||
|
|||||||
@ -547,6 +547,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||||
|
|
||||||
$filename = 'journal';
|
$filename = 'journal';
|
||||||
|
$type_export = 'journal';
|
||||||
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
||||||
|
|
||||||
$companystatic = new Client($db);
|
$companystatic = new Client($db);
|
||||||
|
|||||||
@ -35,9 +35,8 @@ $endaccountingperiod = dol_print_date(dol_now(), '%Y%m%d');
|
|||||||
header('Content-Type: text/csv');
|
header('Content-Type: text/csv');
|
||||||
|
|
||||||
|
|
||||||
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == "11") // Specific filename for FEC model export
|
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == "11" && $type_export == "general_ledger") // Specific filename for FEC model export into the general ledger
|
||||||
{
|
{
|
||||||
|
|
||||||
// FEC format is defined here: https://www.legifrance.gouv.fr/affichCodeArticle.do?idArticle=LEGIARTI000027804775&cidTexte=LEGITEXT000006069583&dateTexte=20130802&oldAction=rechCodeArticle
|
// FEC format is defined here: https://www.legifrance.gouv.fr/affichCodeArticle.do?idArticle=LEGIARTI000027804775&cidTexte=LEGITEXT000006069583&dateTexte=20130802&oldAction=rechCodeArticle
|
||||||
if (empty($search_date_end))
|
if (empty($search_date_end))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user