replaced revenues/payments with transactions

This commit is contained in:
denisdulici
2019-11-27 12:08:36 +03:00
parent e4d0de0677
commit 3a15c1d615
28 changed files with 139 additions and 141 deletions

View File

@ -225,10 +225,10 @@ class Invoice extends Model
$paid = 0;
$reconciled = $reconciled_amount = 0;
if ($this->payments->count()) {
if ($this->transactions->count()) {
$currencies = Currency::enabled()->pluck('rate', 'code')->toArray();
foreach ($this->payments as $item) {
foreach ($this->transactions as $item) {
if ($this->currency_code == $item->currency_code) {
$amount = (double) $item->amount;
} else {