Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0052105
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[POS2] POSmajoralways2023-04-12 11:242023-08-14 08:13
ReporterjorgewederagoView Statuspublic 
Assigned Tojorgewederago 
PriorityhighResolutionopenFixed in Version
StatusscheduledFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0052105: When customizing a discount name, the name is not retrieved properly when loading form the backend

DescriptionIf there is a flow that is capable of changing the name of a discount defined in OB backoffice. Whenever that ticket is loaded, the name of the base discount is loaded instead of the customized one.
Steps To Reproduce1.- Open POS2
2.- Add a line and add a line discount. Eg:disc_fixed_5_euro
3.- Open developer tools and write the following line to alter the name of the discount
OB.App.State.getState().Ticket.discountsFromUser.manualPromotions[0].name= 'test_discount'
4.- Open line discounts again add another discount and press apply
5.- Open line discounts and remove the just added discount
6.- The current ticket should only have the name-edited discount (the previous steps were needed to update all the discount info)
7.- Finish the ticket
8.- Load the ticket from the backend
9.- See that the name is the one of the base discount
Proposed SolutionIn older versions there was a column called EM_Obdisc_Identifier where the customized name was saved and then recovered whenever was needed.

The way to fill that in older versions was to do something similar to this:
  OB.Model.Discounts.discountRules[
    '7B49D8CC4E084A75B7CB4D85A6A3A578'
  ].getIdentifier = function(rule) {
    return rule.get('name');
  };

However, in newer versions this is no longer possible. Some of them have the method implemented by default but not all them causing this malfunctions.
TagsNo tags attached.
Attached Files? file icon Reassignment-Note [^] (160 bytes) 2023-07-04 14:58 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2023-04-12 11:24 jorgewederago New Issue
2023-04-12 11:24 jorgewederago Assigned To => Retail
2023-04-12 11:24 jorgewederago Triggers an Emergency Pack => No
2023-07-01 11:00 sreehari Assigned To Retail => sreehari
2023-07-03 07:12 sreehari Status new => scheduled
2023-07-04 14:58 sreehari File Added: Reassignment-Note
2023-07-04 14:58 sreehari Assigned To sreehari => jorgewederago


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker