feat: payment split

This commit is contained in:
efrilm
2025-08-07 14:48:59 +07:00
parent 9d78c9dcce
commit ffe076e120
7 changed files with 325 additions and 46 deletions
@@ -760,7 +760,11 @@ class _SplitBillPageState extends State<SplitBillPage> {
log("Split Order: ${splitItems.length}");
// Navigate to PaymentPage with the split order
context.push(PaymentPage(order: splitOrder));
context.push(PaymentPage(
order: splitOrder,
isSplit: true,
splitType: 'ITEM',
));
} else {
AppFlushbar.showError(context, "Pilih minimal satu produk untuk split");
}
@@ -781,7 +785,13 @@ class _SplitBillPageState extends State<SplitBillPage> {
);
// Navigate to PaymentPage with the split order
context.push(PaymentPage(order: splitOrder));
context.push(
PaymentPage(
order: splitOrder,
isSplit: true,
splitType: 'AMOUNT',
),
);
} else if (splitAmount > totalAmount) {
AppFlushbar.showError(
context, "Jumlah split tidak boleh melebihi total bill");