Openbravo Issue Tracking System - POS2
View Issue Details
0047474POS2POSpublic2021-07-29 19:112021-08-13 07:03
cberner 
Retail 
normalmajorhave not tried
closedfixed 
5
 
 
No
0047474: Completing a quotation is not persisted in backoffice and not available in Orders window
When a quotation is completed, it should be persisted in backoffice, so when you close it, it is available in Orders window and in the backoffice to open again. This is probably a regression.

An error appears in backoffice in Errors while importing POS Data, as part of this:
"org.openbravo.base.exception.OBException: Error in OrderLoader: null
    at org.openbravo.retail.posterminal.OrderLoader.saveRecord(OrderLoader.java:486)"
1. Open and login in WebPOS
2. Click on ... button and "New Quotation"
3. Add a product to the ticket
4. Click on "Complete" and then on "Close Quotation"

Check Orders window, and see that the created quotation is not there.
Check backoffice and go to "Errors while importing POS Data", an error will be there, related to this quotation.
No tags attached.
caused by defect 0047350 closed mtaal Quotation ticket label is shown as "Draft" instead of "Completed" or "Under Evaluation" and it is inconsitent 
Issue History
2021-07-29 19:11cbernerNew Issue
2021-07-29 19:11cbernerAssigned To => Retail
2021-07-29 19:11cbernerTriggers an Emergency Pack => No
2021-07-30 09:04dmiguelezResolution time => 1628805600
2021-07-30 09:04dmiguelezStatusnew => acknowledged
2021-07-30 12:00jorge-garciaRelationship addedcaused by 0047350
2021-07-30 12:05jorge-garciaNote Added: 0130894
2021-07-30 12:09jorge-garciaNote Edited: 0130894bug_revision_view_page.php?bugnote_id=0130894#r22951
2021-07-30 12:13jorge-garciaNote Edited: 0130894bug_revision_view_page.php?bugnote_id=0130894#r22952
2021-08-06 11:33dmiguelezResolution time1628805600 => 1629410400
2021-08-12 03:36hgbotNote Added: 0131079
2021-08-12 13:42hgbotResolutionopen => fixed
2021-08-12 13:42hgbotStatusacknowledged => closed
2021-08-12 13:42hgbotNote Added: 0131103
2021-08-12 13:42hgbotNote Added: 0131104
2021-08-13 07:03hgbotNote Added: 0131105

Notes
(0130894)
jorge-garcia   
2021-07-30 12:05   
(edited on: 2021-07-30 12:13)
This issue is a regression introduced by the solution of issue 47350.

The problem is located in TicketExtesion.js file from org.openbravo.pos2 module at line 51:
OB.App.StateAPI.Global.completeQuotation.addPreHook(setIsPaid);

Once a quotation is complete, we CANNOT set the quotation as "isPaid: true". If so, the OrderLoader thinks this document exists already in the database and tries to modify it (causing finally the error reported).

The OrderLoader error is raised at line 371-372:
order = OBDal.getInstance().get(Order.class, jsonorder.getString("id"));
order.setDelivered(deliver);

In the old POS, the decision to indicate in the UI if a quotation was in status draft or under evaluation was made checking the attribute "hasbeenpaid" instead of the "isPaid" arrtibute.

(0131079)
hgbot   
2021-08-12 03:36   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/657 [^]
(0131103)
hgbot   
2021-08-12 13:42   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: b650c71e0bfd7d3a2bc9646376644bf6b17fadc3
Author: hernan-dp <hernan.de.prada@smfconsulting.es>
Date: 2021-08-12T08:32:51-03:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/b650c71e0bfd7d3a2bc9646376644bf6b17fadc3 [^]

fixes ISSUE-47474: Removed setPaid from ticket that made it not store in backoffice.

---
M web-jspack/org.openbravo.pos2/src/model/ticket/TicketExtension.js
---
(0131104)
hgbot   
2021-08-12 13:42   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/657 [^]
(0131105)
hgbot   
2021-08-13 07:03   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 100ab8d470282e4cac0cf6dec719eeb48533e4ec
Author: Antonio Moreno <anmorenoperez@gmail.com>
Date: 2021-08-13T07:03:25+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/100ab8d470282e4cac0cf6dec719eeb48533e4ec [^]

Related to ISSUE-47474: remove unused setIsPaid import

---
M web-jspack/org.openbravo.pos2/src/model/ticket/TicketExtension.js
---