styling
This commit is contained in:
parent
95b8a64f1e
commit
7bcbe26770
@ -273,16 +273,16 @@ class Document extends Model
|
|||||||
$precision = config('money.' . $code . '.precision');
|
$precision = config('money.' . $code . '.precision');
|
||||||
|
|
||||||
if ($this->transactions->count()) {
|
if ($this->transactions->count()) {
|
||||||
foreach ($this->transactions as $item) {
|
foreach ($this->transactions as $transaction) {
|
||||||
$amount = $item->amount;
|
$amount = $transaction->amount;
|
||||||
|
|
||||||
if ($code != $item->currency_code) {
|
if ($code != $transaction->currency_code) {
|
||||||
$amount = $this->convertBetween($amount, $item->currency_code, $item->currency_rate, $code, $rate);
|
$amount = $this->convertBetween($amount, $transaction->currency_code, $transaction->currency_rate, $code, $rate);
|
||||||
}
|
}
|
||||||
|
|
||||||
$paid += $amount;
|
$paid += $amount;
|
||||||
|
|
||||||
if ($item->reconciled) {
|
if ($transaction->reconciled) {
|
||||||
$reconciled_amount = +$amount;
|
$reconciled_amount = +$amount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user