split bill
This commit is contained in:
@@ -488,6 +488,12 @@ class _SplitBillRightPanelState extends State<SplitBillRightPanel> {
|
||||
}
|
||||
|
||||
void _confirmSplit() {
|
||||
if (widget.state.customerName == '' || widget.state.customer == null) {
|
||||
AppFlushbar.showError(context, 'Nama Pelanggan harus diisi');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (widget.state.splitType.isItem) {
|
||||
int splitTotal = widget.state.totalAmount;
|
||||
if (splitTotal > 0) {
|
||||
@@ -510,6 +516,9 @@ class _SplitBillRightPanelState extends State<SplitBillRightPanel> {
|
||||
|
||||
context.router.push(
|
||||
PaymentRoute(
|
||||
isSplit: true,
|
||||
splitType: widget.state.splitType,
|
||||
customerId: widget.state.customer?.id,
|
||||
order: widget.state.order.copyWith(
|
||||
orderItems: splitItems,
|
||||
subtotal: splitTotal,
|
||||
@@ -528,6 +537,9 @@ class _SplitBillRightPanelState extends State<SplitBillRightPanel> {
|
||||
widget.state.totalAmount <= totalAmount) {
|
||||
context.router.push(
|
||||
PaymentRoute(
|
||||
isSplit: true,
|
||||
splitType: widget.state.splitType,
|
||||
customerId: widget.state.customer?.id,
|
||||
order: widget.state.order.copyWith(
|
||||
subtotal: widget.state.totalAmount,
|
||||
totalAmount: widget.state.totalAmount,
|
||||
|
||||
Reference in New Issue
Block a user