fix split bill
This commit is contained in:
@@ -450,6 +450,23 @@ class PrintUi {
|
||||
'${order.payments.last.splitNumber} / ${order.payments.last.splitTotal}',
|
||||
);
|
||||
|
||||
bytes += builder.separator();
|
||||
|
||||
bytes += builder.emptyLines(1);
|
||||
|
||||
for (final item in order.orderItems) {
|
||||
bytes += builder.orderItem(
|
||||
productName: item.productName,
|
||||
quantity: item.quantity,
|
||||
unitPrice: item.unitPrice.currencyFormatRpV2,
|
||||
totalPrice: item.totalPrice.currencyFormatRpV2,
|
||||
variantName: item.productVariantName,
|
||||
notes: item.notes,
|
||||
);
|
||||
}
|
||||
|
||||
bytes += builder.emptyLines(1);
|
||||
|
||||
bytes += builder.summary(
|
||||
totalItems: 0,
|
||||
subtotal: order.payments.last.amount.currencyFormatRpV2,
|
||||
|
||||
@@ -167,9 +167,9 @@ class ReceiptComponentBuilder {
|
||||
}) {
|
||||
List<int> bytes = [];
|
||||
|
||||
bytes += row2Columns('No. Pesanan', orderNumber);
|
||||
bytes += row2Columns('Nomor', orderNumber, leftWidth: 4, rightWidth: 8);
|
||||
bytes += row2Columns('Pelanggan', customerName);
|
||||
bytes += row2Columns('Kasir', cashierName);
|
||||
bytes += row2Columns('Kasir', cashierName, leftWidth: 4, rightWidth: 8);
|
||||
|
||||
if (paymentMethod != null) {
|
||||
bytes += row2Columns(
|
||||
@@ -209,11 +209,11 @@ class ReceiptComponentBuilder {
|
||||
}) {
|
||||
List<int> bytes = [];
|
||||
|
||||
final variantText = variantName != null && variantName.isNotEmpty
|
||||
? "($variantName)"
|
||||
: '';
|
||||
final displayName = (variantName != null && variantName.isNotEmpty)
|
||||
? '$productName ($variantName)'
|
||||
: productName;
|
||||
|
||||
bytes += textLeft('$productName $variantText', bold: true);
|
||||
bytes += textLeft(displayName);
|
||||
bytes += row2Columns(
|
||||
'$quantity x $unitPrice',
|
||||
totalPrice,
|
||||
|
||||
Reference in New Issue
Block a user