diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index ff82055d19b..4a8c8ad82a7 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -366,15 +366,10 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying. hide_fields(this.frm.doc); if(cint(this.frm.doc.is_paid)) { this.frm.set_value("allocate_advances_automatically", 0); -<<<<<<< HEAD - if(!this.frm.doc.company) { - this.frm.set_value("is_paid", 0) -======= this.frm.set_value("payment_terms_template", ""); this.frm.set_value("payment_schedule", []); - if (!this.frm.doc.company) { - this.frm.set_value("is_paid", 0); ->>>>>>> e1fc239f3d (fix: clear payment schedule in purchase invoice for is_paid) + if(!this.frm.doc.company) { + this.frm.set_value("is_paid", 0) frappe.msgprint(__("Please specify Company to proceed")); } } diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 27b656ef51e..15748868510 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -2203,18 +2203,9 @@ class AccountsController(TransactionBase): frappe.throw(_("Rows with duplicate due dates in other rows were found: {0}").format(duplicates)) def validate_payment_schedule_amount(self): -<<<<<<< HEAD -<<<<<<< HEAD - if self.doctype == "Sales Invoice" and self.is_pos: - return - -======= ->>>>>>> e1fc239f3d (fix: clear payment schedule in purchase invoice for is_paid) -======= if (self.doctype == "Sales Invoice" and self.is_pos) or self.get("is_opening") == "Yes": return ->>>>>>> 0589fa7f3e (refactor: early return is always better) party_account_currency = self.get("party_account_currency") if not party_account_currency: party_type, party = self.get_party()