From 679b17dbc473c5157064d8ded3a2b914e13c2859 Mon Sep 17 00:00:00 2001 From: Sven Grube Date: Fri, 10 Apr 2020 10:38:03 -0600 Subject: [PATCH] collect function uses wrong direction for currency conversion --- app/Models/Common/Contact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Common/Contact.php b/app/Models/Common/Contact.php index 8ab041a8f..6506a98b0 100644 --- a/app/Models/Common/Contact.php +++ b/app/Models/Common/Contact.php @@ -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;