From 7f0befb94f26974cfb7bf5483b5e1c6623461895 Mon Sep 17 00:00:00 2001 From: nabinhait Date: Tue, 5 Jul 2011 12:10:45 +0530 Subject: [PATCH] make ledger entry is qty and actual qty are both zero in stock reco --- .../doctype/stock_reconciliation/stock_reconciliation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/material_management/doctype/stock_reconciliation/stock_reconciliation.py b/material_management/doctype/stock_reconciliation/stock_reconciliation.py index 28410c8031..50da30b3ee 100644 --- a/material_management/doctype/stock_reconciliation/stock_reconciliation.py +++ b/material_management/doctype/stock_reconciliation/stock_reconciliation.py @@ -127,10 +127,10 @@ class DocType: # update mar # ----------- def update_mar(self, d, qty_diff): - if not d[self.label['qty']] and not d[self.label['actual_qty']]: + if not flt(d[self.label['qty']]) and not flt(d[self.label['actual_qty']]): # seems like a special condition when there is no actual quanitity but there is a rate, may be only for setting a rate! self.make_sl_entry(1,d,1) - self.make_sl_entry(-1,d,1) + self.make_sl_entry(1,d,-1) else: self.update_item_valuation_pre_date(d)