Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Print receipt #20

Open
arbadacarbaYK opened this issue Sep 29, 2023 · 7 comments
Open

[Feature Request] Print receipt #20

arbadacarbaYK opened this issue Sep 29, 2023 · 7 comments

Comments

@arbadacarbaYK
Copy link

arbadacarbaYK commented Sep 29, 2023

Each payment should be able to be printed from the "paid"-screen and also from the tx-overview within the tpos (in case smb decides too late to want a receipt which happens often).

The receipt should best-case include

  • the logo
  • tpos-name (to simulate shop-name)
  • the (preferred currency) fiat value at tx time

Note: A valid tax receipt would also contain a tax %, which can differ depending on the product. Maybe another reason to revalidate fixed products (with a taxrate x) in the tpos #8

@massmux
Copy link

massmux commented Sep 30, 2023

This feature would be nice. Infact many people use a device with printer onboard and are willing to issue a receipt for the payment just done by the customer.

in my opinion what is necessary is:

  • amount in sats + value in fiat
  • fiat symbol
  • store name (as title of TPOS instance)
  • date/time paid
  • tax in my opinon is not necessary because this would not be a fiscal receipt but just a payment receipt, stating only that the X amount has been correctly paid to the Y shop

@talvasconcelos
Copy link
Collaborator

I'd like to integrate this. Would using the Invoices extension be a viable option?

Just like for onchain capabilities, users must enable the extension, they've to enable the Invoices extension, and the TPoS would issue an invoice.

Maybe we need to evaluate this feature. As TPoS can be used in those devices with a printer built-in, it should probably be something simpler.

As per tax %, the experience I have is that it differs from jurisdiction to jurisdiction and each merchant must handle it a different way.

@arbadacarbaYK
Copy link
Author

I'd like to integrate this. Would using the Invoices extension be a viable option?

Just like for onchain capabilities, users must enable the extension, they've to enable the Invoices extension, and the TPoS would issue an invoice.

Maybe we need to evaluate this feature. As TPoS can be used in those devices with a printer built-in, it should probably be something simpler.

As per tax %, the experience I have is that it differs from jurisdiction to jurisdiction and each merchant must handle it a different way."

The request was to be able to print from TPOS tx-list or when tx happens to the printer - not from the invoice extnesion. Invoices in the invoice-extension also are static and cannot list dynamically or 2 or 3 products, right ? TPOS was just changed to sum up more than one product but the bill needs to show the different products for tax reasons in regions, where that differes.

Tax is handled everywhere the same - wordpress uses a fixed tax% for all, per producttype or per product - since that is too complex per product would be easier for LNbits imo. But the tax is not the point here, it can be done afterwards as long as the products are listed separately.

@arbadacarbaYK
Copy link
Author

arbadacarbaYK commented Mar 19, 2024

Solution should include to enable printing on the LNbits POS Terminal / Sunmi/bitcoinize internal printer.

If predefined products are used (which are realised meanwhile without a tax/product) they should be listed separately to the print and also the csv export to handle taxes based on that.

Also voucher of the ATM feature should be printable.

@DoktorShift

This comment was marked as off-topic.

@arbadacarbaYK
Copy link
Author

Enhance the LNbits TPOS extension by adding functionality to handle payment JSONs and generate printable receipts. After a payment is received and processed, a "Print Receipt" button should appear on the TPOS screen, allowing users to print the receipt. Ensure compatibility with devices that do not have a printer by providing alternative options.

The bounty will be paid by me once the changes are merged into lnbits main.

Action after setteled payment

1. Successfully handle ´payment´ object JSON, extracting necessary details.

2. Generate a structured receipt based on the extracted payment information.

3. Display a "Print Receipt" button or pop up on the TPOS screen after a payment is processed. (+ add print button in "last sales" as well)

4. Print the receipt when the "Print Receipt" button is clicked.

print_3

Steps to achieve Bounty

1. Payment JSON Handling:
   
   * Extract the 'payment' object from the received JSON

2. Printable Receipt Generation:
   
   * Create a visually appealing receipt format that includes relevant payment details. [Could be a source](https://github.com/lnbits/tpos-receipt-printer/blob/main/firmware/src/print.h#L214)

3. Implement functionality to detect if the device has an available printer. (Could be tricky since its a spa and not a "solid app")
   
   * Provide alternative options if no printer is detected.

4. UI Enhancement:
   
   * Modify the TPOS screen to display a "Print Receipt" button after the payment is successfully processed. (see above screenshot left)
   * Modify TPoS receipt "last payments" to print receipt even after the payment process is finished. (see above Screenshot right)

That doesnt reflect all of the above which makes it a bit hard to follow up here

@arbadacarbaYK
Copy link
Author

arbadacarbaYK commented Jun 26, 2024

all three points
the logo
tpos-name (to simulate shop-name)
the (preferred currency) fiat value at tx time
are not in. So i wonder if you just read the headline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants