diff --git a/imixs-office-workflow-app/src/main/webapp/pages/workitems/forms/sub_orderitems_edit.xhtml b/imixs-office-workflow-app/src/main/webapp/pages/workitems/forms/sub_orderitems_edit.xhtml index 8129c00d..c574ab17 100644 --- a/imixs-office-workflow-app/src/main/webapp/pages/workitems/forms/sub_orderitems_edit.xhtml +++ b/imixs-office-workflow-app/src/main/webapp/pages/workitems/forms/sub_orderitems_edit.xhtml @@ -1,24 +1,23 @@ - - - - + + + + - + - + @@ -27,36 +26,43 @@ - + - - - - + + + + - - - - @@ -76,7 +82,7 @@ - + @@ -92,12 +98,12 @@ /*-1) { - currency=currency.trim(); - //remove . - currency = currency.replace('.', ''); - // replace , - currency = currency.replace(',', '.'); - } - return currency; + currency = currency.replace(/\./g, ''); + currency = currency.replace(/\,/g, '.'); + return currency * 1; // convert to number } - - function convertToCurrency(sum) { - sum = ("" + sum).replace('.', ','); - if (sum.indexOf(',') == -1) - sum = sum + ",00"; - if (sum.indexOf(',') == sum.length - 2) - sum = sum + "0"; - return sum; + /* format 1000 into 1.000,00 */ + function convertToCurrency(number) { + var splitNum; + //number = Math.abs(number); + number = number.toFixed(2); + splitNum = number.split('.'); + splitNum[0] = splitNum[0].replace(/\B(?=(\d{3})+(?!\d))/g, "."); + return splitNum.join(","); } + + /*]]>*/
#{resourceBundleHandler.findMessage('orderitems.pos')}#{resourceBundleHandler.findMessage('orderitems.description')} *#{resourceBundleHandler.findMessage('orderitems.description')} * #{resourceBundleHandler.findMessage('orderitems.unit')} #{resourceBundleHandler.findMessage('orderitems.quantity')} #{resourceBundleHandler.findMessage('orderitems.price')}#{resourceBundleHandler.findMessage('orderitems.total')} *#{resourceBundleHandler.findMessage('orderitems.total')} *
+ + + + + + + + + + + + + - - + + - - + +