mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-18 00:55:02 +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(
|
||||
__("Recalculate Costing and Billing"),
|
||||
__("Update Costing and Billing"),
|
||||
() => {
|
||||
frm.events.recalculate_costing_and_billing(frm);
|
||||
frm.events.update_costing_and_billing(frm);
|
||||
},
|
||||
__("Actions")
|
||||
);
|
||||
@@ -129,12 +129,12 @@ frappe.ui.form.on("Project", {
|
||||
}
|
||||
},
|
||||
|
||||
recalculate_costing_and_billing: function (frm) {
|
||||
update_costing_and_billing: function (frm) {
|
||||
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 },
|
||||
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) {
|
||||
if (r && !r.exc) {
|
||||
frappe.msgprint(__("Costing and Billing fields has been updated"));
|
||||
|
||||
@@ -749,7 +749,7 @@ def calculate_total_purchase_cost(project: str | None = None):
|
||||
|
||||
|
||||
@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.update_costing()
|
||||
project.db_update()
|
||||
|
||||
Reference in New Issue
Block a user