Update card.php
This commit is contained in:
parent
74ad0586a9
commit
7bf6daaca7
@ -538,7 +538,7 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
// If some payments were already done, we change the amount to pay using same prorate
|
||||
if (!empty($conf->global->SUPPLIER_INVOICE_ALLOW_REUSE_OF_CREDIT_WHEN_PARTIALLY_REFUNDED)) {
|
||||
if (!empty($conf->global->SUPPLIER_INVOICE_ALLOW_REUSE_OF_CREDIT_WHEN_PARTIALLY_REFUNDED) && $object->type == FactureFournisseur::TYPE_CREDIT_NOTE) {
|
||||
$alreadypaid = $object->getSommePaiement(); // This can be not 0 if we allow to create credit to reuse from credit notes partially refunded.
|
||||
if ($alreadypaid && abs($alreadypaid) < abs($object->total_ttc)) {
|
||||
$ratio = abs(($object->total_ttc - $alreadypaid) / $object->total_ttc);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user