Openbravo Issue Tracking System - POS2
View Issue Details
0058096POS2POSpublic2025-02-27 13:122025-03-05 07:22
vbenitez 
Sathishkumar 
urgentmajoralways
newopen 
5
 
 
No
0058096: Incorrect full invoice template when printing and sending by email
When the invoice terms are "after order delivered" the full invoice is going to be printed at the moment of issuing the order on the webpos.

On the back office the configuration is done inside the window "Organization" webPOS format ..> Default Full Invoice template




Back office configuration for livebuilds

Touchpoint type: mark the flag “allow prepayments and partial payments”

Touchpointytpe: mark the flag propose alternate simplified invoice

Touchpoint type: mark the flag print and email.

Organization--> Invoice terms--> after order delivered

Organization--> anonymous customer--> tab customer-->invoice terms---> after order delivered
Organization--> web pos--> full invoice template--> Full Invoice Receipt A4 Template
Organization--> web pos--> Full Invoice Close A4 Template

Steps to reproduce on the POS

1. Select a product

2. Select a business partner (verify the invoice terms of that business partner are after order delivered)

3. Delivery mode: pick up in store

4. Do a partial payment
5. Re open the sales order and pay the solde
6. Open the solde and click "issue order"
7. The full invoice should be printed instead of the closed full invoice

No tags attached.
pdf invoice lives.pdf (119,389) 2025-02-27 13:12
https://issues.openbravo.com/file_download.php?file_id=20980&type=bug
Issue History
2025-02-27 13:12vbenitezNew Issue
2025-02-27 13:12vbenitezAssigned To => Retail
2025-02-27 13:12vbenitezFile Added: invoice lives.pdf
2025-02-27 13:12vbenitezTriggers an Emergency Pack => No
2025-02-27 15:23aaroncaleroAssigned ToRetail => Triage Omni OMS
2025-02-27 15:27aaroncaleroNote Added: 0176242
2025-02-27 18:56aferrazSeveritycritical => major
2025-02-28 06:56jonaeNote Added: 0176256
2025-02-28 06:56jonaeAssigned ToTriage Omni OMS => Sathishkumar
2025-03-05 07:22hgbotNote Added: 0176455

Notes
(0176242)
aaroncalero   
2025-02-27 15:27   
From a quick review of the code:
The issueTicket state action calls OB.App.State.Ticket.Utils.generateInvoice to generate the invoice based on the ticket.
Since the ticket is loaded from backoffice, its "isPaid" flag is set to true. The generateInvoice method creates the invoice inheriting most properties from the ticket, including the "isPaid: true" flag.
When the invoice is printed, the isPaid:true flag causes the template-choosing code to choose the closed full invoice template.

Imho the generateInvoice method should always create invoices with the isPaid:false flag
(0176256)
jonae   
2025-02-28 06:56   
Jira - https://openbravo.atlassian.net/browse/RM-21837 [^]
(0176455)
hgbot   
2025-03-05 07:22   
Merge Request created: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1946 [^]