mirror of
https://github.com/frappe/books.git
synced 2024-12-23 19:39:07 +00:00
fix: better message on format error
This commit is contained in:
parent
8fcfd94890
commit
021d1d2a39
@ -63,7 +63,14 @@ function getCurrency(df, doc) {
|
||||
|
||||
function formatCurrency(value, df, doc) {
|
||||
const currency = getCurrency(df, doc);
|
||||
const valueString = numberFormat.formatCurrency(value);
|
||||
let valueString;
|
||||
try {
|
||||
valueString = numberFormat.formatCurrency(value);
|
||||
} catch (err) {
|
||||
err.message += ` value: '${value}', type: ${typeof value}`;
|
||||
console.error(df);
|
||||
throw err;
|
||||
}
|
||||
const currencySymbol = frappe.currencySymbols[currency];
|
||||
|
||||
if (currencySymbol) {
|
||||
|
Loading…
Reference in New Issue
Block a user