print receipt
This commit is contained in:
@@ -75,6 +75,92 @@ class Order with _$Order {
|
||||
splitType: '',
|
||||
refundReason: '',
|
||||
);
|
||||
|
||||
factory Order.mockOrder() => Order(
|
||||
id: 'ORD-001',
|
||||
orderNumber: 'A-1001',
|
||||
outletId: 'OUTLET-001',
|
||||
userId: 'USER-001',
|
||||
tableNumber: 'T01',
|
||||
orderType: 'Dine In',
|
||||
status: 'Completed',
|
||||
subtotal: 150000,
|
||||
taxAmount: 15000,
|
||||
discountAmount: 5000,
|
||||
totalAmount: 160000,
|
||||
totalCost: 100000,
|
||||
remainingAmount: 0,
|
||||
paymentStatus: 'Paid',
|
||||
refundAmount: 0,
|
||||
refundReason: '',
|
||||
isVoid: false,
|
||||
isRefund: false,
|
||||
notes: 'Customer requested less sugar',
|
||||
metadata: {'source': 'POS', 'device': 'iPad', 'customer_name': "John Doe"},
|
||||
createdAt: DateTime.now().subtract(const Duration(hours: 1)),
|
||||
updatedAt: DateTime.now(),
|
||||
orderItems: [
|
||||
OrderItem(
|
||||
id: 'ITEM-001',
|
||||
orderId: 'ORD-001',
|
||||
productId: 'PROD-001',
|
||||
productName: 'Cappuccino',
|
||||
productVariantId: 'VAR-001',
|
||||
productVariantName: 'Hot',
|
||||
quantity: 2,
|
||||
unitPrice: 25000,
|
||||
totalPrice: 50000,
|
||||
modifiers: [
|
||||
{'name': 'Extra Shot', 'price': 5000},
|
||||
],
|
||||
notes: 'No sugar',
|
||||
status: 'Served',
|
||||
createdAt: DateTime.now().subtract(const Duration(hours: 1)),
|
||||
updatedAt: DateTime.now(),
|
||||
printerType: 'Barista',
|
||||
paidQuantity: 2,
|
||||
),
|
||||
OrderItem(
|
||||
id: 'ITEM-002',
|
||||
orderId: 'ORD-001',
|
||||
productId: 'PROD-002',
|
||||
productName: 'Spaghetti Carbonara',
|
||||
productVariantId: 'VAR-002',
|
||||
productVariantName: '',
|
||||
quantity: 1,
|
||||
unitPrice: 55000,
|
||||
totalPrice: 55000,
|
||||
modifiers: [],
|
||||
notes: '',
|
||||
status: 'Served',
|
||||
createdAt: DateTime.now().subtract(const Duration(hours: 1)),
|
||||
updatedAt: DateTime.now(),
|
||||
printerType: 'Kitchen',
|
||||
paidQuantity: 1,
|
||||
),
|
||||
],
|
||||
payments: [
|
||||
Payment(
|
||||
id: 'PAY-001',
|
||||
orderId: 'ORD-001',
|
||||
paymentMethodId: 'PM-CASH',
|
||||
paymentMethodName: 'Cash',
|
||||
paymentMethodType: 'Cash',
|
||||
amount: 160000,
|
||||
status: 'Success',
|
||||
splitNumber: 1,
|
||||
splitTotal: 1,
|
||||
splitDescription: 'Full payment by cash',
|
||||
refundAmount: 0,
|
||||
metadata: {'cashier': 'Efril', 'device': 'POS iPad'},
|
||||
createdAt: DateTime.now().subtract(const Duration(minutes: 45)),
|
||||
updatedAt: DateTime.now(),
|
||||
),
|
||||
],
|
||||
totalPaid: 160000,
|
||||
paymentCount: 1,
|
||||
splitType: 'Single',
|
||||
);
|
||||
}
|
||||
|
||||
@freezed
|
||||
|
||||
Reference in New Issue
Block a user