perbaikan on possale string 1

This commit is contained in:
2026-04-18 22:45:08 +07:00
parent d912b1f63a
commit b1781625f2
2693 changed files with 366 additions and 6459 deletions

View File

@@ -206,15 +206,15 @@ class _ProductDetailsState extends ConsumerState<ProductDetails> {
: '0'),
_lang.mrpOrSalePrice: (snapshot.stocks?.isNotEmpty == true &&
snapshot.stocks!.first.productSalePrice != null
? '$currency${snapshot.stocks!.first.productSalePrice}'
? '$currency${formatWithSeparator(snapshot.stocks!.first.productSalePrice!)}'
: '0'),
_lang.wholeSalePrice: (snapshot.stocks?.isNotEmpty == true &&
snapshot.stocks!.first.productWholeSalePrice != null
? '$currency${snapshot.stocks!.first.productWholeSalePrice}'
? '$currency${formatWithSeparator(snapshot.stocks!.first.productWholeSalePrice!)}'
: '0'),
_lang.dealerPrice: (snapshot.stocks?.isNotEmpty == true &&
snapshot.stocks!.first.productDealerPrice != null
? '$currency${snapshot.stocks?.first.productDealerPrice}'
? '$currency${formatWithSeparator(snapshot.stocks!.first.productDealerPrice!)}'
: '0'),
_lang.manufactureDate:
(snapshot.stocks?.isNotEmpty == true && snapshot.stocks!.first.mfgDate != null)
@@ -279,7 +279,7 @@ class _ProductDetailsState extends ConsumerState<ProductDetails> {
.toStringAsFixed(2)
: 'n/a',
'${_lang.profitMargin} (%)': '${snapshot.profitPercent ?? 0}%',
_lang.sellingPrice: '$currency${snapshot.productSalePrice ?? 0}',
_lang.sellingPrice: '$currency${formatWithSeparator(snapshot.productSalePrice ?? 0)}',
_lang.warranty:
'${snapshot.warrantyGuaranteeInfo?.warrantyDuration?.toString() ?? ''} ${snapshot.warrantyGuaranteeInfo?.warrantyUnit?.toString() ?? 'n/a'}',
_lang.guarantee:
@@ -337,7 +337,7 @@ class _ProductDetailsState extends ConsumerState<ProductDetails> {
),
Flexible(
child: Text(
'${_lang.sale}: $currency${snapshot.stocks?[index].productSalePrice ?? '0'}',
'${_lang.sale}: $currency${formatWithSeparator(snapshot.stocks?[index].productSalePrice ?? 0)}',
style: theme.textTheme.bodyMedium?.copyWith(
color: kTitleColor,
fontWeight: FontWeight.w400,
@@ -511,7 +511,7 @@ class _ProductDetailsState extends ConsumerState<ProductDetails> {
),
),
Text(
'$currency${combo.stock?.productSalePrice ?? 0}',
'$currency${formatWithSeparator(combo.stock?.productSalePrice ?? 0)}',
style: theme.textTheme.titleSmall?.copyWith(
fontWeight: FontWeight.w500,
),

View File

@@ -345,8 +345,8 @@ class _ProductListState extends ConsumerState<ProductList> {
),
Text(
product.productType == 'combo'
? '$currency${product.productSalePrice.toString()}'
: "$currency${product.stocks != null && product.stocks!.isNotEmpty && product.stocks!.first.productSalePrice != null ? product.stocks!.first.productSalePrice : '0'}",
? '$currency${formatWithSeparator(product.productSalePrice ?? 0)}'
: "$currency${formatWithSeparator(product.stocks != null && product.stocks!.isNotEmpty && product.stocks!.first.productSalePrice != null ? product.stocks!.first.productSalePrice : 0)}",
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: _theme.textTheme.titleMedium?.copyWith(