perbaikan on possale string 1
This commit is contained in:
@@ -264,7 +264,9 @@ class AddSalesScreenState extends ConsumerState<AddAndUpdatePurchaseScreen> {
|
||||
children: [
|
||||
Text(lang.S.of(context).dueAmount),
|
||||
Text(
|
||||
widget.customerModel?.due == null ? '$currency 0' : '$currency${widget.customerModel?.due}',
|
||||
widget.customerModel?.due == null
|
||||
? '$currency${formatWithSeparator(0)}'
|
||||
: '$currency${formatWithSeparator(widget.customerModel?.due ?? 0)}',
|
||||
style: const TextStyle(color: Color(0xFFFF8C34)),
|
||||
),
|
||||
],
|
||||
@@ -348,7 +350,7 @@ class AddSalesScreenState extends ConsumerState<AddAndUpdatePurchaseScreen> {
|
||||
title: Text(providerData.cartItemList[index].productName.toString()),
|
||||
subtitle: permissionService.hasPermission(Permit.purchasesPriceView.value)
|
||||
? Text(
|
||||
'${providerData.cartItemList[index].quantities} X ${providerData.cartItemList[index].productPurchasePrice} = ${formatPointNumber((providerData.cartItemList[index].quantities ?? 0) * (providerData.cartItemList[index].productPurchasePrice ?? 0))} ${providerData.cartItemList[index].productType == ProductType.variant.name ? "[${providerData.cartItemList[index].batchNumber.isEmptyOrNull ? 'N/A' : providerData.cartItemList[index].batchNumber}]" : ''}')
|
||||
'${providerData.cartItemList[index].quantities} X $currency${formatWithSeparator(providerData.cartItemList[index].productPurchasePrice ?? 0)} = $currency${formatWithSeparator((providerData.cartItemList[index].quantities ?? 0) * (providerData.cartItemList[index].productPurchasePrice ?? 0))} ${providerData.cartItemList[index].productType == ProductType.variant.name ? "[${providerData.cartItemList[index].batchNumber.isEmptyOrNull ? 'N/A' : providerData.cartItemList[index].batchNumber}]" : ''}')
|
||||
: null,
|
||||
trailing: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@@ -626,7 +628,7 @@ class AddSalesScreenState extends ConsumerState<AddAndUpdatePurchaseScreen> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
formatPointNumber(providerData.totalAmount),
|
||||
'$currency${formatWithSeparator(providerData.totalAmount)}',
|
||||
style: _theme.textTheme.titleSmall?.copyWith(
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
@@ -716,6 +718,7 @@ class AddSalesScreenState extends ConsumerState<AddAndUpdatePurchaseScreen> {
|
||||
hintStyle: _theme.textTheme.titleMedium?.copyWith(
|
||||
color: kPeraColor,
|
||||
),
|
||||
prefixText: discountType == 'Flat' ? '$currency ' : null,
|
||||
border: UnderlineInputBorder(borderSide: BorderSide(color: kBorder)),
|
||||
enabledBorder: UnderlineInputBorder(borderSide: BorderSide(color: kBorder)),
|
||||
focusedBorder: UnderlineInputBorder(),
|
||||
@@ -832,6 +835,7 @@ class AddSalesScreenState extends ConsumerState<AddAndUpdatePurchaseScreen> {
|
||||
hintStyle: _theme.textTheme.titleSmall?.copyWith(
|
||||
color: kPeraColor,
|
||||
),
|
||||
prefixText: '$currency ',
|
||||
border: UnderlineInputBorder(borderSide: BorderSide(color: kBorder)),
|
||||
enabledBorder: UnderlineInputBorder(borderSide: BorderSide(color: kBorder)),
|
||||
focusedBorder: UnderlineInputBorder(),
|
||||
@@ -870,6 +874,7 @@ class AddSalesScreenState extends ConsumerState<AddAndUpdatePurchaseScreen> {
|
||||
hintStyle: _theme.textTheme.titleSmall?.copyWith(
|
||||
color: kPeraColor,
|
||||
),
|
||||
prefixText: '$currency ',
|
||||
border: UnderlineInputBorder(borderSide: BorderSide(color: kBorder)),
|
||||
enabledBorder: UnderlineInputBorder(borderSide: BorderSide(color: kBorder)),
|
||||
focusedBorder: UnderlineInputBorder(),
|
||||
@@ -894,7 +899,7 @@ class AddSalesScreenState extends ConsumerState<AddAndUpdatePurchaseScreen> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
formatPointNumber(providerData.totalPayableAmount),
|
||||
'$currency${formatWithSeparator(providerData.totalPayableAmount)}',
|
||||
style: _theme.textTheme.titleSmall?.copyWith(
|
||||
color: kPeraColor,
|
||||
),
|
||||
@@ -930,6 +935,7 @@ class AddSalesScreenState extends ConsumerState<AddAndUpdatePurchaseScreen> {
|
||||
hintStyle: _theme.textTheme.titleSmall?.copyWith(
|
||||
color: kPeraColor,
|
||||
),
|
||||
prefixText: '$currency ',
|
||||
border: UnderlineInputBorder(borderSide: BorderSide(color: kBorder)),
|
||||
enabledBorder: UnderlineInputBorder(borderSide: BorderSide(color: kBorder)),
|
||||
focusedBorder: UnderlineInputBorder(),
|
||||
@@ -956,7 +962,7 @@ class AddSalesScreenState extends ConsumerState<AddAndUpdatePurchaseScreen> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
formatPointNumber(providerData.changeAmount),
|
||||
'$currency${formatWithSeparator(providerData.changeAmount)}',
|
||||
style: _theme.textTheme.titleSmall?.copyWith(
|
||||
color: kPeraColor,
|
||||
),
|
||||
@@ -982,7 +988,7 @@ class AddSalesScreenState extends ConsumerState<AddAndUpdatePurchaseScreen> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
formatPointNumber(providerData.dueAmount),
|
||||
'$currency${formatWithSeparator(providerData.dueAmount)}',
|
||||
style: _theme.textTheme.titleSmall?.copyWith(
|
||||
color: kPeraColor,
|
||||
),
|
||||
|
||||
@@ -31,9 +31,11 @@ class _BulkPurchaseUploaderState extends ConsumerState<BulkPurchaseUploader> {
|
||||
}
|
||||
|
||||
Future<void> createExcelFile() async {
|
||||
if (!await Permission.storage.request().isDenied) {
|
||||
EasyLoading.showError('Storage permission is required to create Excel file!');
|
||||
return;
|
||||
if (Platform.isAndroid || Platform.isIOS) {
|
||||
if (!await Permission.storage.request().isDenied) {
|
||||
EasyLoading.showError('Storage permission is required to create Excel file!');
|
||||
return;
|
||||
}
|
||||
}
|
||||
EasyLoading.show();
|
||||
final List<e.CellValue> excelData = [
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:mobile_pos/generated/l10n.dart' as lang;
|
||||
import 'package:nb_utils/nb_utils.dart';
|
||||
|
||||
import '../../GlobalComponents/glonal_popup.dart';
|
||||
import '../../constant.dart';
|
||||
import '../../constant.dart' as mainConstant;
|
||||
import '../../currency.dart';
|
||||
import '../../widgets/empty_widget/_empty_widget.dart';
|
||||
import '../Customers/Provider/customer_provider.dart';
|
||||
@@ -35,7 +35,7 @@ class _PurchaseContactsState extends State<PurchaseContacts> {
|
||||
return businessInfo.when(data: (details) {
|
||||
return GlobalPopup(
|
||||
child: Scaffold(
|
||||
backgroundColor: kWhite,
|
||||
backgroundColor: mainConstant.kWhite,
|
||||
resizeToAvoidBottomInset: true,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
@@ -60,7 +60,7 @@ class _PurchaseContactsState extends State<PurchaseContacts> {
|
||||
hintText: lang.S.of(context).search,
|
||||
prefixIcon: Icon(
|
||||
Icons.search,
|
||||
color: kGreyTextColor.withOpacity(0.5),
|
||||
color: mainConstant.kGreyTextColor.withOpacity(0.5),
|
||||
),
|
||||
),
|
||||
onChanged: (value) {
|
||||
@@ -116,7 +116,7 @@ class _PurchaseContactsState extends State<PurchaseContacts> {
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
'$currency${customer[index].due}',
|
||||
'$currency${mainConstant.formatWithSeparator(customer[index].due ?? 0)}',
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontSize: 16.0,
|
||||
),
|
||||
@@ -178,13 +178,13 @@ class _PurchaseContactsState extends State<PurchaseContacts> {
|
||||
}),
|
||||
),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
backgroundColor: kMainColor,
|
||||
backgroundColor: mainConstant.kMainColor,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
),
|
||||
child: const Icon(
|
||||
Icons.add,
|
||||
color: kWhite,
|
||||
color: mainConstant.kWhite,
|
||||
),
|
||||
onPressed: () async {
|
||||
const AddParty().launch(context);
|
||||
|
||||
Reference in New Issue
Block a user