From 2a5fbe353753f91bb591fb10bdeafd8dbf12fc32 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 Dec 2023 17:31:58 +0100 Subject: [PATCH 1/4] Fix language --- htdocs/langs/bn_IN/main.lang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/bn_IN/main.lang b/htdocs/langs/bn_IN/main.lang index e71ac9de4c1..3e8cb232542 100644 --- a/htdocs/langs/bn_IN/main.lang +++ b/htdocs/langs/bn_IN/main.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - main -DIRECTION=লিটার +DIRECTION=ltr # Default for FONTFORPDF=helvetica # Note for Chinese: # msungstdlight or cid0ct are for traditional Chinese zh_TW (traditional does not render with Ubuntu pdf reader) @@ -10,7 +10,7 @@ DIRECTION=লিটার # DejaVuSans is for some Eastern languages, some Asian languages and some Arabic languages # freemono is for ru_RU or uk_UA, uz_UZ # freeserif is for Tamil -FONTFORPDF=হেলভেটিকা +FONTFORPDF=helvetica FONTSIZEFORPDF=10 SeparatorDecimal=. SeparatorThousand=, From f9a9b3610e5525905cd6c415ea0a2e1f2308e210 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 Dec 2023 18:53:55 +0100 Subject: [PATCH 2/4] Fix missing total --- htdocs/compta/charges/index.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 15106aaffc7..0337695ba45 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -296,8 +296,11 @@ if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) { $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); + $i = 0; $total = 0; + $totaltopay = 0; + print ''; print ''; print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, '', $sortfield, $sortorder, 'nowraponall '); @@ -311,14 +314,16 @@ if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) { } print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "ptva.amount", "", $param, 'class="right"', $sortfield, $sortorder); print "\n"; - $var = 1; + while ($i < $num) { $obj = $db->fetch_object($result); + $totaltopay = $totaltopay + $obj->amount_tva; $total = $total + $obj->amount; print ''; + print ''."\n"; $tva_static->id = $obj->id_tva; @@ -369,7 +374,7 @@ if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) { } print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; From 540c69e303604ac60e93fba6ec41d8c62329d2f7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 Dec 2023 19:02:53 +0100 Subject: [PATCH 3/4] Debug v19 --- htdocs/compta/charges/index.php | 34 +++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 0337695ba45..f30e7e27eac 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -184,10 +184,11 @@ if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) { $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); - $i = 0; + $total = 0; $totalpaid = 0; + $i = 0; while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); @@ -251,15 +252,22 @@ if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) { $totalpaid = $totalpaid + $obj->totalpaid; $i++; } - print ''; - print ''; // A total here has no sense - print ''; - print ''; - print ''; + print ''; + + print ''; + + // Total here has no sens because we can have several time the same line + //print ''; + print ''; + + print ''; + print ''; + print ''; if (isModEnabled("banque")) { - print ''; + print ''; } print '"; + print ""; } else { dol_print_error($db); @@ -279,7 +287,7 @@ if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) { $sql .= " pct.code as payment_code,"; $sql .= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.fk_accountancy_journal, ba.label as blabel"; $sql .= " FROM ".MAIN_DB_PREFIX."tva as pv"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."payment_vat as ptva ON (ptva.fk_tva = pv.rowid)"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."payment_vat as ptva ON ptva.fk_tva = pv.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON (ptva.fk_bank = b.rowid)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pct ON ptva.fk_typepaiement = pct.id"; @@ -372,13 +380,19 @@ if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) { $i++; } - print ''; + print ''; + + print ''; + + // Total here has no sens because we can have several time the same line + //print ''; print ''; - print ''; + print ''; print ''; print ''; print '"; + print ""; print "
'.dol_print_date($db->jdate($obj->dm), 'day').'
'.$langs->trans("Total").'  '.price($totaltopay).'   
'.$langs->trans("Total").'   
'.$langs->trans("Total").''.price($total).'   '.price($totalpaid)."
'.$langs->trans("Total").'
'.$langs->trans("Total").''.price($totaltopay).' '.price($totaltopay).'   '.price($total)."
"; From 2cb4dd29f8e4a5cc99de99cc25f0b6695b1e28ca Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 Dec 2023 19:06:21 +0100 Subject: [PATCH 4/4] Fix td balance --- htdocs/compta/charges/index.php | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index f30e7e27eac..d568b0965c7 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -343,7 +343,7 @@ if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) { // Ref payment $ptva_static->id = $obj->rowid; $ptva_static->ref = $obj->rowid; - print ''.$ptva_static->getNomUrl(1)."\n"; + print ''.$ptva_static->getNomUrl(1)."\n"; // Date print ''.dol_print_date($db->jdate($obj->date_payment), 'day')."\n"; @@ -382,20 +382,26 @@ if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) { } print ''; - print ''.$langs->trans("Total").''; + print ''.$langs->trans("Total").''; // Total here has no sens because we can have several time the same line //print ''.price($totaltopay).''; - print ' '; + print ' '; - print ' '; - print ' '; - print ' '; - print ''.price($total).""; + print ''; + print ''; + print ''; + + if (isModEnabled("banque")) { + print ''; + } + + print ''.price($total).""; print ""; print ""; + $db->free($result); } else { dol_print_error($db);