Description:
The InvoicePrinter extension allows you to print professionally formatted invoices via Bluetooth-connected thermal printers directly from your Kodular or App Inventor project.
This extension includes full customization support:
Dynamic headers and footers
Product list printing with quantity, price, and discount
Bold, double-height TOTAL section
UTF-8 support and ESC/POS formatting
BluetoothClient support for seamless printer communication
Available Blocks:
1.
PrintInvoice
Parameters:
-
BluetoothClient β the connected BluetoothClient component.
-
headerText β text to be displayed at the top (multi-line allowed, centered automatically).
-
invoiceID β unique invoice ID.
-
date β date of invoice.
-
employeeName β name of employee who created the invoice.
-
customerName β name of the customer.
-
productListText β list of product strings formatted like:
ProductName | QtyBox | QtyChain | Price | Discount@ DISCOUNT
Example: Lays Chips | 2 | 4 | 30 | 5@ DISCOUNT
- discount β final discount on invoice (if any).
- totalValue β total payable amount.
- remark β any additional remarks.
- footerText β text at the bottom (multi-line allowed, centered automatically).
2.
PrintError
Event PrintError(String message)
- This event is triggered when thereβs a Bluetooth disconnection or any print error.
- You can use this to show a notifier or log.
Sample Output on Thermal Printer:
I will Try to upload it
AIA Usage Example:
- Use a ListView to collect product data.
- Join items as
ProductName | BoxQty | ChainQty | Price | Discount@ DISCOUNT
- Pass
YailList
toproductListText
parameter. - Fill header and footer with
\n
for multiple lines.
Requirements:
- A working Bluetooth thermal printer (58mm/80mm)
- A connected BluetoothClient component
- UTF-8 and ESC/POS compatible printer
feel free to comment for improvements or feature suggestions.
and please donβt judge me this is my first extension which i have made.
if you would like me to donate me something for my work you can send me amazon gift voucher in my [email protected]
Download AIX :
InvoicePrinter.aix (8.7 KB)