uabh perhitungan tax
This commit is contained in:
@@ -258,10 +258,11 @@ class SalesThermalPrinterInvoice {
|
||||
}
|
||||
|
||||
bytes += generator.row([
|
||||
PosColumn(text: 'Item', width: 4, styles: const PosStyles(align: PosAlign.left, bold: true)),
|
||||
PosColumn(text: 'Qty', width: 2, styles: const PosStyles(align: PosAlign.center, bold: true)),
|
||||
PosColumn(text: 'Price', width: 3, styles: const PosStyles(align: PosAlign.center, bold: true)),
|
||||
PosColumn(text: 'Amount', width: 3, styles: const PosStyles(align: PosAlign.right, bold: true)),
|
||||
PosColumn(text: 'SL', width: 1, styles: const PosStyles(align: PosAlign.left, bold: true)),
|
||||
PosColumn(text: 'Product', width: 4, styles: const PosStyles(align: PosAlign.left, bold: true)),
|
||||
PosColumn(text: 'Qty', width: 1, styles: const PosStyles(align: PosAlign.center, bold: true)),
|
||||
PosColumn(text: 'VAT/Tax', width: 2, styles: const PosStyles(align: PosAlign.center, bold: true)),
|
||||
PosColumn(text: 'Amount', width: 4, styles: const PosStyles(align: PosAlign.right, bold: true)),
|
||||
]);
|
||||
bytes += generator.hr();
|
||||
List.generate(productList?.length ?? 1, (index) {
|
||||
@@ -279,6 +280,13 @@ class SalesThermalPrinterInvoice {
|
||||
"${productList?[index].product?.productType == ProductType.variant.name ? ' [${productList?[index].stock?.batchNo ?? ''}]' : ''}";
|
||||
|
||||
bytes += generator.row([
|
||||
PosColumn(
|
||||
text: '${index + 1}',
|
||||
width: 1,
|
||||
styles: const PosStyles(
|
||||
align: PosAlign.left,
|
||||
),
|
||||
),
|
||||
PosColumn(
|
||||
text: name,
|
||||
width: 4,
|
||||
@@ -288,18 +296,18 @@ class SalesThermalPrinterInvoice {
|
||||
),
|
||||
PosColumn(
|
||||
text: formatPointNumber(getProductQuantity(detailsId: productList?[index].id ?? 0)),
|
||||
width: 2,
|
||||
width: 1,
|
||||
styles: const PosStyles(align: PosAlign.center),
|
||||
),
|
||||
PosColumn(
|
||||
text: '${productList?[index].price}',
|
||||
width: 3,
|
||||
text: formatPointNumber(0),
|
||||
width: 2,
|
||||
styles: const PosStyles(align: PosAlign.center),
|
||||
),
|
||||
PosColumn(
|
||||
text:
|
||||
"${((productList?[index].price ?? 0) * getProductQuantity(detailsId: productList?[index].id ?? 0)) - ((productList?[index].discount ?? 0) * getProductQuantity(detailsId: productList?[index].id ?? 0))}",
|
||||
width: 3,
|
||||
width: 4,
|
||||
styles: const PosStyles(align: PosAlign.right),
|
||||
),
|
||||
]);
|
||||
@@ -811,10 +819,10 @@ class SalesThermalPrinterInvoice {
|
||||
bytes += generator.hr();
|
||||
bytes += generator.row([
|
||||
PosColumn(text: 'SL', width: 1, styles: const PosStyles(align: PosAlign.left, bold: true)),
|
||||
PosColumn(text: 'Item', width: 5, styles: const PosStyles(align: PosAlign.left, bold: true)),
|
||||
PosColumn(text: 'Qty', width: 2, styles: const PosStyles(align: PosAlign.center, bold: true)),
|
||||
PosColumn(text: 'Price', width: 2, styles: const PosStyles(align: PosAlign.center, bold: true)),
|
||||
PosColumn(text: 'Amount', width: 2, styles: const PosStyles(align: PosAlign.right, bold: true)),
|
||||
PosColumn(text: 'Product', width: 5, styles: const PosStyles(align: PosAlign.left, bold: true)),
|
||||
PosColumn(text: 'QTY', width: 1, styles: const PosStyles(align: PosAlign.center, bold: true)),
|
||||
PosColumn(text: 'VAT/Tax', width: 2, styles: const PosStyles(align: PosAlign.center, bold: true)),
|
||||
PosColumn(text: 'Amount', width: 3, styles: const PosStyles(align: PosAlign.right, bold: true)),
|
||||
]);
|
||||
bytes += generator.hr();
|
||||
List.generate(productList?.length ?? 1, (index) {
|
||||
@@ -846,10 +854,10 @@ class SalesThermalPrinterInvoice {
|
||||
)),
|
||||
PosColumn(
|
||||
text: formatPointNumber(getProductQuantity(detailsId: productList?[index].id ?? 0), addComma: true),
|
||||
width: 2,
|
||||
width: 1,
|
||||
styles: const PosStyles(align: PosAlign.center)),
|
||||
PosColumn(
|
||||
text: formatPointNumber(productList?[index].price ?? 0, addComma: true),
|
||||
text: formatPointNumber(0, addComma: true),
|
||||
width: 2,
|
||||
styles: const PosStyles(
|
||||
align: PosAlign.center,
|
||||
@@ -858,7 +866,7 @@ class SalesThermalPrinterInvoice {
|
||||
text: formatPointNumber(
|
||||
(productList?[index].price ?? 0) * getProductQuantity(detailsId: productList?[index].id ?? 0),
|
||||
addComma: true),
|
||||
width: 2,
|
||||
width: 3,
|
||||
styles: const PosStyles(align: PosAlign.right)),
|
||||
]);
|
||||
if (warranty.isNotEmpty) {
|
||||
|
||||
Reference in New Issue
Block a user