From f30468cc97cf5cdb48a3dc713b8094ef12e7bd1a Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 12 May 2023 11:36:07 +1000 Subject: [PATCH] Fixes for queries --- app/Services/Report/ProfitLoss.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/Report/ProfitLoss.php b/app/Services/Report/ProfitLoss.php index 12ecddacb2a5..45e53a20d8f0 100644 --- a/app/Services/Report/ProfitLoss.php +++ b/app/Services/Report/ProfitLoss.php @@ -237,7 +237,7 @@ class ProfitLoss sum(invoices.total_taxes) as total_taxes, (sum(invoices.total_taxes) / IFNULL(invoices.exchange_rate, 1)) AS net_converted_taxes, sum(invoices.amount - invoices.total_taxes) as net_amount, - IFNULL(CAST(JSON_UNQUOTE(JSON_EXTRACT( clients.settings, '$.currency_id' )) AS SIGNED), :company_currency) AS currency_id + IFNULL(CAST(JSON_UNQUOTE(JSON_EXTRACT( clients.settings, '$.currency_id' )) AS SIGNED), :company_currency) AS currency_id, (sum(invoices.amount - invoices.total_taxes) / IFNULL(invoices.exchange_rate, 1)) AS net_converted_amount FROM clients JOIN invoices