From 9db6c779f0fc251853e4e6e5274136200c811baf Mon Sep 17 00:00:00 2001 From: Yoan Mollard Date: Fri, 5 Aug 2022 04:16:23 +0200 Subject: [PATCH 1/5] Fix layout of Incomes-Expenses + Claims-Debts accounting tables --- htdocs/compta/resultat/clientfourn.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 30d4f4ce825..ab2a339cc40 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -249,7 +249,10 @@ if ($date_endyear) { } print ''; -print ''; +print ''; +if ($modecompta != 'CREANCES-DETTES') { + print_liste_field_titre(''); // Make 4 columns in total whatever $modecompta is +} if ($modecompta == 'BOOKKEEPING') { print_liste_field_titre("PredefinedGroups", $_SERVER["PHP_SELF"], 'f.thirdparty_code,f.rowid', '', $param, '', $sortfield, $sortorder, 'width200 '); } else { @@ -1525,18 +1528,24 @@ print ''; print ''; if ($modecompta == 'CREANCES-DETTES') { print ''; +} else { + print(''); } print ''; print ''; print ''; if ($modecompta == 'CREANCES-DETTES') { print ''; +} else { + print(''); } print ''; print ''; print ''; if ($modecompta == 'CREANCES-DETTES') { print ''; +} else { + print(''); } print ''; print ''; From 3a83676202d7374c669fd83e8aaf11f843384dda Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 5 Aug 2022 02:22:32 +0000 Subject: [PATCH 2/5] Fixing style errors. --- htdocs/compta/resultat/clientfourn.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index ab2a339cc40..7cac2e25e31 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -249,7 +249,7 @@ if ($date_endyear) { } print '
'.$langs->trans("Income").''.price(price2num($total_ht_income, 'MT')).''.price(price2num($total_ttc_income, 'MT')).'
'.$langs->trans("Outcome").''.price(price2num(-$total_ht_outcome, 'MT')).''.price(price2num(-$total_ttc_outcome, 'MT')).'
'.$langs->trans("Profit").''.price(price2num($total_ht, 'MT')).''.price(price2num($total_ttc, 'MT')).'
'; -print ''; +print ''; if ($modecompta != 'CREANCES-DETTES') { print_liste_field_titre(''); // Make 4 columns in total whatever $modecompta is } From 4c649a227a8169b4aa2a64626ae2f27e5e51738e Mon Sep 17 00:00:00 2001 From: Yoan Mollard Date: Wed, 10 Aug 2022 12:54:14 +0200 Subject: [PATCH 3/5] More developer-friendly print of titles --- htdocs/compta/resultat/clientfourn.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 7cac2e25e31..e30e01c5916 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -250,9 +250,7 @@ if ($date_endyear) { print '
'; print ''; -if ($modecompta != 'CREANCES-DETTES') { - print_liste_field_titre(''); // Make 4 columns in total whatever $modecompta is -} + if ($modecompta == 'BOOKKEEPING') { print_liste_field_titre("PredefinedGroups", $_SERVER["PHP_SELF"], 'f.thirdparty_code,f.rowid', '', $param, '', $sortfield, $sortorder, 'width200 '); } else { @@ -265,6 +263,9 @@ if ($modecompta == 'BOOKKEEPING') { if ($modecompta == 'CREANCES-DETTES') { print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], 'amount_ht', '', $param, 'class="right"', $sortfield, $sortorder); } + else { + print_liste_field_titre(''); // Make 4 columns in total whatever $modecompta is + } print_liste_field_titre("AmountTTC", $_SERVER["PHP_SELF"], 'amount_ttc', '', $param, 'class="right"', $sortfield, $sortorder); } print "\n"; From ead7bd91fe72146f24d2d16aaa92a4bee85e86ef Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 11 Aug 2022 01:36:31 +0200 Subject: [PATCH 4/5] Update clientfourn.php --- htdocs/compta/resultat/clientfourn.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index e30e01c5916..0ad8b9f3e49 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -262,8 +262,7 @@ if ($modecompta == 'BOOKKEEPING') { } else { if ($modecompta == 'CREANCES-DETTES') { print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], 'amount_ht', '', $param, 'class="right"', $sortfield, $sortorder); - } - else { + } else { print_liste_field_titre(''); // Make 4 columns in total whatever $modecompta is } print_liste_field_titre("AmountTTC", $_SERVER["PHP_SELF"], 'amount_ttc', '', $param, 'class="right"', $sortfield, $sortorder); From c089fe124c6de8f593c1e9940dc0757d98d7015f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 11 Aug 2022 01:37:53 +0200 Subject: [PATCH 5/5] Update clientfourn.php --- htdocs/compta/resultat/clientfourn.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 0ad8b9f3e49..2be668fac5c 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -1529,7 +1529,7 @@ print ''; } else { - print(''); + print ''; } print ''; print ''; @@ -1537,7 +1537,7 @@ print ''; } else { - print(''); + print ''; } print ''; print ''; @@ -1545,7 +1545,7 @@ print ''; } else { - print(''); + print ''; } print ''; print '';
'.$langs->trans("Inc if ($modecompta == 'CREANCES-DETTES') { print ''.price(price2num($total_ht_income, 'MT')).''.price(price2num($total_ttc_income, 'MT')).'
'.$langs->trans("Out if ($modecompta == 'CREANCES-DETTES') { print ''.price(price2num(-$total_ht_outcome, 'MT')).''.price(price2num(-$total_ttc_outcome, 'MT')).'
'.$langs->trans("Pro if ($modecompta == 'CREANCES-DETTES') { print ''.price(price2num($total_ht, 'MT')).''.price(price2num($total_ttc, 'MT')).'