From 512ddc589f07cb9a938f0ef742db5a2e075ce55d Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 24 Aug 2021 22:00:32 +0530 Subject: [PATCH] fix: timesheet amount issue (#25993) (#26889) * fix: timesheet amount issue * fix: timesheet detail rate conversion * fix: condition to check timesheet currency * fix: removing console statement (cherry picked from commit a6aa6cd7d63eb426b986d995985985c2aae4f553) Co-authored-by: Anupam Kumar Co-authored-by: Nabin Hait --- erpnext/accounts/doctype/sales_invoice/sales_invoice.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index 2071827d994..d8dee99b992 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -443,6 +443,15 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends e this.frm.refresh_field("outstanding_amount"); this.frm.refresh_field("paid_amount"); this.frm.refresh_field("base_paid_amount"); + }, + + currency() { + this._super(); + $.each(cur_frm.doc.timesheets, function(i, d) { + let row = frappe.get_doc(d.doctype, d.name) + set_timesheet_detail_rate(row.doctype, row.name, cur_frm.doc.currency, row.timesheet_detail) + }); + calculate_total_billing_amount(cur_frm) } currency() {