diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index cd44122b981..fd1f4d73a4c 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -3723,7 +3723,7 @@ else if ($id > 0 || ! empty($ref))
else
print $langs->trans('ExcessReceived');
print ' :';
- print '
' . price($resteapayeraffiche) . ' | ';
+ print '' . price($resteapayeraffiche) . ' | ';
print ' | ';
}
else // Credit note
diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php
index e917e1e1c71..77393b78f4e 100644
--- a/htdocs/compta/sociales/card.php
+++ b/htdocs/compta/sociales/card.php
@@ -556,34 +556,42 @@ if ($id > 0)
print ''.$langs->trans("Date").' | ';
print ''.$langs->trans("Type").' | ';
print ''.$langs->trans("Amount").' | ';
- print ' | ';
print '';
- $var=True;
- while ($i < $num)
+ $var=true;
+ if ($num > 0)
+ {
+ while ($i < $num)
+ {
+ $objp = $db->fetch_object($resql);
+ $var=!$var;
+ print "| ";
+ print ''.img_object($langs->trans("Payment"),"payment").' '.$objp->rowid.' | ';
+ print ''.dol_print_date($db->jdate($objp->dp),'day')." | \n";
+ $labeltype=$langs->trans("PaymentType".$objp->type_code)!=("PaymentType".$objp->type_code)?$langs->trans("PaymentType".$objp->type_code):$objp->paiement_type;
+ print "".$labeltype.' '.$objp->num_paiement." | \n";
+ print ''.price($objp->amount)." | \n";
+ print "
";
+ $totalpaye += $objp->amount;
+ $i++;
+ }
+ }
+ else
{
- $objp = $db->fetch_object($resql);
$var=!$var;
- print "| ";
- print ''.img_object($langs->trans("Payment"),"payment").' '.$objp->rowid.' | ';
- print ''.dol_print_date($db->jdate($objp->dp),'day')." | \n";
- $labeltype=$langs->trans("PaymentType".$objp->type_code)!=("PaymentType".$objp->type_code)?$langs->trans("PaymentType".$objp->type_code):$objp->paiement_type;
- print "".$labeltype.' '.$objp->num_paiement." | \n";
- print ''.price($objp->amount)." | ".$langs->trans("Currency".$conf->currency)." | \n";
- print "
";
- $totalpaye += $objp->amount;
- $i++;
+ print '| '.$langs->trans("None").' | | | |
';
}
-
+
if ($object->paye == 0)
{
- print "| ".$langs->trans("AlreadyPaid")." : | ".price($totalpaye)." | ".$langs->trans("Currency".$conf->currency)." |
\n";
- print "| ".$langs->trans("AmountExpected")." : | ".price($object->amount)." | ".$langs->trans("Currency".$conf->currency)." |
\n";
+ print "| ".$langs->trans("AlreadyPaid")." : | ".price($totalpaye)." |
\n";
+ print "| ".$langs->trans("AmountExpected")." : | ".price($object->amount)." |
\n";
$resteapayer = $object->amount - $totalpaye;
-
+ $cssforamountpaymentcomplete = 'amountpaymentcomplete';
+
print "| ".$langs->trans("RemainderToPay")." : | ";
- print "".price($resteapayer)." | ".$langs->trans("Currency".$conf->currency)." |
\n";
+ print ''.price($resteapayer)." | \n";
}
print "";
$db->free($resql);