fix printer
This commit is contained in:
@@ -30,6 +30,9 @@ class PrintUi {
|
||||
outletName: outlet.name,
|
||||
address: outlet.address,
|
||||
phoneNumber: outlet.phoneNumber,
|
||||
fontType: PosFontType.fontA,
|
||||
width: PosTextSize.size1,
|
||||
height: PosTextSize.size1,
|
||||
);
|
||||
|
||||
bytes += builder.orderInfo(
|
||||
@@ -38,9 +41,14 @@ class PrintUi {
|
||||
cashierName: cashierName,
|
||||
paymentMethod: order.payments.last.paymentMethodName,
|
||||
tableNumber: order.tableNumber,
|
||||
fontType: PosFontType.fontA,
|
||||
width: PosTextSize.size1,
|
||||
height: PosTextSize.size1,
|
||||
);
|
||||
|
||||
bytes += builder.orderType(order.orderType);
|
||||
bytes += builder.orderType(order.orderType, fontType: PosFontType.fontA,
|
||||
width: PosTextSize.size1,
|
||||
height: PosTextSize.size1,);
|
||||
|
||||
bytes += builder.emptyLines(1);
|
||||
|
||||
@@ -52,6 +60,9 @@ class PrintUi {
|
||||
totalPrice: item.totalPrice.currencyFormatRpV2,
|
||||
variantName: item.productVariantName,
|
||||
notes: item.notes,
|
||||
fontType: PosFontType.fontA,
|
||||
width: PosTextSize.size1,
|
||||
height: PosTextSize.size1,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -61,6 +72,9 @@ class PrintUi {
|
||||
discount: order.discountAmount.currencyFormatRpV2,
|
||||
total: order.totalAmount.currencyFormatRpV2,
|
||||
paid: order.totalPaid.currencyFormatRpV2,
|
||||
fontType: PosFontType.fontA,
|
||||
width: PosTextSize.size1,
|
||||
height: PosTextSize.size1,
|
||||
);
|
||||
|
||||
bytes += builder.footer();
|
||||
@@ -90,12 +104,7 @@ class PrintUi {
|
||||
|
||||
// Header
|
||||
bytes += builder.textCenter('Table Checker', bold: true);
|
||||
bytes += builder.separator();
|
||||
bytes += builder.textCenter(
|
||||
'Table : ${order.tableNumber.isNotEmpty ? order.tableNumber : '-'}',
|
||||
bold: true,
|
||||
);
|
||||
bytes += builder.separator();
|
||||
bytes += builder.tableName(order.tableNumber.isNotEmpty ? order.tableNumber : '-', height: PosTextSize.size3, width: PosTextSize.size3);
|
||||
|
||||
// Order info — label : value, left aligned
|
||||
bytes += builder.orderInfoSimple(
|
||||
@@ -301,6 +310,9 @@ class PrintUi {
|
||||
outletName: outlet.name,
|
||||
address: outlet.address,
|
||||
phoneNumber: outlet.phoneNumber,
|
||||
fontType: PosFontType.fontA,
|
||||
width: PosTextSize.size1,
|
||||
height: PosTextSize.size1,
|
||||
);
|
||||
|
||||
bytes += builder.orderInfo(
|
||||
@@ -311,9 +323,14 @@ class PrintUi {
|
||||
? null
|
||||
: order.payments.last.paymentMethodName,
|
||||
tableNumber: order.tableNumber,
|
||||
fontType: PosFontType.fontA,
|
||||
width: PosTextSize.size1,
|
||||
height: PosTextSize.size1,
|
||||
);
|
||||
|
||||
bytes += builder.orderType(order.orderType);
|
||||
bytes += builder.orderType(order.orderType, fontType: PosFontType.fontA,
|
||||
width: PosTextSize.size1,
|
||||
height: PosTextSize.size1,);
|
||||
|
||||
bytes += builder.emptyLines(1);
|
||||
|
||||
@@ -325,6 +342,9 @@ class PrintUi {
|
||||
totalPrice: item.totalPrice.currencyFormatRpV2,
|
||||
variantName: item.productVariantName,
|
||||
notes: item.notes,
|
||||
fontType: PosFontType.fontA,
|
||||
width: PosTextSize.size1,
|
||||
height: PosTextSize.size1,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -334,6 +354,9 @@ class PrintUi {
|
||||
discount: order.discountAmount.currencyFormatRpV2,
|
||||
total: order.totalAmount.currencyFormatRpV2,
|
||||
paid: order.totalPaid.currencyFormatRpV2,
|
||||
fontType: PosFontType.fontA,
|
||||
width: PosTextSize.size1,
|
||||
height: PosTextSize.size1,
|
||||
);
|
||||
|
||||
bytes += builder.footer(message: 'Kasir');
|
||||
@@ -365,6 +388,9 @@ class PrintUi {
|
||||
outletName: outlet.name,
|
||||
address: outlet.address,
|
||||
phoneNumber: outlet.phoneNumber,
|
||||
fontType: PosFontType.fontA,
|
||||
width: PosTextSize.size1,
|
||||
height: PosTextSize.size1,
|
||||
);
|
||||
|
||||
bytes += builder.dateTime(DateTime.now());
|
||||
@@ -377,9 +403,14 @@ class PrintUi {
|
||||
? null
|
||||
: order.payments.last.paymentMethodName,
|
||||
tableNumber: order.tableNumber,
|
||||
fontType: PosFontType.fontA,
|
||||
width: PosTextSize.size1,
|
||||
height: PosTextSize.size1,
|
||||
);
|
||||
|
||||
bytes += builder.orderType('Void');
|
||||
bytes += builder.orderType('Void', fontType: PosFontType.fontA,
|
||||
width: PosTextSize.size1,
|
||||
height: PosTextSize.size1,);
|
||||
|
||||
bytes += builder.emptyLines(1);
|
||||
|
||||
@@ -391,6 +422,9 @@ class PrintUi {
|
||||
totalPrice: item.totalPrice.currencyFormatRpV2,
|
||||
variantName: item.productVariantName,
|
||||
notes: item.notes,
|
||||
fontType: PosFontType.fontA,
|
||||
width: PosTextSize.size1,
|
||||
height: PosTextSize.size1,
|
||||
);
|
||||
}
|
||||
bytes += builder.summary(
|
||||
@@ -399,6 +433,9 @@ class PrintUi {
|
||||
discount: order.discountAmount.currencyFormatRpV2,
|
||||
total: order.totalAmount.currencyFormatRpV2,
|
||||
paid: order.totalPaid.currencyFormatRpV2,
|
||||
fontType: PosFontType.fontA,
|
||||
width: PosTextSize.size1,
|
||||
height: PosTextSize.size1,
|
||||
);
|
||||
|
||||
bytes += builder.footer(message: 'Kasir');
|
||||
@@ -430,9 +467,14 @@ class PrintUi {
|
||||
outletName: outlet.name,
|
||||
address: outlet.address,
|
||||
phoneNumber: outlet.phoneNumber,
|
||||
fontType: PosFontType.fontA,
|
||||
width: PosTextSize.size1,
|
||||
height: PosTextSize.size1,
|
||||
);
|
||||
|
||||
bytes += builder.dateTime(DateTime.now());
|
||||
bytes += builder.dateTime(DateTime.now(), fontType: PosFontType.fontA,
|
||||
width: PosTextSize.size1,
|
||||
height: PosTextSize.size1,);
|
||||
|
||||
bytes += builder.orderInfo(
|
||||
orderNumber: order.orderNumber,
|
||||
@@ -442,13 +484,21 @@ class PrintUi {
|
||||
? null
|
||||
: order.payments.last.paymentMethodName,
|
||||
tableNumber: order.tableNumber,
|
||||
fontType: PosFontType.fontA,
|
||||
width: PosTextSize.size1,
|
||||
height: PosTextSize.size1,
|
||||
);
|
||||
|
||||
bytes += builder.orderType('Split');
|
||||
bytes += builder.orderType('Split', fontType: PosFontType.fontA,
|
||||
width: PosTextSize.size1,
|
||||
height: PosTextSize.size1,);
|
||||
|
||||
bytes += builder.row2Columns(
|
||||
'Split',
|
||||
'${order.payments.last.splitNumber} / ${order.payments.last.splitTotal}',
|
||||
fontType: PosFontType.fontA,
|
||||
width: PosTextSize.size1,
|
||||
height: PosTextSize.size1,
|
||||
);
|
||||
|
||||
bytes += builder.separator();
|
||||
@@ -463,6 +513,9 @@ class PrintUi {
|
||||
totalPrice: item.totalPrice.currencyFormatRpV2,
|
||||
variantName: item.productVariantName,
|
||||
notes: item.notes,
|
||||
fontType: PosFontType.fontA,
|
||||
width: PosTextSize.size1,
|
||||
height: PosTextSize.size1,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -474,6 +527,9 @@ class PrintUi {
|
||||
discount: 0.currencyFormatRpV2,
|
||||
total: order.payments.last.amount.currencyFormatRpV2,
|
||||
paid: order.payments.last.amount.currencyFormatRpV2,
|
||||
fontType: PosFontType.fontA,
|
||||
width: PosTextSize.size1,
|
||||
height: PosTextSize.size1,
|
||||
);
|
||||
|
||||
bytes += builder.footer(message: 'Terima Kasih');
|
||||
|
||||
Reference in New Issue
Block a user