fix: print split bill
This commit is contained in:
@@ -246,15 +246,16 @@ class _SalesPageState extends State<SalesPage> {
|
||||
),
|
||||
],
|
||||
if (widget.status == 'completed')
|
||||
Button.outlined(
|
||||
onPressed: () {
|
||||
context.push(RefundPage(
|
||||
selectedOrder: orderDetail!,
|
||||
));
|
||||
},
|
||||
label: 'Refund',
|
||||
icon: Icon(Icons.autorenew),
|
||||
),
|
||||
if (orderDetail?.isRefund == false)
|
||||
Button.outlined(
|
||||
onPressed: () {
|
||||
context.push(RefundPage(
|
||||
selectedOrder: orderDetail!,
|
||||
));
|
||||
},
|
||||
label: 'Refund',
|
||||
icon: Icon(Icons.autorenew),
|
||||
),
|
||||
],
|
||||
),
|
||||
Expanded(
|
||||
|
||||
@@ -932,7 +932,7 @@ class _SplitBillPageState extends State<SplitBillPage> {
|
||||
Order splitOrder = Order(
|
||||
id: widget.order.id,
|
||||
orderNumber: widget.order.orderNumber,
|
||||
orderItems: getOrderItemPending(), // Keep all items for reference
|
||||
orderItems: [], // Keep all items for reference
|
||||
subtotal: splitAmount,
|
||||
totalAmount: splitAmount,
|
||||
taxAmount: 0, // You might want to calculate proportional values
|
||||
|
||||
@@ -1012,6 +1012,7 @@ class _SuccessOrderPageState extends State<SuccessOrderPage>
|
||||
: widget.order.totalAmount ?? 0,
|
||||
kembalian: widget.nominalBayar -
|
||||
(widget.order.totalAmount ?? 0),
|
||||
productQuantity: widget.productQuantity,
|
||||
);
|
||||
onPrint(
|
||||
context,
|
||||
|
||||
@@ -798,6 +798,7 @@ class _SuccessPaymentPageState extends State<SuccessPaymentPage> {
|
||||
: order.totalAmount ?? 0,
|
||||
kembalian:
|
||||
widget.nominalBayar - (order.totalAmount ?? 0),
|
||||
productQuantity: widget.productQuantity,
|
||||
);
|
||||
},
|
||||
child: const Row(
|
||||
|
||||
Reference in New Issue
Block a user