From 1fd546f424673ab6caa5c01825b002f2d622b3c1 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 16 May 2013 11:02:07 +0530 Subject: [PATCH] [fixes] prosting date for gl entry --- stock/doctype/serial_no/serial_no.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stock/doctype/serial_no/serial_no.py b/stock/doctype/serial_no/serial_no.py index 501b535c6e..09181db0d2 100644 --- a/stock/doctype/serial_no/serial_no.py +++ b/stock/doctype/serial_no/serial_no.py @@ -142,7 +142,8 @@ class DocType(StockController): gl_entries = self.get_gl_entries_for_stock(against_stock_account, self.doc.purchase_rate) for entry in gl_entries: - entry["posting_date"] = self.doc.purchase_date + entry["posting_date"] = self.doc.purchase_date or (self.doc.creation and + self.doc.creation.split(' ')[0]) or nowdate() if gl_entries: make_gl_entries(gl_entries, cancel) \ No newline at end of file