From 875ccac151d101b30b5b0b37f981cdeff5e197f5 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 4 May 2012 18:48:30 +0530 Subject: [PATCH] stock reco cancellation issue fxed --- .../stock_reconciliation.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index e82a0d94f5..ee81518623 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -51,16 +51,16 @@ class DocType: """Convert csv data into list""" count = 2 for s in data: - if s[0].strip() != 'Item Code': # remove the labels - # validate - if (submit and len(s) != 4) or (not submit and len(s) != 6): - msgprint("Data entered at Row No " + cstr(count) + " in Attachment File is not in correct format.", raise_exception=1) - self.validated = 0 - self.validate_item(s[0], count) - self.validate_warehouse(s[1], count) + if count == 2: continue + # validate + if (submit and len(s) != 4) or (not submit and len(s) != 6): + msgprint("Data entered at Row No " + cstr(count) + " in Attachment File is not in correct format.", raise_exception=1) + self.validated = 0 + self.validate_item(s[0], count) + self.validate_warehouse(s[1], count) - self.data.append(s) - count += 1 + self.data.append(s) + count += 1 if not self.validated: raise Exception @@ -175,7 +175,7 @@ class DocType: """Add diffs column in attached file""" # add header - out = "'Item Code', 'Warehouse', 'Qty', 'Valuation Rate', 'Qty Diff', 'Val Rate Diff'" + out = "Item Code, Warehouse, Qty, Valuation Rate, Qty Diff, Val Rate Diff" # add data for d in self.data: