From 8dd72e4540ad5c616b3b21737dea96c995f0f134 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 28 Apr 2023 14:45:07 +0200 Subject: [PATCH] Debug v18 --- htdocs/accountancy/bookkeeping/export.php | 18 ++++++++---------- htdocs/core/class/conf.class.php | 5 ----- htdocs/langs/en_US/accountancy.lang | 2 +- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/export.php b/htdocs/accountancy/bookkeeping/export.php index 91efdf29aec..591068e5e67 100644 --- a/htdocs/accountancy/bookkeeping/export.php +++ b/htdocs/accountancy/bookkeeping/export.php @@ -464,7 +464,7 @@ if (empty($reshook)) { } if (!$error) { - if ($conf->global->ACCOUNTING_REEXPORT == 1) { + if (empty($conf->global->ACCOUNTING_REEXPORT)) { setEventMessages($langs->trans("ExportOfPiecesAlreadyExportedIsDisable"), null, 'mesgs'); } else { setEventMessages($langs->trans("ExportOfPiecesAlreadyExportedIsEnable"), null, 'warnings'); @@ -562,7 +562,7 @@ if (count($filter) > 0) { } } $sql .= ' WHERE t.entity IN ('.getEntity('accountancy').')'; -if (!empty($conf->global->ACCOUNTING_REEXPORT)) { +if (empty($conf->global->ACCOUNTING_REEXPORT)) { // Reexport not enabled (default mode) $sql .= " AND t.date_export IS NULL"; } if (count($sqlwhere) > 0) { @@ -574,7 +574,7 @@ if (count($sqlwhere) > 0) { // Export into a file with format defined into setup (FEC, CSV, ...) // Must be after definition of $sql if ($action == 'export_fileconfirm' && $user->hasRight('accounting', 'mouvements', 'export')) { - // TODO Replace the fetchAll to get all ->line followed by call to ->export(). It currently consumes too much memory on large export. + // TODO Replace the fetchAll to get all ->line followed by call to ->export(). fetchAll() currently consumes too much memory on large export. // Replace this with the query($sql) and loop on each line to export them. $result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter, 'AND', (empty($conf->global->ACCOUNTING_REEXPORT) ? 0 : 1)); @@ -815,15 +815,14 @@ if ($reshook < 0) { } $newcardbutton = empty($hookmanager->resPrint) ? '' : $hookmanager->resPrint; - if (empty($reshook)) { // Button re-export - if (!empty($conf->global->ACCOUNTING_REEXPORT)) { - $newcardbutton .= ''.img_picto($langs->trans("ClickToShowAlreadyExportedLines"), 'switch_off', 'class="small size15x valignmiddle"'); + if (empty($conf->global->ACCOUNTING_REEXPORT)) { + $newcardbutton .= ''.img_picto($langs->trans("ClickToShowAlreadyExportedLines"), 'switch_off', 'class="small size15x valignmiddle"'); $newcardbutton .= ''.$langs->trans("ClickToShowAlreadyExportedLines").''; $newcardbutton .= ''; } else { - $newcardbutton .= ''.img_picto($langs->trans("DocsAlreadyExportedAreIncluded"), 'switch_on', 'class="warning size15x valignmiddle"'); + $newcardbutton .= ''.img_picto($langs->trans("DocsAlreadyExportedAreIncluded"), 'switch_on', 'class="warning size15x valignmiddle"'); $newcardbutton .= ''.$langs->trans("DocsAlreadyExportedAreIncluded").''; $newcardbutton .= ''; } @@ -837,9 +836,8 @@ print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, // Not display message when all the list of docs are included if (empty($conf->global->ACCOUNTING_REEXPORT)) { - print info_admin($langs->trans("WarningDataDisappearsWhenDataIsExported"), 0, 0, 0); + print info_admin($langs->trans("WarningDataDisappearsWhenDataIsExported"), 0, 0, 0, 'hideonsmartphone info'); } -print '
'; //$topicmail = "Information"; //$modelmail = "accountingbookkeeping"; @@ -961,7 +959,7 @@ if (!empty($arrayfields['t.credit']['checked'])) { if (!empty($arrayfields['t.lettering_code']['checked'])) { print ''; print ''; - print '
'.$langs->trans("NotReconciled").''; + print '
'; print ''; } diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 7b00ade88e6..0d3273dff2c 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -812,11 +812,6 @@ class Conf $this->global->USE_STRICT_CSV_RULES = 2; } - // By default, option is on. Once set by user, this code is useless - if (!isset($this->global->ACCOUNTING_REEXPORT)) { - $this->global->ACCOUNTING_REEXPORT = 1; - } - // Use a SCA ready workflow with Stripe module (STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION by default if nothing defined) if (!isset($this->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION) && empty($this->global->STRIPE_USE_NEW_CHECKOUT)) { $this->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION = 1; diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index 23bf1558abd..3078c9e90da 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -53,7 +53,7 @@ ExportAccountingSourceDocHelp=With this tool, you can search and export the sour ExportAccountingSourceDocHelp2=To export your journals, use the menu entry %s - %s. ExportAccountingProjectHelp=Specify a project if you need an accounting report only for a specific project. Expense reports and loan payments are not included in project reports. ExportAccountancy=Export accountancy -WarningDataDisappearsWhenDataIsExported=Warning, this list contains only the accounting entries that have not been exported. If you want to display the accounting entries already exported to re-export them, click on the button above. +WarningDataDisappearsWhenDataIsExported=Warning, this list contains only the accounting entries that have not been already exported (Export date is empty). If you want to include the accounting entries already exported to re-export them, click on the button above. VueByAccountAccounting=View by accounting account VueBySubAccountAccounting=View by accounting subaccount