update denomination money

This commit is contained in:
2026-03-28 09:24:56 +07:00
parent 2fb16411bf
commit 517ed3bea3
8438 changed files with 56 additions and 63441 deletions

View File

@@ -40,6 +40,7 @@ class MultiPaymentWidget extends ConsumerStatefulWidget {
final bool showWalletOption;
final bool hideAddButton;
final bool disableDropdown;
final bool showCashDenomination;
final VoidCallback? onPaymentListChanged;
final List<PaymentsTransaction>? initialTransactions;
@@ -51,6 +52,7 @@ class MultiPaymentWidget extends ConsumerStatefulWidget {
this.showWalletOption = false,
this.hideAddButton = false,
this.disableDropdown = false,
this.showCashDenomination = false,
this.onPaymentListChanged,
this.initialTransactions,
});
@@ -345,6 +347,53 @@ class MultiPaymentWidgetState extends ConsumerState<MultiPaymentWidget> {
),
),
),
if (payment.type == 'Cash' && widget.showCashDenomination)
Padding(
padding: const EdgeInsets.only(top: 15.0),
child: Wrap(
spacing: 10,
runSpacing: 10,
children: [
...[100000, 50000, 20000, 10000, 5000, 2000, 1000, 500].map((amount) {
return InkWell(
onTap: () {
double currentAmount = double.tryParse(payment.amountController.text) ?? 0.0;
payment.amountController.text = (currentAmount + amount).toStringAsFixed(0);
},
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
decoration: BoxDecoration(
border: Border.all(color: kMainColor),
borderRadius: BorderRadius.circular(6),
color: kMainColor.withOpacity(0.1),
),
child: Text(
amount.toString(),
style: const TextStyle(color: kMainColor, fontWeight: FontWeight.bold),
),
),
);
}),
InkWell(
onTap: () {
payment.amountController.text = '0';
},
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
decoration: BoxDecoration(
border: Border.all(color: Colors.red),
borderRadius: BorderRadius.circular(6),
color: Colors.red.withOpacity(0.1),
),
child: const Text(
'Clear',
style: TextStyle(color: Colors.red, fontWeight: FontWeight.bold),
),
),
),
],
),
),
const SizedBox(height: 15),
],
);