From 28acaeb3456e31351e3dd32c0ba6d886c70a7442 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 3 Jan 2014 11:16:16 +0530 Subject: [PATCH] Fixes in valuation rate calculation in purchase receipt --- controllers/buying_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/buying_controller.py b/controllers/buying_controller.py index 4aa08d6c554..f014f72ee5b 100644 --- a/controllers/buying_controller.py +++ b/controllers/buying_controller.py @@ -184,7 +184,7 @@ class BuyingController(StockController): for item in self.doclist.get({"parentfield": parentfield}): - if item.item_code and item.qty and item.item_code in stock_items: + if item.item_code and item.qty and stock_items_amount and item.item_code in stock_items: item.item_tax_amount = flt(flt(item.amount) * total_valuation_amount \ / stock_items_amount, self.precision("item_tax_amount", item))