From 2ae7ed4cf0de848f1fbca04e278780f14a9daaf6 Mon Sep 17 00:00:00 2001 From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Date: Sun, 17 Mar 2019 09:49:24 +0530 Subject: [PATCH] fix: Gross profit report fix (#16935) --- erpnext/accounts/report/gross_profit/gross_profit.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index 073516fb88..e5aaafaff4 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -125,10 +125,11 @@ class GrossProfitGenerator(object): # get buying amount if row.item_code in product_bundles: - row.buying_amount = self.get_buying_amount_from_product_bundle(row, - product_bundles[row.item_code]) + row.buying_amount = flt(self.get_buying_amount_from_product_bundle(row, + product_bundles[row.item_code]), self.currency_precision) else: - row.buying_amount = self.get_buying_amount(row, row.item_code) + row.buying_amount = flt(self.get_buying_amount(row, row.item_code), + self.currency_precision) # get buying rate if row.qty: @@ -215,7 +216,7 @@ class GrossProfitGenerator(object): if packed_item.get("parent_detail_docname")==row.item_row: buying_amount += self.get_buying_amount(row, packed_item.item_code) - return buying_amount + return flt(buying_amount, self.currency_precision) def get_buying_amount(self, row, item_code): # IMP NOTE