feat: validate sales order in sales invoice
This commit is contained in:
parent
1c276e9828
commit
4f350fcadb
@ -158,7 +158,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
||||
},
|
||||
get_query_filters: {
|
||||
docstatus: 1,
|
||||
status: ["!=", "Closed"],
|
||||
status: ["not in", ["Closed", "On Hold"]],
|
||||
per_billed: ["<", 99.99],
|
||||
company: me.frm.doc.company
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ class SalesInvoice(SellingController):
|
||||
self.validate_with_previous_doc()
|
||||
self.validate_uom_is_integer("stock_uom", "stock_qty")
|
||||
self.validate_uom_is_integer("uom", "qty")
|
||||
self.check_close_sales_order("sales_order")
|
||||
self.check_sales_order_on_hold_or_close("sales_order")
|
||||
self.validate_debit_to_acc()
|
||||
self.clear_unallocated_advances("Sales Invoice Advance", "advances")
|
||||
self.add_remarks()
|
||||
@ -206,7 +206,7 @@ class SalesInvoice(SellingController):
|
||||
self.update_time_sheet(None)
|
||||
|
||||
def on_cancel(self):
|
||||
self.check_close_sales_order("sales_order")
|
||||
self.check_sales_order_on_hold_or_close("sales_order")
|
||||
|
||||
from erpnext.accounts.utils import unlink_ref_doc_from_payment_entries
|
||||
if frappe.db.get_single_value('Accounts Settings', 'unlink_payment_on_cancellation_of_invoice'):
|
||||
|
Loading…
x
Reference in New Issue
Block a user