fix: precision for interst

This commit is contained in:
barredterra 2021-12-29 00:13:23 +01:00 committed by marination
parent ccefe96665
commit 4911c3b5b7

View File

@ -212,7 +212,7 @@ frappe.ui.form.on("Dunning", {
calculate_interest: function (frm) {
frm.doc.overdue_payments.forEach((row) => {
const interest_per_day = frm.doc.rate_of_interest / 100 / 365;
const interest = flt((interest_per_day * row.overdue_days * row.outstanding), precision("interest"));
const interest = flt((interest_per_day * row.overdue_days * row.outstanding), precision("interest", row));
frappe.model.set_value(row.doctype, row.name, "interest", interest);
});
},