CAKE-160 | added to format_amount.dart case when amount contains ',' symbol

This commit is contained in:
OleksandrSobol 2020-11-09 18:09:04 +02:00
parent b17e7744c6
commit 5ce4fe7407

View file

@ -1,7 +1,7 @@
String formatAmount(String amount) {
if (!amount.contains('.')) {
if ((!amount.contains('.'))&&(!amount.contains(','))) {
return amount + '.00';
} else if (amount.endsWith('.')) {
} else if ((amount.endsWith('.'))||(amount.endsWith(','))) {
return amount + '00';
}
return amount;