Total Invoice Payment for Order and Due amount is calculated for the specific invoice

This commit is contained in:
Sumit Panwar
2024-06-08 17:12:48 +05:30
parent b5925817de
commit 0f4abcaeb4
4 changed files with 5 additions and 3 deletions

View File

@@ -1015,7 +1015,7 @@ class OrderInvoiceCore extends ObjectModel
$payments = OrderPaymentDetail::getByInvoiceId($this->id);
foreach ($payments as $payment) {
/** @var OrderPayment $payment */
$amount += $payment['amount'];
$amount += ($payment['amount'] / $payment['conversion_rate']);
}
Cache::store($cache_id, $amount);
return $amount;