Openbravo Issue Tracking System - Retail Modules
View Issue Details
0038468Retail ModulesWeb POSpublic2018-04-27 13:532018-05-10 12:03
maite 
gorka_gil 
immediatemajoralways
closedfixed 
5
 
RR18Q1.3RR18Q1.3 
marvintm
main
http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f4fb9c07eb350e512bafe7547473d226da3b7efa [^]
No
0038468: getPaymentAmount() is not being rounded and causes ticket is identified as "hasReceiptChange"=true
When ticket is paid using higher amount but change is given in same currency, it should not be identified as "change"
0. Access Terminal, select any product and set price=1500.40
1. Pay ticket setting amount=1550 (so change of 49.6 is calculated) and press done
2. Access backoffice to review the sales order and realize that payment plan information is incorrect as change amount has been identified as outstanding amount. Also, navigate to Payment document and realize that details are incorrect as gl item has been used when it should not.
No tags attached.
blocks defect 0038466 closed gorka_gil getPaymentAmount() is not being rounded and causes ticket is identified as "hasReceiptChange"=true 
Issue History
2018-04-27 14:01marvintmTypedefect => backport
2018-04-27 14:01marvintmTarget Version => RR18Q1.4
2018-05-02 14:12hgbotCheckin
2018-05-02 14:12hgbotNote Added: 0104202
2018-05-02 14:12hgbotStatusscheduled => resolved
2018-05-02 14:12hgbotResolutionopen => fixed
2018-05-02 14:12hgbotFixed in SCM revision => http://code.openbravo.com/retail/backports/3.0RR18Q1.3/org.openbravo.retail.posterminal/rev/239e16d6cc55bd44814cf9a1147c04c2a749abca [^]
2018-05-02 14:13gorka_gilTarget VersionRR18Q1.4 => RR18Q1.3
2018-05-04 14:45marvintmReview Assigned To => marvintm
2018-05-04 14:45marvintmStatusresolved => closed
2018-05-04 14:45marvintmFixed in Version => RR18Q1.3
2018-05-10 12:03gorka_gilAssigned ToRetail => gorka_gil

Notes
(0104202)
hgbot   
2018-05-02 14:12   
Repository: retail/backports/3.0RR18Q1.3/org.openbravo.retail.posterminal
Changeset: 239e16d6cc55bd44814cf9a1147c04c2a749abca
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Wed May 02 12:26:25 2018 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR18Q1.3/org.openbravo.retail.posterminal/rev/239e16d6cc55bd44814cf9a1147c04c2a749abca [^]

Fixes issue 38468: Fix precision of payment amount read from json in the order loader.

Payment amount when read from json was passed to Double and then to BigDecimal which produce precision problems.
The precision problems makes that the check if there is change to be true, when in really there isn't change,
which produce the behaviour reported in the issue.

Now readed as string from json and passed directly to BigDecimal.

---
M src/org/openbravo/retail/posterminal/OrderLoader.java
---