Openbravo Issue Tracking System - Retail Modules
View Issue Details
0045538Retail ModulesDiscounts and Promotionspublic2020-12-04 20:432020-12-28 07:31
collazoandy4 
rqueralta 
normalmajorhave not tried
closedfixed 
5
RR20Q1 
RR21Q1 
marvintm
No
0045538: Ticket with manual discount related services and Save Removed Tickets preference enabled can be imported in 20Q1
When an order with manual discount is removed from the ticket and added again with the same discount applied can be imported, a new record is created in Erros While Importing Pos Data window because the process fails when the related services are processed.

Also the Web Pos keep frozen after delete the line (a refresh is required to continue) and the second discount amount is not added to the line (check this errors in the steps to reproduce)

To reproduce this issue the fix for issue 45086 should be applied because the Manual User Discount in 20Q1 is broken.

Apply the fix for issue 45096, rebuild openbravo (ant smartbuild) and refresh tomcat
Enable Web POS Enable Delivery Modes and Web POS Save Removed Tickets preferences
Go to Discounts and Promotions windows create a new record:
  Discount/Promotion type: User Defined Line Amount
  Name: TestDiscount
  Starting Date: Last year
Go to Service Price Rule and create a new record:
  Name: IssuePriceRule
  Rule Type: Percentage
  Percentage: 0
  After Discount: Y
Go to Product Window and edit Configuration record:
  Purchase: Y
  Editable Price: Y
  Included Product Category: Only those defined
  Set Included Product as empty
  Is Price Rule Based: Y
  Available in multiselection: Y
  Allow deferred sell: Y
  Deferred Sell Max Days: 90
  Proposal Type: Optional Proposal
  Click on Relate Product Categories button and select Backpacks & Travel category
  Create a new Record in Price Rule Version tab:
    Valid from date: Last year
    Service Price Rule: IssuePriceRule
    Minimum: 250
    Maximum: 99000
Log in VBS-1 Pos Terminal
  Click on Layaway this receipt menu entry
  Set Arturo Montoro as customer
  Add Alpine skiing, Baby carrier and Multi-day backpack products to the receipt from the Backpacks & Travel category
  Add the previous discount created (TestDiscount) for Alpine skiing line with an amount of 100 and check a new discount line is created with -9.90 as amount
  Add the previous discount created (TestDiscount) for Baby carrier and Multi-day backpack products with an amount of 100 and check one discount line is created for Baby carrier with -10.50 as amount and another line for Multi-day backpack with an amount of -5.50
  Check receipt total amount is 300.00
  Select the three lines and add Configuration as related services (Show more/Related services)
  Add another discount for Multi-day backpack line, select the previous one created (TestDiscount), set 95 as amount, click on Apply button
  Check no discount line is added, this is wrong a new discount line with an amount of -5.00 should be created
  Select Multi-day backpack line, click on Delete Line and click on Ok button from Service Removed popup and check the web pos keep frozen and a refresh (F5) has to be done
  Add Multi-day backpack product to the receipt
  Add the previous discount created (TestDiscount) for Multi-day backpack line with an amount of 95 and check a new discount line is created with an amount of -10.50
  Select the three lines and add Configuration as related services (Show more/Related services)
  Synchronize the receipt as layaway
  Check Error while importing POS data window in the backend a new record related to the previous receipt
No tags attached.
patch Fixed-BUG-45538-20Q1-discount.patch (2,319) 2020-12-21 18:38
https://issues.openbravo.com/file_download.php?file_id=15196&type=bug
patch Fixed-BUG-45538-20Q1-posterminal.patch (2,637) 2020-12-21 18:38
https://issues.openbravo.com/file_download.php?file_id=15197&type=bug
Issue History
2020-12-04 20:43collazoandy4New Issue
2020-12-04 20:43collazoandy4Assigned To => Retail
2020-12-04 20:43collazoandy4Resolution time => 1608246000
2020-12-04 20:43collazoandy4Triggers an Emergency Pack => No
2020-12-04 20:43collazoandy4version => RR20Q1
2020-12-14 14:55rqueraltaAssigned ToRetail => rqueralta
2020-12-21 18:38rqueraltaFile Added: Fixed-BUG-45538-20Q1-discount.patch
2020-12-21 18:38rqueraltaFile Added: Fixed-BUG-45538-20Q1-posterminal.patch
2020-12-22 07:52marvintmReview Assigned To => marvintm
2020-12-22 07:52marvintmNote Added: 0125036
2020-12-22 07:52marvintmStatusnew => closed
2020-12-22 07:52marvintmResolutionopen => no change required
2020-12-23 17:56rqueraltaStatusclosed => scheduled
2020-12-28 04:54hgbotNote Added: 0125091
2020-12-28 07:31hgbotResolutionno change required => fixed
2020-12-28 07:31hgbotStatusscheduled => closed
2020-12-28 07:31hgbotNote Added: 0125094
2020-12-28 07:31hgbotFixed in Version => RR21Q1
2020-12-28 07:31hgbotNote Added: 0125095

Notes
(0125036)
marvintm   
2020-12-22 07:52   
This problem doesn't happen anymore in current releases, but attached a patch for previous releases in the issue.
(0125091)
hgbot   
2020-12-28 04:54   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/13 [^]
(0125094)
hgbot   
2020-12-28 07:31   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/13 [^]
(0125095)
hgbot   
2020-12-28 07:31   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: b07ba67077bf6a6f19a2117894a0d192fae21efc
Author: Rafael Queralta <rafaelcuba81@gmail.com>
Date: 2020-12-27T08:04:19-05:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/b07ba67077bf6a6f19a2117894a0d192fae21efc [^]

Fixed BUG-45538: Modified "Allow Multiple Instance per Line" field display logic to include "User Defined Line Amount" rule

---
M src-db/database/sourcedata/AD_FIELD.xml
---