Openbravo Issue Tracking System - Retail Modules
View Issue Details
0049472Retail ModulesWeb POSpublic2022-06-02 23:072022-06-22 17:44
axelmercado 
rqueralta 
highmajoralways
closedno change required 
5
RR21Q4.2 
 
marvintm
No
0049472: Error with OrderLoader Web Services
When sending a json for a return with the isReturn set to "true", the return order is created with the gross line amount in positive.
1-Create a JSON
http://wiki.openbravo.com/wiki/Retail:Order_Loading_WebService#URL.2FRequest_.26_Authentication [^]

2-Send the JSON to the API with the following endpoint:
http://localhost:8080/openbravo/org.openbravo.mobile.core.service.jsonrest/org.openbravo.retail.posterminal.ExternalOrderLoader?synchronizedProcessing=true [^]

3-Check that the return has been created correctly in the customer return window and the values of the "Gross Line Amount" and "Line Net Amount" lines.

We performed the 2 possibilities indicated in the Wiki to enter the return but both fail in the same way.
Quote:A return can be send in, in 2 ways:

    set a property "isReturn" on the order header to true. The complete ticket is considered to be a return. The quantities in the orderlines are positive, but still to be considered to be returns.
    send in a standard ticket but with negative quantity for the return.
No tags attached.
related to defect 0049628 closed ranjith_qualiantech_com External Order Loader - impossible to import return line with a negative line gross amount 
Issue History
2022-06-02 23:07axelmercadoNew Issue
2022-06-02 23:07axelmercadoAssigned To => Retail
2022-06-02 23:07axelmercadoTriggers an Emergency Pack => No
2022-06-02 23:08ivazquezETAnone => < 1 month
2022-06-03 07:21ivancaceresIssue Monitored: ivancaceres
2022-06-07 15:02rqueraltaAssigned ToRetail => rqueralta
2022-06-07 15:03rqueraltaStatusnew => scheduled
2022-06-10 09:11marvintmReview Assigned To => marvintm
2022-06-10 09:11marvintmNote Added: 0138240
2022-06-10 09:11marvintmStatusscheduled => closed
2022-06-10 09:11marvintmResolutionopen => no change required
2022-06-10 09:21ivancaceresNote Added: 0138242
2022-06-10 14:56axelmercadoNote Added: 0138264
2022-06-22 17:44marvintmNote Added: 0138642
2022-06-22 17:44marvintmRelationship addedrelated to 0049628

Notes
(0138240)
marvintm   
2022-06-10 09:11   
The OrderLoader (and by extension the ExternalOrderLoader), are designed to receive the information of the Order in the JSON exactly in the way it should be created. This means that returns should be sent with the negative qty and total amounts.

The wiki statement mentioned in the issue was confusing, and we have clarified it to better explain this point:

http://wiki.openbravo.com/wiki/Retail:Order_Loading_WebService#Return_Order.2FLines [^]
(0138242)
ivancaceres   
2022-06-10 09:21   
Hi Marvin,

Can you check TicketPropertyMapping.java method getGrossUnitAmount? In this method, i think gross should be taken instead of lineGrossAmount.

Sl2
(0138264)
axelmercado   
2022-06-10 14:56   
Is it correct that "Gross Line Amount" and "Line Net Amount" both end in positive?
(0138642)
marvintm   
2022-06-22 17:44   
No, this part is not correct. A separate issue was reported this week about that:

https://issues.openbravo.com/view.php?id=49628 [^]