refs #412 Added payment check currency
This commit is contained in:
parent
51b3e37856
commit
7641d7e315
@ -50,9 +50,15 @@ class Invoices extends Controller
|
|||||||
$paid = 0;
|
$paid = 0;
|
||||||
|
|
||||||
foreach ($invoice->payments as $item) {
|
foreach ($invoice->payments as $item) {
|
||||||
$item->default_currency_code = $invoice->currency_code;
|
$amount = $item->amount;
|
||||||
|
|
||||||
$paid += $item->getDynamicConvertedAmount();
|
if ($invoice->currency_code != $item->currency_code) {
|
||||||
|
$item->default_currency_code = $invoice->currency_code;
|
||||||
|
|
||||||
|
$amount = $item->getDynamicConvertedAmount();
|
||||||
|
}
|
||||||
|
|
||||||
|
$paid += $amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
$invoice->paid = $paid;
|
$invoice->paid = $paid;
|
||||||
@ -118,9 +124,15 @@ class Invoices extends Controller
|
|||||||
$paid = 0;
|
$paid = 0;
|
||||||
|
|
||||||
foreach ($invoice->payments as $item) {
|
foreach ($invoice->payments as $item) {
|
||||||
$item->default_currency_code = $invoice->currency_code;
|
$amount = $item->amount;
|
||||||
|
|
||||||
$paid += $item->getDynamicConvertedAmount();
|
if ($invoice->currency_code != $item->currency_code) {
|
||||||
|
$item->default_currency_code = $invoice->currency_code;
|
||||||
|
|
||||||
|
$amount = $item->getDynamicConvertedAmount();
|
||||||
|
}
|
||||||
|
|
||||||
|
$paid += $amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
$invoice->paid = $paid;
|
$invoice->paid = $paid;
|
||||||
|
@ -69,9 +69,15 @@ class Invoices extends Controller
|
|||||||
$paid = 0;
|
$paid = 0;
|
||||||
|
|
||||||
foreach ($invoice->payments as $item) {
|
foreach ($invoice->payments as $item) {
|
||||||
$item->default_currency_code = $invoice->currency_code;
|
$amount = $item->amount;
|
||||||
|
|
||||||
$paid += $item->getDynamicConvertedAmount();
|
if ($invoice->currency_code != $item->currency_code) {
|
||||||
|
$item->default_currency_code = $invoice->currency_code;
|
||||||
|
|
||||||
|
$amount = $item->getDynamicConvertedAmount();
|
||||||
|
}
|
||||||
|
|
||||||
|
$paid += $amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
$invoice->paid = $paid;
|
$invoice->paid = $paid;
|
||||||
@ -821,9 +827,15 @@ class Invoices extends Controller
|
|||||||
$paid = 0;
|
$paid = 0;
|
||||||
|
|
||||||
foreach ($invoice->payments as $item) {
|
foreach ($invoice->payments as $item) {
|
||||||
$item->default_currency_code = $invoice->currency_code;
|
$amount = $item->amount;
|
||||||
|
|
||||||
$paid += $item->getDynamicConvertedAmount();
|
if ($invoice->currency_code != $item->currency_code) {
|
||||||
|
$item->default_currency_code = $invoice->currency_code;
|
||||||
|
|
||||||
|
$amount = $item->getDynamicConvertedAmount();
|
||||||
|
}
|
||||||
|
|
||||||
|
$paid += $amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
$invoice->paid = $paid;
|
$invoice->paid = $paid;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user