Debug v17 Fix #24054

This commit is contained in:
Laurent Destailleur 2023-02-27 03:34:49 +01:00
parent 87454607af
commit 6734f7a6aa
5 changed files with 34 additions and 19 deletions

View File

@ -694,7 +694,7 @@ if (!empty($sortfield)) {
// 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 consumes too much memory on large export.
// TODO Replace the fetchAll to get all ->line followed by call to ->export(). It 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));
@ -817,6 +817,15 @@ $formconfirm = '';
if ($action == 'export_file') {
$form_question = array();
$form_question['notexportlettering'] = array(
'name' => 'notexportlettering',
'type' => 'other',
'label' => '', // TODO Use Selectmodelcsv and show a select combo
'value' => $langs->trans('Modelcsv').' : <b>'.$listofformat[$formatexportset].'</b>'
);
$form_question['separator0'] = array('name'=>'separator0', 'type'=>'separator');
if (getDolGlobalInt("ACCOUNTING_ENABLE_LETTERING")) {
// If 1, we check by default.
$checked = !empty($conf->global->ACCOUNTING_DEFAULT_NOT_EXPORT_LETTERING) ? 'true' : 'false';
@ -827,7 +836,7 @@ if ($action == 'export_file') {
'value' => $checked,
);
$form_question['separator'] = array('name'=>'separator', 'type'=>'separator');
$form_question['separator1'] = array('name'=>'separator1', 'type'=>'separator');
}
// If 1 or not set, we check by default.
@ -854,7 +863,7 @@ if ($action == 'export_file') {
$form_question['separator3'] = array('name'=>'separator3', 'type'=>'separator');
}
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?'.$param, $langs->trans("ExportFilteredList").' ('.$listofformat[$formatexportset].')', $langs->trans('ConfirmExportFile'), 'export_fileconfirm', $form_question, '', 1, 350, 600);
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?'.$param, $langs->trans("ExportFilteredList").'...', $langs->trans('ConfirmExportFile'), 'export_fileconfirm', $form_question, '', 1, 350, 600);
}
//if ($action == 'delbookkeepingyear') {
@ -1303,7 +1312,7 @@ while ($i < min($num, $limit)) {
$accountingjournal = new AccountingJournal($db);
$result = $accountingjournal->fetch('', $line->code_journal);
$journaltoshow = (($result > 0) ? $accountingjournal->getNomUrl(0, 0, 0, '', 0) : $line->code_journal);
print '<td class="center">'.$journaltoshow.'</td>';
print '<td class="center tdoverflowmax150">'.$journaltoshow.'</td>';
if (!$i) {
$totalarray['nbfield']++;
}

View File

@ -1016,7 +1016,9 @@ class AccountancyExport
print $line->code_journal . $separator;
// FEC:JournalLib
print dol_string_unaccent($langs->transnoentities($line->journal_label)) . $separator;
$labeljournal = dol_string_unaccent($langs->transnoentities($line->journal_label));
$labeljournal = dol_string_nospecial($labeljournal, ' ');
print $labeljournal . $separator;
// FEC:EcritureNum
print $line->piece_num . $separator;
@ -1147,7 +1149,9 @@ class AccountancyExport
print $line->code_journal . $separator;
// FEC:JournalLib
print dol_string_unaccent($langs->transnoentities($line->journal_label)) . $separator;
$labeljournal = dol_string_unaccent($langs->transnoentities($line->journal_label));
$labeljournal = dol_string_nospecial($labeljournal, ' ');
print $labeljournal . $separator;
// FEC:EcritureNum
print $line->piece_num . $separator;

View File

@ -166,9 +166,9 @@ ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow
ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting.
ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER=On accountancy transfer, what is the period selected by default
ACCOUNTING_SELL_JOURNAL=Sales journal (sales and returns)
ACCOUNTING_PURCHASE_JOURNAL=Purchase journal (purchase and returns)
ACCOUNTING_BANK_JOURNAL=Cash journal (receipts and disbursements)
ACCOUNTING_SELL_JOURNAL=Sales journal - sales and returns
ACCOUNTING_PURCHASE_JOURNAL=Purchase journal - purchase and returns
ACCOUNTING_BANK_JOURNAL=Cash journal - receipts and disbursements
ACCOUNTING_EXPENSEREPORT_JOURNAL=Expense report journal
ACCOUNTING_MISCELLANEOUS_JOURNAL=General journal
ACCOUNTING_HAS_NEW_JOURNAL=Has new Journal
@ -236,6 +236,7 @@ ConfirmDeleteMvt=This will delete all lines in accountancy for the year/month an
ConfirmDeleteMvtPartial=This will delete the transaction from the accounting (all lines related to the same transaction will be deleted)
FinanceJournal=Finance journal
ExpenseReportsJournal=Expense reports journal
InventoryJournal=Inventory journal
DescFinanceJournal=Finance journal including all the types of payments by bank account
DescJournalOnlyBindedVisible=This is a view of record that are bound to an accounting account and can be recorded into the Journals and Ledger.
VATAccountNotDefined=Account for VAT not defined

View File

@ -1570,11 +1570,12 @@ table[summary="list_of_modules"] .fa-cog {
height: 100px;
}
.maxscreenheightless200 {
max-height: <?php echo isset($_SESSION['dol_screenheight']) ? max(500, $_SESSION['dol_screenheight'] - 200) : 700; ?>px; /* we guarantee height of 500 */
.ls -alrt
vi {
max-height: <?php echo isset($_SESSION['dol_screenheight']) ? max(500, (int) $_SESSION['dol_screenheight'] - 200) : 700; ?>px; /* we guarantee height of 500 */
}
.maxscreenheightless300 {
max-height: <?php echo isset($_SESSION['dol_screenheight']) ? max(400, $_SESSION['dol_screenheight'] - 300) : 700; ?>px; /* we guarantee height of 500 */
max-height: <?php echo isset($_SESSION['dol_screenheight']) ? max(400, (int) $_SESSION['dol_screenheight'] - 300) : 700; ?>px; /* we guarantee height of 500 */
}
@ -4527,13 +4528,13 @@ ul.noborder li:nth-child(even):not(.liste_titre) {
.thumbstat {
flex: 1 1 110px;
margin-bottom: 8px;
min-width: <?php echo isset($_SESSION['dol_screenwidth']) ?min(160, round($_SESSION['dol_screenwidth'] / 2 - 20)) : 150; ?>px; /* on screen < 320, we guaranty to have 2 columns */
min-width: <?php echo isset($_SESSION['dol_screenwidth']) ?min(160, round((int) $_SESSION['dol_screenwidth'] / 2 - 20)) : 150; ?>px; /* on screen < 320, we guaranty to have 2 columns */
}
.thumbstat150 {
flex: 1 1 110px;
margin-bottom: 8px;
min-width: <?php echo isset($_SESSION['dol_screenwidth']) ?min(160, round($_SESSION['dol_screenwidth'] / 2 - 20)) : 160; ?>px; /* on screen < 320, we guaranty to have 2 columns */
max-width: <?php echo isset($_SESSION['dol_screenwidth']) ?min(161, round($_SESSION['dol_screenwidth'] / 2 - 20)) : 161; ?>px; /* on screen < 320, we guaranty to have 2 columns */
min-width: <?php echo isset($_SESSION['dol_screenwidth']) ?min(160, round((int) $_SESSION['dol_screenwidth'] / 2 - 20)) : 160; ?>px; /* on screen < 320, we guaranty to have 2 columns */
max-width: <?php echo isset($_SESSION['dol_screenwidth']) ?min(161, round((int) $_SESSION['dol_screenwidth'] / 2 - 20)) : 161; ?>px; /* on screen < 320, we guaranty to have 2 columns */
/* width: ...px; If I use with, there is trouble on size of flex boxes solved with min + (max that is a little bit higer than min) */
}
.dashboardlineindicator {
@ -5862,7 +5863,7 @@ pre#editfilecontentaceeditorid {
/* ============================================================================== */
div.scroll2 {
width: <?php print isset($_SESSION['dol_screenwidth']) ?max($_SESSION['dol_screenwidth'] - 830, 450) : '450'; ?>px !important;
width: <?php print isset($_SESSION['dol_screenwidth']) ?max((int) $_SESSION['dol_screenwidth'] - 830, 450) : '450'; ?>px !important;
}
div#GanttChartDIVglisthead, div#GanttChartDIVgcharthead {

View File

@ -1789,10 +1789,10 @@ table[summary="list_of_modules"] .fa-cog {
}
.maxscreenheightless200 {
max-height: <?php echo isset($_SESSION['dol_screenheight']) ? max(500, $_SESSION['dol_screenheight'] - 200) : 700; ?>px; /* we guarantee height of 500 */
max-height: <?php echo isset($_SESSION['dol_screenheight']) ? max(500, (int) $_SESSION['dol_screenheight'] - 200) : 700; ?>px; /* we guarantee height of 500 */
}
.maxscreenheightless300 {
max-height: <?php echo isset($_SESSION['dol_screenheight']) ? max(400, $_SESSION['dol_screenheight'] - 300) : 700; ?>px; /* we guarantee height of 500 */
max-height: <?php echo isset($_SESSION['dol_screenheight']) ? max(400, (int) $_SESSION['dol_screenheight'] - 300) : 700; ?>px; /* we guarantee height of 500 */
}
tr.nobottom td {
@ -5845,7 +5845,7 @@ pre#editfilecontentaceeditorid {
/* ============================================================================== */
div.scroll2 {
width: <?php print isset($_SESSION['dol_screenwidth']) ?max($_SESSION['dol_screenwidth'] - 830, 450) : '450'; ?>px !important;
width: <?php print isset($_SESSION['dol_screenwidth']) ?max((int) $_SESSION['dol_screenwidth'] - 830, 450) : '450'; ?>px !important;
}
div#GanttChartDIVglisthead, div#GanttChartDIVgcharthead {