From 67d87e29e3bcad04825d300dc0bdb95e760b253a Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Wed, 27 Jun 2018 11:22:03 +0530 Subject: [PATCH] [Fix] Wrong rate calculation in Itemwise sales register report for multi uom (#14690) --- .../item_wise_sales_register/item_wise_sales_register.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py index ac9f4ce2ab..e6216b5f33 100644 --- a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py +++ b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py @@ -53,7 +53,7 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum delivery_note, d.income_account, d.cost_center, d.stock_qty, d.stock_uom ] - row += [d.base_net_rate/d.stock_qty, d.base_net_amount] \ + row += [(d.base_net_rate * d.qty)/d.stock_qty, d.base_net_amount] \ if d.stock_uom != d.uom else [d.base_net_rate, d.base_net_amount] total_tax = 0 @@ -133,7 +133,7 @@ def get_items(filters, additional_query_columns): `tabSales Invoice Item`.stock_uom, `tabSales Invoice Item`.base_net_rate, `tabSales Invoice Item`.base_net_amount, `tabSales Invoice`.customer_name, `tabSales Invoice`.customer_group, `tabSales Invoice Item`.so_detail, - `tabSales Invoice`.update_stock, `tabSales Invoice Item`.uom {0} + `tabSales Invoice`.update_stock, `tabSales Invoice Item`.uom, `tabSales Invoice Item`.qty {0} from `tabSales Invoice`, `tabSales Invoice Item` where `tabSales Invoice`.name = `tabSales Invoice Item`.parent and `tabSales Invoice`.docstatus = 1 %s %s