feat: Editable Sales Invoice (#32625)

* feat: Editable Sales Invoice

(cherry picked from commit 30da6ab2c1)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.json

* chore: Update allow on submit for Sales Invoice fields

(cherry picked from commit e626107d3d)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json

* chore: Break into smaller functions

(cherry picked from commit 42e4c37f15)

* chore: Update allow on submit fields

(cherry picked from commit 1105e52031)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.json

* test: Add unit tests

(cherry picked from commit ed98015a56)

* chore: Update tests

(cherry picked from commit 1a980123a2)

* chore: Reset repost_required_flag on cancel

(cherry picked from commit 0966867c08)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.py

* chore: Enable no-copy for repost required field

(cherry picked from commit 5fe55176ec)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.json

* chore: Validate for deferred revenue invoices

(cherry picked from commit e29f756146)

* chore: Resolve conflicts

---------

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
This commit is contained in:
mergify[bot]
2023-02-21 14:21:36 +05:30
committed by GitHub
parent ce817e97eb
commit 00eb6329a7
7 changed files with 176 additions and 8 deletions

View File

@@ -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", "");