Merge pull request #25287 from prssanna/invoice-timesheet-fix

fix: declare data before assigning
This commit is contained in:
Prssanna Desai 2021-04-12 12:07:29 +05:30 committed by GitHub
commit 1fd1e0d4e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -916,7 +916,7 @@ frappe.ui.form.on('Sales Invoice Timesheet', {
},
callback: function(r, rt) {
if(r.message){
data = r.message;
let data = r.message;
frappe.model.set_value(cdt, cdn, "billing_hours", data.billing_hours);
frappe.model.set_value(cdt, cdn, "billing_amount", data.billing_amount);
frappe.model.set_value(cdt, cdn, "timesheet_detail", data.timesheet_detail);