From db9fa78ee86e43da115de41ccc6511bd0fd3e530 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 1 Mar 2018 10:32:29 +0530 Subject: [PATCH] Do not validate payment schedule for POS (#13115) --- erpnext/controllers/accounts_controller.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 472a7a3fce..1af2fdd70d 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -666,6 +666,8 @@ class AccountsController(TransactionBase): self.remove(item) def set_payment_schedule(self): + if self.doctype == 'Sales Invoice' and self.is_pos: return + posting_date = self.get("bill_date") or self.get("posting_date") or self.get("transaction_date") date = self.get("due_date") due_date = date or posting_date @@ -695,6 +697,8 @@ class AccountsController(TransactionBase): dates = [] li = [] + if self.doctype == 'Sales Invoice' and self.is_pos: return + for d in self.get("payment_schedule"): if self.doctype == "Sales Order" and getdate(d.due_date) < getdate(self.transaction_date): frappe.throw(_("Row {0}: Due Date cannot be before posting date").format(d.idx)) @@ -708,6 +712,8 @@ class AccountsController(TransactionBase): .format(list=duplicates)) def validate_payment_schedule_amount(self): + if self.doctype == 'Sales Invoice' and self.is_pos: return + if self.get("payment_schedule"): total = 0 for d in self.get("payment_schedule"):