Merge pull request #1402 from mocig/issue-1401
collect function uses wrong direction for currency conversion
This commit is contained in:
commit
246b5b6437
@ -137,7 +137,7 @@ class Contact extends Model
|
||||
$this->$collection()->accrued()->notPaid()->each(function ($item) use (&$amount) {
|
||||
$unpaid = $item->amount - $item->paid;
|
||||
|
||||
$amount += $this->convertFromDefault($unpaid, $item->currency_code, $item->currency_rate);
|
||||
$amount += $this->convertToDefault($unpaid, $item->currency_code, $item->currency_rate);
|
||||
});
|
||||
|
||||
return $amount;
|
||||
|
Loading…
x
Reference in New Issue
Block a user