fix: order and add to order
This commit is contained in:
@@ -355,7 +355,10 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
|
||||
(previousValue, element) =>
|
||||
previousValue +
|
||||
(element.product.price! *
|
||||
element.quantity),
|
||||
element.quantity) +
|
||||
(element.variant
|
||||
?.priceModifier ??
|
||||
0),
|
||||
));
|
||||
return Text(
|
||||
price.currencyFormatRp,
|
||||
@@ -500,7 +503,9 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
|
||||
(previousValue, element) =>
|
||||
previousValue +
|
||||
(element.product.price! *
|
||||
element.quantity),
|
||||
element.quantity) +
|
||||
(element.variant?.priceModifier ??
|
||||
0),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1074,7 +1079,7 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
|
||||
orderType: orderType,
|
||||
paymentMethod:
|
||||
selectedPaymentMethod!,
|
||||
table: widget.table!,
|
||||
table: widget.table,
|
||||
customer:
|
||||
selectedCustomer,
|
||||
),
|
||||
|
||||
@@ -429,8 +429,10 @@ class _HomePageState extends State<HomePage> {
|
||||
}
|
||||
return products
|
||||
.map((e) =>
|
||||
e.product.price! *
|
||||
e.quantity)
|
||||
(e.product.price! *
|
||||
e.quantity) +
|
||||
(e.variant?.priceModifier ??
|
||||
0))
|
||||
.reduce((value, element) =>
|
||||
value + element);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user