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 '