From 5ce4fe740759004262c7407d8ffc9a5c84923edc Mon Sep 17 00:00:00 2001 From: OleksandrSobol Date: Mon, 9 Nov 2020 18:09:04 +0200 Subject: [PATCH] CAKE-160 | added to format_amount.dart case when amount contains ',' symbol --- lib/entities/format_amount.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/entities/format_amount.dart b/lib/entities/format_amount.dart index 88e8c1651..7dd6c0c8a 100644 --- a/lib/entities/format_amount.dart +++ b/lib/entities/format_amount.dart @@ -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;