posting time fixes in stock ledger entry
diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
index d6f7000..b545d7d 100644
--- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
+++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
@@ -94,13 +94,13 @@
def validate_posting_time(self):
""" Validate posting time format"""
- if self.doc.posting_time and len(cstr(self.doc.posting_time)) == 8 and cstr(self.doc.posting_time)[-2:] != '00':
+ if self.doc.posting_time and len(self.doc.posting_time.split(':')) > 2:
msgprint("Wrong format of posting time, can not complete the transaction. If you think \
you entered posting time correctly, please contact ERPNext support team.")
raise Exception
def scrub_posting_time(self):
- if not self.doc.posting_time or self.doc.posting_time == '12:0':
+ if not self.doc.posting_time or self.doc.posting_time == '00:0':
self.doc.posting_time = '00:00'
if len(self.doc.posting_time.split(':')) > 2:
self.doc.posting_time = '00:00'