mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-19 04:59:18 +00:00
chore: rename recalculating to updating
(cherry picked from commit f6e16c1180)
This commit is contained in:
@@ -88,9 +88,9 @@ frappe.ui.form.on("Project", {
|
|||||||
);
|
);
|
||||||
|
|
||||||
frm.add_custom_button(
|
frm.add_custom_button(
|
||||||
__("Recalculate Costing and Billing"),
|
__("Update Costing and Billing"),
|
||||||
() => {
|
() => {
|
||||||
frm.events.recalculate_costing_and_billing(frm);
|
frm.events.update_costing_and_billing(frm);
|
||||||
},
|
},
|
||||||
__("Actions")
|
__("Actions")
|
||||||
);
|
);
|
||||||
@@ -129,12 +129,12 @@ frappe.ui.form.on("Project", {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
recalculate_costing_and_billing: function (frm) {
|
update_costing_and_billing: function (frm) {
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: "erpnext.projects.doctype.project.project.recalculate_costing_and_billing",
|
method: "erpnext.projects.doctype.project.project.update_costing_and_billing",
|
||||||
args: { project: frm.doc.name },
|
args: { project: frm.doc.name },
|
||||||
freeze: true,
|
freeze: true,
|
||||||
freeze_message: __("Recalculating Costing and Billing fields against this Project..."),
|
freeze_message: __("Updating Costing and Billing fields against this Project..."),
|
||||||
callback: function (r) {
|
callback: function (r) {
|
||||||
if (r && !r.exc) {
|
if (r && !r.exc) {
|
||||||
frappe.msgprint(__("Costing and Billing fields has been updated"));
|
frappe.msgprint(__("Costing and Billing fields has been updated"));
|
||||||
|
|||||||
@@ -749,7 +749,7 @@ def calculate_total_purchase_cost(project: str | None = None):
|
|||||||
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def recalculate_costing_and_billing(project: str | None = None):
|
def update_costing_and_billing(project: str | None = None):
|
||||||
project = frappe.get_doc("Project", project)
|
project = frappe.get_doc("Project", project)
|
||||||
project.update_costing()
|
project.update_costing()
|
||||||
project.db_update()
|
project.db_update()
|
||||||
|
|||||||
Reference in New Issue
Block a user