fix: print
This commit is contained in:
@@ -1005,10 +1005,11 @@ class _SuccessOrderPageState extends State<SuccessOrderPage>
|
||||
context,
|
||||
order: widget.order,
|
||||
paymentMethod: widget.paymentMethod,
|
||||
nominalBayar: widget.nominalBayar,
|
||||
nominalBayar: widget.paymentMethod == "Cash"
|
||||
? widget.nominalBayar
|
||||
: widget.order.totalAmount ?? 0,
|
||||
kembalian: widget.nominalBayar -
|
||||
(widget.order.totalAmount ?? 0),
|
||||
taxPercentage: widget.taxPercentage,
|
||||
);
|
||||
onPrint(
|
||||
context,
|
||||
|
||||
@@ -14,8 +14,15 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
class SuccessPaymentPage extends StatefulWidget {
|
||||
final List<ProductQuantity> productQuantity;
|
||||
final PaymentData payment;
|
||||
const SuccessPaymentPage(
|
||||
{super.key, required this.payment, required this.productQuantity});
|
||||
final String paymentMethod;
|
||||
final int nominalBayar;
|
||||
const SuccessPaymentPage({
|
||||
super.key,
|
||||
required this.payment,
|
||||
required this.productQuantity,
|
||||
required this.paymentMethod,
|
||||
required this.nominalBayar,
|
||||
});
|
||||
|
||||
@override
|
||||
State<SuccessPaymentPage> createState() => _SuccessPaymentPageState();
|
||||
@@ -781,10 +788,15 @@ class _SuccessPaymentPageState extends State<SuccessPaymentPage> {
|
||||
child: InkWell(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
onTap: () async {
|
||||
onPrint(
|
||||
onPrintRecipt(
|
||||
context,
|
||||
productQuantity: widget.productQuantity,
|
||||
order: order,
|
||||
paymentMethod: widget.paymentMethod,
|
||||
nominalBayar: widget.paymentMethod == "Cash"
|
||||
? widget.nominalBayar
|
||||
: order.totalAmount ?? 0,
|
||||
kembalian:
|
||||
widget.nominalBayar - (order.totalAmount ?? 0),
|
||||
);
|
||||
},
|
||||
child: const Row(
|
||||
|
||||
Reference in New Issue
Block a user