mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-30 18:34:48 +00:00
chore: Reset repost_required_flag on cancel
This commit is contained in:
@@ -64,7 +64,7 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends e
|
|||||||
|
|
||||||
this.frm.toggle_reqd("due_date", !this.frm.doc.is_return);
|
this.frm.toggle_reqd("due_date", !this.frm.doc.is_return);
|
||||||
|
|
||||||
if (this.frm.doc.repost_required) {
|
if (this.frm.doc.repost_required && this.frm.doc.docstatus===1) {
|
||||||
this.frm.set_intro(__("Accounting entries for this invoice needs to be reposted. Please click on 'Repost' button to update."));
|
this.frm.set_intro(__("Accounting entries for this invoice needs to be reposted. Please click on 'Repost' button to update."));
|
||||||
this.frm.add_custom_button(__('Repost Accounting Entries'),
|
this.frm.add_custom_button(__('Repost Accounting Entries'),
|
||||||
() => {
|
() => {
|
||||||
|
|||||||
@@ -374,6 +374,7 @@ class SalesInvoice(SellingController):
|
|||||||
self.repost_future_sle_and_gle()
|
self.repost_future_sle_and_gle()
|
||||||
|
|
||||||
frappe.db.set(self, "status", "Cancelled")
|
frappe.db.set(self, "status", "Cancelled")
|
||||||
|
self.db_set("repost_required", 0)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
frappe.db.get_single_value("Selling Settings", "sales_update_frequency") == "Each Transaction"
|
frappe.db.get_single_value("Selling Settings", "sales_update_frequency") == "Each Transaction"
|
||||||
|
|||||||
Reference in New Issue
Block a user