Openbravo Issue Tracking System - Retail Modules
View Issue Details
0045550Retail ModulesWeb POSpublic2020-12-09 18:552021-01-14 16:34
lmonreal 
markmm82 
urgentmajoralways
closedfixed 
5
 
RR21Q2 
adrianromero
No
0045550: Unable to retrieve approval information when reprinting a ticket
When there is an approval in the ticket (we display this information in the original ticket) if the ticket is reprinted the approval is missing.

It seems that this information is not loaded when you search for a closed ticket. OB.MobileApp.model.receipt.get('approvals')
-Add product
-Do a price modification that requires an approval
-Enter approval
-Check OB.MobileApp.model.receipt.get('approvals')
-Pay it
-On the backoffice Approval information is present
-Load the ticket on WebPOS
-Check OB.MobileApp.model.receipt.get('approvals')

Information is not loaded

Load the missing information on the PaidReceipts
No tags attached.
Issue History
2020-12-09 18:55lmonrealNew Issue
2020-12-09 18:55lmonrealAssigned To => Retail
2020-12-09 18:55lmonrealResolution time => 1609282800
2020-12-09 18:55lmonrealTriggers an Emergency Pack => No
2020-12-10 08:10guillermogilDescription Updatedbug_revision_view_page.php?rev_id=21917#r21917
2020-12-10 08:10guillermogilSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=21919#r21919
2020-12-10 08:10guillermogilProposed Solution updated
2020-12-21 17:54markmm82Assigned ToRetail => markmm82
2020-12-28 17:01markmm82Statusnew => scheduled
2021-01-08 13:23hgbotNote Added: 0125329
2021-01-12 09:50hgbotResolutionopen => fixed
2021-01-12 09:50hgbotStatusscheduled => closed
2021-01-12 09:51hgbotNote Added: 0125362
2021-01-12 09:51hgbotFixed in Version => RR21Q2
2021-01-12 09:51hgbotNote Added: 0125363
2021-01-13 07:14guillermogilNote Added: 0125403
2021-01-13 07:14guillermogilStatusclosed => new
2021-01-13 07:14guillermogilResolutionfixed => open
2021-01-13 07:14guillermogilFixed in VersionRR21Q2 =>
2021-01-13 14:08markmm82Statusnew => scheduled
2021-01-14 16:34adrianromeroNote Added: 0125463
2021-01-14 16:34adrianromeroStatusscheduled => resolved
2021-01-14 16:34adrianromeroFixed in Version => RR21Q2
2021-01-14 16:34adrianromeroResolutionopen => fixed
2021-01-14 16:34adrianromeroReview Assigned To => adrianromero
2021-01-14 16:34adrianromeroStatusresolved => closed

Notes
(0125329)
hgbot   
2021-01-08 13:23   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/247 [^]
(0125362)
hgbot   
2021-01-12 09:51   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/247 [^]
(0125363)
hgbot   
2021-01-12 09:51   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 2443380848fed7409db183f795df2e41e79bae81
Author: Mark <markmm82@gmail.com>
Date: 2021-01-12T08:50:49+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/2443380848fed7409db183f795df2e41e79bae81 [^]

Fixed BUG-45550: Unable to retrieve approval information when reprinting a ticket

When the PaidReceipts model was loaded the ticket approvals were only loaded if it
was a Layaway, also the list of approvals was returned as "approvedList" in the json.
To fix that, for already paid and approved orders always is returned the 'approvals'
as a the "approvedList" json property.

---
M src/org/openbravo/retail/posterminal/PaidReceipts.java
---
(0125403)
guillermogil   
2021-01-13 07:14   
Reopened as it is not working:

On a load ticket information is in:
OB.MobileApp.model.receipt.get('approvedList');
[{
    approvalType: "OBDMM_approval.discounts",
    userContact: "CAFF2A3D4037450BBAFC3923B1F41D76"
    },{
    approvalType: "OBPOS_approval.setPrice",
    userContact: "66196333F6C04E118ACC7709099C9024"
}]

Variable is wrong, should be approvals instead of approvedList
Also there are some missing information:

Example of the standard ticket
OB.MobileApp.model.receipt.get('approvals')
[{
    approvalType: {…}, userContact: "66196333F6C04E118ACC7709099C9024", lines: Array(1), created: 1610518296064
    },{
    approvalType: {…}, userContact: "CAFF2A3D4037450BBAFC3923B1F41D76", created: 1610518302215, lines: Array(1)
]}

Information should be exactly the same
(0125463)
adrianromero   
2021-01-14 16:34   
Closed as the initial fix is OK for the approvals functionality included in org.openbravo.retail.posterminal.