diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index bd7e77d768..49b0593cd6 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -52,10 +52,12 @@ class DocType: msgprint("GL Entry: Debit or Credit amount is mandatory for %s" % self.doc.account) raise Exception + + # COMMMENTED below to allow zero amount (+ and -) entry in tax table # Debit and credit can not done at the same time - if flt(self.doc.credit) != 0 and flt(self.doc.debit) != 0: - msgprint("Sorry you cannot credit and debit under same account head.") - raise Exception, "Validation Error." + #if flt(self.doc.credit) != 0 and flt(self.doc.debit) != 0: + # msgprint("Sorry you cannot credit and debit under same account head.") + # raise Exception, "Validation Error." # Cost center is required only if transaction made against pl account #-------------------------------------------------------------------- diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 6d080a8c56..530c5e615e 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -453,8 +453,8 @@ class DocType: if self.doc.purpose == 'Purchase Return': #delete_doc("Serial No", serial_no) serial_doc = Document("Serial No", serial_no) - serial_doc.status = 'Purchase Returned' - serial_doc.docstatus = 2 + serial_doc.status = is_submit and 'Purchase Returned' or 'In Store' + serial_doc.docstatus = is_submit and 2 or 0 serial_doc.save()