From 6f3677a3221ddee7c191e79e861c810fa58340a2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur 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 ''; } - // Status - //print ''.$langs->trans("Status").''.$object->getLibStatut(4, $totalpaye).''; - print ''; print ''; @@ -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 ''; @@ -582,8 +581,8 @@ if ($id > 0) print ''; } - if ($object->paye == 0) - { + //if ($object->status == ChargeSociales::STATUS_DRAFT) + //{ print "\n"; print "\n"; @@ -592,7 +591,7 @@ if ($id > 0) print ""; print '\n"; - } + //} print "
'.$langs->trans("None").'
".$langs->trans("AlreadyPaid")." :".price($totalpaye)."
".$langs->trans("AmountExpected")." :".price($object->amount)."
".$langs->trans("RemainderToPay")." :'.price($resteapayer)."
"; $db->free($resql); }