Double euro symbol
Hi,
I have a little problem. I use following script to calculate costs.
//Calculate Consulting
var total = 0;
var rows = fd.relatedItems(4).data('ctx').ListData.Row;
rows.forEach(function(item) {
total += parseFloat(item['Kosten.'])
total_overall += parseFloat(item['Kosten.'])
});
fd.field('Kosten_x0020_Beratungsaufwand_x0').value(Number(total.toFixed(2)).toLocaleString("de-DE", {style: "currency", currency: "EUR"}) + ' €');
The script is okay but two Euro symbols are displayed in the field.
Can you help?
Best wishes
Tom
I have a little problem. I use following script to calculate costs.
//Calculate Consulting
var total = 0;
var rows = fd.relatedItems(4).data('ctx').ListData.Row;
rows.forEach(function(item) {
total += parseFloat(item['Kosten.'])
total_overall += parseFloat(item['Kosten.'])
});
fd.field('Kosten_x0020_Beratungsaufwand_x0').value(Number(total.toFixed(2)).toLocaleString("de-DE", {style: "currency", currency: "EUR"}) + ' €');
The script is okay but two Euro symbols are displayed in the field.
Can you help?
Best wishes
Tom
Hello TWendt,
toLocaleString method adds currency symbol when converting number so there is no need to append the euro symbol.
toLocaleString method adds currency symbol when converting number so there is no need to append the euro symbol.
Code: Select all
fd.field('Kosten_x0020_Beratungsaufwand_x0').value(Number(total.toFixed(2)).toLocaleString("de-DE", {style: "currency", currency: "EUR"}));
-
- Information
-
Who is online
Users browsing this forum: No registered users and 25 guests