From 5a8a0fb79a1bcb719c26a05c82a6c5ac032cfcca Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Tue, 4 Oct 2016 21:33:47 +0200 Subject: [PATCH] Debug --- htdocs/accountancy/customer/list.php | 16 ++++++++++------ htdocs/accountancy/journal/bankjournal.php | 3 ++- htdocs/accountancy/journal/purchasesjournal.php | 3 ++- htdocs/accountancy/journal/sellsjournal.php | 3 ++- htdocs/accountancy/supplier/list.php | 15 +++++++++------ htdocs/langs/en_US/accountancy.lang | 1 + 6 files changed, 26 insertions(+), 15 deletions(-) diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 7d2326b05e5..358c2268e60 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -132,9 +132,10 @@ print '<script type="text/javascript"> * Action */ if ($action == 'ventil' && ! empty($btn_ventil)) { - print '<div><font color="red">' . $langs->trans("Processing") . '...</font></div>'; + $msg=''; + //print '<div><font color="red">' . $langs->trans("Processing") . '...</font></div>'; if (! empty($codeventil) && ! empty($mesCasesCochees)) { - print '<div><font color="red">' . count($mesCasesCochees) . ' ' . $langs->trans("SelectedLines") . '</font></div>'; + $msg = '<div><font color="red">' . count($mesCasesCochees) . ' ' . $langs->trans("SelectedLines") . '</font></div>'; $mesCodesVentilChoisis = $codeventil; $cpt = 0; @@ -153,17 +154,17 @@ if ($action == 'ventil' && ! empty($btn_ventil)) { dol_syslog("/accountancy/customer/list.php sql=" . $sql, LOG_DEBUG); if ($db->query($sql)) { - print '<div><font color="green">' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' - ' . $langs->trans("VentilatedinAccount") . ' : ' . length_accountg($accountventilated->account_number) . '</font></div>'; + $msg.= '<div><font color="green">' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' - ' . $langs->trans("VentilatedinAccount") . ' : ' . length_accountg($accountventilated->account_number) . '</font></div>'; } else { - print '<div><font color="red">' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' - ' . $langs->trans("NotVentilatedinAccount") . ' : ' . length_accountg($accountventilated->account_number) . '<br/> <pre>' . $sql . '</pre></font></div>'; + $msg.= '<div><font color="red">' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' - ' . $langs->trans("NotVentilatedinAccount") . ' : ' . length_accountg($accountventilated->account_number) . '<br/> <pre>' . $sql . '</pre></font></div>'; } $cpt ++; } } else { - print '<div><font color="red">' . $langs->trans("AnyLineVentilate") . '</font></div>'; + $msg. '<div><font color="red">' . $langs->trans("AnyLineVentilate") . '</font></div>'; } - print '<div><font color="red">' . $langs->trans("EndProcessing") . '</font></div>'; + $msg.= '<div><font color="red">' . $langs->trans("EndProcessing") . '</font></div>'; } /* @@ -230,8 +231,11 @@ if ($result) { $i = 0; print_barre_liste($langs->trans("InvoiceLines"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num_lines); + print '<br><b>' . $langs->trans("DescVentilTodoCustomer") . '</b></br>'; + if ($msg) print $msg.'<br>'; + print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">' . "\n"; print '<input type="hidden" name="action" value="ventil">'; diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index a0c06c1e0ce..dbc3dc325a9 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -641,7 +641,8 @@ else { $nom = $langs->trans("FinanceJournal") . ' - ' . $bank_code_journal->getNomUrl(1); $builddate = time(); - $description = $langs->trans("DescFinanceJournal") . '<br>'; + //$description = $langs->trans("DescFinanceJournal") . '<br>'; + $description.= $langs->trans("DescJournalOnlyBindedVisible").'<br>'; $period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); $varlink = 'id_account=' . $id_bank_account; diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 6f73dce7e6f..ac4055822eb 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -440,7 +440,8 @@ if ($action == 'export_csv') { $periodlink = ''; $exportlink = ''; $builddate = time(); - $description = $langs->trans("DescPurchasesJournal") . '<br>'; + //$description = $langs->trans("DescPurchasesJournal") . '<br>'; + $description.= $langs->trans("DescJournalOnlyBindedVisible").'<br>'; if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { $description .= $langs->trans("DepositsAreNotIncluded"); } else { diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 29ec8d50db1..1d6cbb87494 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -459,7 +459,8 @@ if ($action == 'export_csv') { $periodlink = ''; $exportlink = ''; $builddate = time(); - $description = $langs->trans("DescSellsJournal") . '<br>'; + //$description = $langs->trans("DescSellsJournal") . '<br>'; + $description.= $langs->trans("DescJournalOnlyBindedVisible").'<br>'; if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description .= $langs->trans("DepositsAreNotIncluded"); else diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index c98ba050222..e48f0141318 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -135,9 +135,10 @@ print '<script type="text/javascript"> * Action */ if ($action == 'ventil' && ! empty($btn_ventil)) { - print '<div><font color="red">' . $langs->trans("Processing") . '...</font></div>'; + $msg=''; + //print '<div><font color="red">' . $langs->trans("Processing") . '...</font></div>'; if ($_POST['codeventil'] && $_POST["mesCasesCochees"]) { - print '<div><font color="red">' . count($_POST["mesCasesCochees"]) . ' ' . $langs->trans("SelectedLines") . '</font></div>'; + $msg = '<div><font color="red">' . count($_POST["mesCasesCochees"]) . ' ' . $langs->trans("SelectedLines") . '</font></div>'; $mesCodesVentilChoisis = $codeventil; $cpt = 0; @@ -157,17 +158,17 @@ if ($action == 'ventil' && ! empty($btn_ventil)) { dol_syslog('accountancy/supplier/list.php:: sql=' . $sql, LOG_DEBUG); if ($db->query($sql)) { - print '<div><font color="green">' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' - ' . $langs->trans("VentilatedinAccount") . ' : ' . length_accountg($accountventilated->account_number) . '</font></div>'; + $msg.= '<div><font color="green">' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' - ' . $langs->trans("VentilatedinAccount") . ' : ' . length_accountg($accountventilated->account_number) . '</font></div>'; } else { - print '<div><font color="red">' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' - ' . $langs->trans("NotVentilatedinAccount") . ' : ' . length_accountg($accountventilated->account_number) . '<br/> <pre>' . $sql . '</pre></font></div>'; + $msg.= '<div><font color="red">' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' - ' . $langs->trans("NotVentilatedinAccount") . ' : ' . length_accountg($accountventilated->account_number) . '<br/> <pre>' . $sql . '</pre></font></div>'; } $cpt ++; } } else { - print '<div><font color="red">' . $langs->trans("AnyLineVentilate") . '</font></div>'; + $msg.= '<div><font color="red">' . $langs->trans("AnyLineVentilate") . '</font></div>'; } - print '<div><font color="red">' . $langs->trans("EndProcessing") . '</font></div>'; + $msg.= '<div><font color="red">' . $langs->trans("EndProcessing") . '</font></div>'; } /* @@ -233,6 +234,8 @@ if ($result) { // TODO : print_barre_liste always use $conf->liste_limit and do not care about custom limit in list... print_barre_liste($langs->trans("InvoiceLines"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num_lines); + if ($msg) print $msg.'<br>'; + print '<br><b>' . $langs->trans("DescVentilTodoCustomer") . '</b></br>'; print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">' . "\n"; diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index fa6cac31601..16c49c352d1 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -100,6 +100,7 @@ DescSellsJournal=Sales journal DescPurchasesJournal=Purchases journal FinanceJournal=Finance journal DescFinanceJournal=Finance journal including all the types of payments by bank account +DescJournalOnlyBindedVisible=This is a view of records that are binded to accountancy account and can be breakdowned into the General Ledger. CustomerInvoicePayment=Payment of invoice customer -- GitLab