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:
parent
5f4a9ceeb1
commit
ed16c47b42
@ -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;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user