feat: Editable Sales Invoice (#32625)
* feat: Editable Sales Invoice (cherry picked from commit30da6ab2c1) # Conflicts: # erpnext/accounts/doctype/sales_invoice/sales_invoice.json * chore: Update allow on submit for Sales Invoice fields (cherry picked from commite626107d3d) # Conflicts: # erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json * chore: Break into smaller functions (cherry picked from commit42e4c37f15) * chore: Update allow on submit fields (cherry picked from commit1105e52031) # Conflicts: # erpnext/accounts/doctype/sales_invoice/sales_invoice.json * test: Add unit tests (cherry picked from commited98015a56) * chore: Update tests (cherry picked from commit1a980123a2) * chore: Reset repost_required_flag on cancel (cherry picked from commit0966867c08) # Conflicts: # erpnext/accounts/doctype/sales_invoice/sales_invoice.py * chore: Enable no-copy for repost required field (cherry picked from commit5fe55176ec) # Conflicts: # erpnext/accounts/doctype/sales_invoice/sales_invoice.json * chore: Validate for deferred revenue invoices (cherry picked from commite29f756146) * chore: Resolve conflicts --------- Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
This commit is contained in:
@@ -143,6 +143,12 @@ var get_payment_mode_account = function(frm, mode_of_payment, callback) {
|
||||
|
||||
cur_frm.cscript.account_head = function(doc, cdt, cdn) {
|
||||
var d = locals[cdt][cdn];
|
||||
|
||||
if (doc.docstatus == 1) {
|
||||
// Should not trigger any changes on change post submit
|
||||
return;
|
||||
}
|
||||
|
||||
if(!d.charge_type && d.account_head){
|
||||
frappe.msgprint(__("Please select Charge Type first"));
|
||||
frappe.model.set_value(cdt, cdn, "account_head", "");
|
||||
|
||||
Reference in New Issue
Block a user