diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php
index 15106aaffc7..d568b0965c7 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 '
| '.$langs->trans("Total").' | ';
- print ' | '; // A total here has no sense
- print ' | ';
- print ' | ';
- print ' | ';
+ print '
';
+
+ print '| '.$langs->trans("Total").' | ';
+
+ // Total here has no sens because we can have several time the same line
+ //print ''.price($total).' | ';
+ print ' | ';
+
+ print ' | ';
+ print ' | ';
+ print ' | ';
if (isModEnabled("banque")) {
- print ' | ';
+ print ' | ';
}
print ''.price($totalpaid)." | ";
+
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";
@@ -296,8 +304,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 +322,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 '| '.dol_print_date($db->jdate($obj->dm), 'day').' | '."\n";
$tva_static->id = $obj->id_tva;
@@ -330,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";
@@ -367,16 +380,28 @@ if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) {
$i++;
}
- print '
| '.$langs->trans("Total").' | ';
- print ' | ';
- print ' | ';
- print ' | ';
- print ' | ';
- print ' | ';
- print ''.price($total)." | ";
+ print '
';
+
+ 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 ' | ';
+
+ if (isModEnabled("banque")) {
+ print ' | ';
+ }
+
+ print ''.price($total)." | ";
+
print "
";
print "
";
+
$db->free($result);
} else {
dol_print_error($db);
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=,