FIX amount of payment deleted in unalterable log (for old record must
look the log of creation to know amount).
This commit is contained in:
parent
b12aae4a99
commit
ba8d60f4d4
@ -549,10 +549,8 @@ class BlockedLog
|
||||
|
||||
$totalamount = 0;
|
||||
|
||||
if (!is_array($object->amounts) && $object->amount) {
|
||||
$object->amounts = array($object->id => $object->amount);
|
||||
}
|
||||
|
||||
// Loop on each invoice payment amount
|
||||
if (is_array($object->amounts) && !empty($object->amounts)) {
|
||||
$paymentpartnumber = 0;
|
||||
foreach ($object->amounts as $objid => $amount) {
|
||||
if (empty($amount)) {
|
||||
@ -654,6 +652,9 @@ class BlockedLog
|
||||
$this->object_data->payment_part[$paymentpartnumber] = $paymentpart;
|
||||
}
|
||||
}
|
||||
} elseif (!empty($object->amount)) {
|
||||
$totalamount = $object->amount;
|
||||
}
|
||||
|
||||
$this->object_data->amount = $totalamount;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user