diff --git a/account_financial_report/report/general_ledger.py b/account_financial_report/report/general_ledger.py index 96641440..ae529aee 100644 --- a/account_financial_report/report/general_ledger.py +++ b/account_financial_report/report/general_ledger.py @@ -976,7 +976,7 @@ INNER JOIN LEFT JOIN account_full_reconcile fr ON ml.full_reconcile_id = fr.id LEFT JOIN - res_currency c ON a.currency_id = c.id + res_currency c ON ml.currency_id = c.id """ if self.filter_cost_center_ids: query_inject_move_line += """ @@ -1086,7 +1086,8 @@ WITH )::date AS date, SUM(ml.debit) AS debit, SUM(ml.credit) AS credit, - SUM(ml.balance) AS balance + SUM(ml.balance) AS balance, + ml.currency_id AS currency_id FROM report_general_ledger_account ra INNER JOIN @@ -1119,7 +1120,7 @@ WITH """ query_inject_move_line_centralized += """ GROUP BY - ra.id, ml.account_id, a.code, 2 + ra.id, ml.account_id, a.code, 2, ml.currency_id ) INSERT INTO report_general_ledger_move_line @@ -1154,7 +1155,7 @@ INNER JOIN INNER JOIN account_account a ON ml.account_id = a.id LEFT JOIN - res_currency c ON a.currency_id = c.id + res_currency c ON ml.currency_id = c.id WHERE ra.report_id = %s AND diff --git a/account_financial_report/report/open_items.py b/account_financial_report/report/open_items.py index 2423677b..3ddea1a7 100644 --- a/account_financial_report/report/open_items.py +++ b/account_financial_report/report/open_items.py @@ -362,7 +362,8 @@ FROM THEN pr.amount_currency ELSE NULL END - ) AS partial_amount_currency + ) AS partial_amount_currency, + ml.currency_id FROM report_open_items_partner rp INNER JOIN @@ -470,13 +471,15 @@ WITH ELSE amount_currency + SUM(partial_amount_currency) END ELSE amount_currency - END AS amount_residual_currency + END AS amount_residual_currency, + currency_id FROM move_lines_amount GROUP BY id, balance, - amount_currency + amount_currency, + currency_id ) INSERT INTO report_open_items_move_line @@ -558,7 +561,7 @@ INNER JOIN LEFT JOIN account_full_reconcile fr ON ml.full_reconcile_id = fr.id LEFT JOIN - res_currency c ON a.currency_id = c.id + res_currency c ON ml2.currency_id = c.id WHERE ra.report_id = %s AND diff --git a/account_financial_report/report/templates/aged_partner_balance.xml b/account_financial_report/report/templates/aged_partner_balance.xml index 3e94011e..c990ce7f 100644 --- a/account_financial_report/report/templates/aged_partner_balance.xml +++ b/account_financial_report/report/templates/aged_partner_balance.xml @@ -286,7 +286,7 @@
Percents
-
+
%
@@ -306,7 +306,7 @@
-
+
%
diff --git a/account_financial_report/report/templates/general_ledger.xml b/account_financial_report/report/templates/general_ledger.xml index 3b2c2cf6..84aa0a96 100644 --- a/account_financial_report/report/templates/general_ledger.xml +++ b/account_financial_report/report/templates/general_ledger.xml @@ -125,47 +125,43 @@
Credit
Cumul. Bal.
- - -
Cur.
- -
Amount cur.
-
+ +
Cur.
+ +
Amount cur.
-
+
-
+
-
+
-
+
-
+
Initial balance
-
+
-
+
- - -
- -
-
+ +
+ +
@@ -196,17 +192,15 @@
- - -
- - -
-
- - -
-
+ +
+ + +
+
+ + +
@@ -223,25 +217,24 @@
Ending balance
-
+
Partner ending balance
-
+
-
+
- - -
-
+ +
+
diff --git a/account_financial_report/report/templates/open_items.xml b/account_financial_report/report/templates/open_items.xml index 677e3f52..df3b92ae 100644 --- a/account_financial_report/report/templates/open_items.xml +++ b/account_financial_report/report/templates/open_items.xml @@ -103,14 +103,12 @@
Original
Residual
- - -
Cur.
- -
Cur. Original
- -
Cur. Residual
-
+ +
Cur.
+ +
Cur. Original
+ +
Cur. Residual
@@ -136,21 +134,19 @@
- - -
- - -
- -
-
- - -
- -
-
+ +
+ + +
+ +
+
+ + +
+ +
@@ -167,19 +163,17 @@
Ending balance
-
+
Partner ending balance
-
+
-
+
- - -
-
+ +