From 7bcbe26770b8cf465e8390d112110a9f3fe902af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Mon, 7 Jun 2021 14:51:18 +0300 Subject: [PATCH] styling --- app/Models/Document/Document.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Models/Document/Document.php b/app/Models/Document/Document.php index 8258ca68a..fb35b861e 100644 --- a/app/Models/Document/Document.php +++ b/app/Models/Document/Document.php @@ -273,16 +273,16 @@ class Document extends Model $precision = config('money.' . $code . '.precision'); if ($this->transactions->count()) { - foreach ($this->transactions as $item) { - $amount = $item->amount; + foreach ($this->transactions as $transaction) { + $amount = $transaction->amount; - if ($code != $item->currency_code) { - $amount = $this->convertBetween($amount, $item->currency_code, $item->currency_rate, $code, $rate); + if ($code != $transaction->currency_code) { + $amount = $this->convertBetween($amount, $transaction->currency_code, $transaction->currency_rate, $code, $rate); } $paid += $amount; - if ($item->reconciled) { + if ($transaction->reconciled) { $reconciled_amount = +$amount; } }