2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00

fix: patch 0 for null currency values

This commit is contained in:
18alantom 2021-12-29 11:31:29 +05:30
parent 5f4a9ceeb1
commit ed16c47b42

View File

@ -29,10 +29,7 @@ export default async function execute() {
const rows = await frappe.db.knex(name);
const convertedRows = rows.map((row) => {
for (let field of fields) {
if (row[field] === null) {
continue;
}
row[field] = frappe.pesa(row[field]).store;
row[field] = frappe.pesa(row[field] ?? 0).store;
}
return row;
});