From 6f3677a3221ddee7c191e79e861c810fa58340a2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Wed, 18 Jan 2017 13:21:34 +0100 Subject: [PATCH] FIX total payed wrong --- htdocs/compta/sociales/card.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 77393b78f4e..92cb36059e4 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -521,9 +521,6 @@ if ($id > 0) print '</tr>'; } - // Status - //print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4, $totalpaye).'</td></tr>'; - print '</table>'; print '</div>'; @@ -548,6 +545,8 @@ if ($id > 0) $resql = $db->query($sql); if ($resql) { + $totalpaye = 0; + $num = $db->num_rows($resql); $i = 0; $total = 0; print '<table class="noborder paymenttable">'; @@ -582,8 +581,8 @@ if ($id > 0) print '<tr '.$bc[$var].'><td colspan="'.$nbcols.'" class="opacitymedium">'.$langs->trans("None").'</td><td></td><td></td><td></td></tr>'; } - if ($object->paye == 0) - { + //if ($object->status == ChargeSociales::STATUS_DRAFT) + //{ print "<tr><td colspan=\"3\" align=\"right\">".$langs->trans("AlreadyPaid")." :</td><td align=\"right\">".price($totalpaye)."</td></tr>\n"; print "<tr><td colspan=\"3\" align=\"right\">".$langs->trans("AmountExpected")." :</td><td align=\"right\">".price($object->amount)."</td></tr>\n"; @@ -592,7 +591,7 @@ if ($id > 0) print "<tr><td colspan=\"3\" align=\"right\">".$langs->trans("RemainderToPay")." :</td>"; print '<td align="right"'.($resteapayer?' class="amountremaintopay"':(' class="'.$cssforamountpaymentcomplete.'"')).'>'.price($resteapayer)."</td></tr>\n"; - } + //} print "</table>"; $db->free($resql); } -- GitLab