Output of variables in PDF with decimal dot instead of decimal comma #1874

This commit is contained in:
Hillel Coren 2018-02-13 22:13:49 +02:00
parent c12ef4bd42
commit b6df2a3eba
3 changed files with 8 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -352,6 +352,11 @@ NINJA.decodeJavascript = function(invoice, javascript)
var value = getDescendantProp(invoice, field) || ' ';
value = doubleDollarSign(value) + '';
value = value.replace(/\n/g, "\\n").replace(/\r/g, "\\r");
if (['amount', 'partial', 'client.balance', 'client.paid_to_date'].indexOf(field) >= 0) {
value = formatMoneyInvoice(value, invoice);
}
javascript = javascript.replace(match, '"'+value+'"');
}
}