perbaikan on possale string 1
This commit is contained in:
@@ -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,
|
||||
),
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user