Openbravo Issue Tracking System - Retail Modules
View Issue Details
0058244Retail ModulesDiscounts and Promotionspublic2025-03-14 09:542025-03-31 09:31
eliezerSotomayor 
Bimla_vm 
normalminoralways
closedduplicate 
5
 
 
No
No
0058244: qtyOffer is set to 0 when the limit is reached in a Pack discount with multiple instances
When reaching the limit of a Pack discount with multiple instances configured, the discount engine does not calculate the qtyOffer of each line correctly.

Before reaching the limit, it calculates correctly. However, once the limit is reached, it sets the qtyOffer to 0.
PRECONDITION (BACKOFFICE):
 - Go to the Discount & Promotions window
 - Open the Test Coupon discount
 - Set the Discount/Promotion Type to 'Pack'
 - Set the Currency to 'EUR' and the Discount/Promotion Price to 10
 - Set the Limit Multiple Instances per Order field to true
 - Set the Limit of Instances per Order field to '2'
 - Set the Included Products field to 'Only those defined'
 - Go to the Products subtab below
 - Add the Avalanche Transceiver product with a quantity of 1
 - Add the Headlamp Ultralight product with a quantity of 2


TEST IN POS:
 - Use a Standard Terminal (VBS-2).
 - Add the Avalanche Transceiver product 1 times
 - Add the Headlamp Ultralight product 2 times
 - Check the console
   * Open the console (Press F12)
   * Print the lines (OB.App.State.getState().Ticket.lines)
   * In each line object, open its promotions and check the 'qtyOffer' value
     ( Can use this line: OB.App.State.getState().Ticket.lines.forEach(l=>console.log(l.promotions)) )
   * The first line has a qtyOffer of 1, and the second has a qtyOffer of 2
 - Add again the Avalanche Transceiver product 1 times (Total: 2 x Avalanche Transceiver)
 - Add again the Headlamp Ultralight product 2 times (Total: 4 x Avalanche Transceiver)
 - Note that we reach the limit configured in the backoffice: 'Limit of Instances per Order'
 - Check the console
   * Open the console
   * Print the lines
   * In each line object, open its promotions and check the 'qtyOffer' value
   * The first line has a qtyOffer of 0, and the second has a qtyOffer of 0

No tags attached.
Issue History
2025-03-14 09:54eliezerSotomayorNew Issue
2025-03-14 09:54eliezerSotomayorAssigned To => Retail
2025-03-14 09:54eliezerSotomayorOBNetwork customer => No
2025-03-14 09:54eliezerSotomayorTriggers an Emergency Pack => No
2025-03-17 08:51guilleaerAssigned ToRetail => guilleaer
2025-03-17 08:51guilleaerStatusnew => acknowledged
2025-03-25 13:06Bimla_vmAssigned Toguilleaer => Bimla_vm
2025-03-25 13:06Bimla_vmStatusacknowledged => scheduled
2025-03-31 09:31hgbotNote Added: 0177710
2025-03-31 09:31hgbotStatusscheduled => closed
2025-03-31 09:31hgbotResolutionopen => duplicate

Notes
(0177710)
hgbot   
2025-03-31 09:31   
Issue exported to Jira: https://openbravo.atlassian.net/browse/RM-24461 [^]