mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 14:39:19 +00:00
chore: remove stale UI code related to repost
(cherry picked from commit fe46e1d089)
This commit is contained in:
@@ -25,30 +25,6 @@ frappe.ui.form.on("Journal Entry", {
|
|||||||
refresh: function (frm) {
|
refresh: function (frm) {
|
||||||
erpnext.toggle_naming_series();
|
erpnext.toggle_naming_series();
|
||||||
|
|
||||||
if (frm.doc.repost_required && frm.doc.docstatus === 1) {
|
|
||||||
frm.set_intro(
|
|
||||||
__(
|
|
||||||
"Accounting entries for this Journal Entry need to be reposted. Please click on 'Repost' button to update."
|
|
||||||
)
|
|
||||||
);
|
|
||||||
frm.add_custom_button(__("Repost Accounting Entries"), () => {
|
|
||||||
frm.call({
|
|
||||||
doc: frm.doc,
|
|
||||||
method: "repost_accounting_entries",
|
|
||||||
freeze: true,
|
|
||||||
freeze_message: __("Reposting..."),
|
|
||||||
callback: (r) => {
|
|
||||||
if (!r.exc) {
|
|
||||||
frappe.msgprint(__("Accounting Entries are reposted."));
|
|
||||||
frm.refresh();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.removeClass("btn-default")
|
|
||||||
.addClass("btn-warning");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (frm.doc.docstatus > 0) {
|
if (frm.doc.docstatus > 0) {
|
||||||
frm.add_custom_button(
|
frm.add_custom_button(
|
||||||
__("Ledger"),
|
__("Ledger"),
|
||||||
|
|||||||
@@ -77,31 +77,6 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying.
|
|||||||
erpnext.accounts.ledger_preview.show_stock_ledger_preview(this.frm);
|
erpnext.accounts.ledger_preview.show_stock_ledger_preview(this.frm);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.frm.doc.repost_required && this.frm.doc.docstatus === 1) {
|
|
||||||
this.frm.set_intro(
|
|
||||||
__(
|
|
||||||
"Accounting entries for this invoice need to be reposted. Please click on 'Repost' button to update."
|
|
||||||
)
|
|
||||||
);
|
|
||||||
this.frm
|
|
||||||
.add_custom_button(__("Repost Accounting Entries"), () => {
|
|
||||||
this.frm.call({
|
|
||||||
doc: this.frm.doc,
|
|
||||||
method: "repost_accounting_entries",
|
|
||||||
freeze: true,
|
|
||||||
freeze_message: __("Reposting..."),
|
|
||||||
callback: (r) => {
|
|
||||||
if (!r.exc) {
|
|
||||||
frappe.msgprint(__("Accounting Entries are reposted."));
|
|
||||||
me.frm.refresh();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.removeClass("btn-default")
|
|
||||||
.addClass("btn-warning");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!doc.is_return && doc.docstatus == 1 && doc.outstanding_amount != 0) {
|
if (!doc.is_return && doc.docstatus == 1 && doc.outstanding_amount != 0) {
|
||||||
if (doc.on_hold) {
|
if (doc.on_hold) {
|
||||||
this.frm.add_custom_button(
|
this.frm.add_custom_button(
|
||||||
|
|||||||
Reference in New Issue
Block a user