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

OleksandrSobol committed Nov 9, 2020 at 18:09 UTC 5ce4fe740759004262c7407d8ffc9a5c84923edc
1 file changed +2 -2
lib/entities/format_amount.dart
+2 -2
@@ -1,7 +1,7 @@
1 String formatAmount(String amount) {
2 - if (!amount.contains('.')) {
2 + if ((!amount.contains('.'))&&(!amount.contains(','))) {
3 return amount + '.00';
4 - } else if (amount.endsWith('.')) {
4 + } else if ((amount.endsWith('.'))||(amount.endsWith(','))) {
5 return amount + '00';
6 }
7 return amount;