Openbravo Issue Tracking System - Retail Modules
View Issue Details
0038927Retail ModulesWeb POSpublic2018-07-10 16:032018-10-22 15:20
adrianromero 
adrianromero 
urgentmajorhave not tried
closedfixed 
5
 
 
migueldejuana
No
0038927: To calculate pending to pay in a foreign amount it is not used the configured multiply by rate
When getting payment rate configuration from Conversion Rates window. Multiply by rate is not taken from the field, instead is calculated as the inverse of the Divide by rate field.

This will result in wrong calculations when multiply by and divide rate are not the exact inverse one from the other.
* Modify the Conversion Rate for EUR -> USD as multiply rate 4100, divide rate is automatically calculated as 0.000244. Do the same for USD -> EUR conversion

* Login in Web POS and create a receipt for a total of 20.00€
* Go to the payment panel and add a payment of 19.00€
* Select Cash USA payment method and observe the remaining to pay is $4098.36. This is wrong, as the remaining to pay has to be $4100.00 as configured previously
Apply the attached changeset

Observe that the related issue that is the reason why the current behaviour is to calculate the multiply by rate as the inverse of the divide by rate. Works properly with the proposed changeset
No tags attached.
related to defect 0025924 closed rafademiguel Precision error in Multicurrency - Exchange Rate 
related to defect 0038965 closed adrianromero Exact payment in a foreign amount must use the multiply by rate not divide by rate 
related to defect 0038967 closed rqueralta Sum of linenet plus tax can be different than gross 
diff issue38927.diff (1,421) 2018-07-11 09:44
https://issues.openbravo.com/file_download.php?file_id=11943&type=bug
Issue History
2018-07-10 16:03adrianromeroNew Issue
2018-07-10 16:03adrianromeroAssigned To => Retail
2018-07-10 16:03adrianromeroTriggers an Emergency Pack => No
2018-07-10 16:04adrianromeroRelationship addedrelated to 0025924
2018-07-10 18:51rqueraltaAssigned ToRetail => rqueralta
2018-07-10 18:51rqueraltaStatusnew => scheduled
2018-07-11 09:44adrianromeroFile Added: issue38927.diff
2018-07-11 09:47adrianromeroNote Added: 0105698
2018-07-11 09:47adrianromeroNote Edited: 0105698bug_revision_view_page.php?bugnote_id=0105698#r17397
2018-07-16 11:19adrianromeroRelationship addedrelated to 0038965
2018-07-16 14:00migueldejuanaRelationship addedrelated to 0038967
2018-07-31 15:15hgbotCheckin
2018-07-31 15:15hgbotNote Added: 0106057
2018-07-31 15:15hgbotStatusscheduled => resolved
2018-07-31 15:15hgbotResolutionopen => fixed
2018-07-31 15:15hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c78e7366b4fdeb5c5c391f3c8bdb63a33eac6cae [^]
2018-07-31 15:17hgbotCheckin
2018-07-31 15:17hgbotNote Added: 0106058
2018-08-01 21:37hgbotCheckin
2018-08-01 21:37hgbotNote Added: 0106090
2018-08-17 13:16marvintmReview Assigned To => marvintm
2018-08-17 13:16marvintmStatusresolved => closed
2018-08-17 13:16marvintmFixed in Version => RR18Q4
2018-09-12 15:28hgbotCheckin
2018-09-12 15:28hgbotNote Added: 0106708
2018-09-12 15:28hgbotStatusclosed => resolved
2018-09-12 15:28hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c78e7366b4fdeb5c5c391f3c8bdb63a33eac6cae [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/625e71fa3c4b031fe4f4b156b97dbd6ff0409e40 [^]
2018-09-12 15:32hgbotCheckin
2018-09-12 15:32hgbotNote Added: 0106709
2018-09-12 15:32hgbotCheckin
2018-09-12 15:32hgbotNote Added: 0106710
2018-09-12 15:32hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/625e71fa3c4b031fe4f4b156b97dbd6ff0409e40 [^] => http://code.openbravo.com/tools/automation/pi-mobile/rev/181b0ab8d2e64184967f4bc56aa60e30486d24b7 [^]
2018-09-12 17:07marvintmAssigned Torqueralta => adrianromero
2018-09-12 17:07marvintmStatusresolved => new
2018-09-12 17:07marvintmResolutionfixed => open
2018-09-12 17:07marvintmFixed in VersionRR18Q4 =>
2018-09-13 17:43hgbotCheckin
2018-09-13 17:43hgbotNote Added: 0106753
2018-09-13 17:43hgbotCheckin
2018-09-13 17:43hgbotNote Added: 0106754
2018-10-15 10:24hgbotCheckin
2018-10-15 10:24hgbotNote Added: 0107276
2018-10-15 10:24hgbotStatusnew => resolved
2018-10-15 10:24hgbotResolutionopen => fixed
2018-10-15 10:24hgbotFixed in SCM revisionhttp://code.openbravo.com/tools/automation/pi-mobile/rev/181b0ab8d2e64184967f4bc56aa60e30486d24b7 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/b49f9319b2a518fb1c42c5c26e4c6772c45f4d2b [^]
2018-10-15 10:25hgbotCheckin
2018-10-15 10:25hgbotNote Added: 0107280
2018-10-15 10:25hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/b49f9319b2a518fb1c42c5c26e4c6772c45f4d2b [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/33136ecf7fa93c741ddba5882da0ad6735d37a1d [^]
2018-10-15 10:26hgbotCheckin
2018-10-15 10:26hgbotNote Added: 0107281
2018-10-15 10:26hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/33136ecf7fa93c741ddba5882da0ad6735d37a1d [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/783a69f57df5eab62ed98dbfec7ad791eef9b8b7 [^]
2018-10-15 10:31hgbotCheckin
2018-10-15 10:31hgbotNote Added: 0107284
2018-10-15 10:31hgbotCheckin
2018-10-15 10:31hgbotNote Added: 0107285
2018-10-22 15:20migueldejuanaReview Assigned Tomarvintm => migueldejuana
2018-10-22 15:20migueldejuanaNote Added: 0107487
2018-10-22 15:20migueldejuanaStatusresolved => closed

Notes
(0105698)
adrianromero   
2018-07-11 09:47   
This is the result of the try job with the changeset proposed in the attached file. As you can see there are serveral tests failing becuase a difference in amount of few cents. I assume that now the amounts calculated are correct, but it will require to modify all the tests failing.

https://ci.openbravo.com/job/try-ret-init/12137/ [^]

(0106057)
hgbot   
2018-07-31 15:15   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: c78e7366b4fdeb5c5c391f3c8bdb63a33eac6cae
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Tue Jul 10 16:12:06 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c78e7366b4fdeb5c5c391f3c8bdb63a33eac6cae [^]

Fixes issue 38927: To calculate pending to pay in a foreign amount it is not used the configured multiply by rate

---
M src/org/openbravo/retail/posterminal/term/Payments.java
---
(0106058)
hgbot   
2018-07-31 15:17   
Repository: tools/automation/pi-mobile
Changeset: da9b55d9942e8848c3eaeb9d1d51d4a776e67262
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Fri Jul 20 16:01:53 2018 -0400
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/da9b55d9942e8848c3eaeb9d1d51d4a776e67262 [^]

Related to issue 38927: To calculate pending to pay in a foreign amount it is
not used the configured multiply by rate

- Changed these test was required because there are difference in the cents of
total amount

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashmanagement/I35779_CashMgmLongDescription.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashup/CashupMulticurrencyPrecissionCheck.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashup/I26806_CashupTotalNotShown.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashup/I28181_CashupWrongWithdrawalSummary.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashup/I28491_WrongWithdrawalSection.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashup/I31790_CashupAmountToKeep.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/layaway/I31279_LayawayUSACashPayments.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/layaway/LayawayRetrieval.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/layaway/LayawayVerifyPaymentsInformation.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I29558_IncorrectCurrencyAmountAfterCancelingPayment.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I36982_TransactionsPaidWithOtherCurrencyReturnChangeInDefaultCurrency.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/CreateMulticurrencySale.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/CreateMulticurrencySaleWithPrecissionCheck.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/I28084_SaleLogoutinCheckCash.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/storecurrencyexchangerate/VerifyPaymentBasedOnStoreConversionRate.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I31677_VerifyPaymentMethodSelectionII.java
---
(0106090)
hgbot   
2018-08-01 21:37   
Repository: tools/automation/pi-mobile
Changeset: 9b55d5bf784ac82cd7f91ee87ed1b1abb3b84858
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Wed Jul 11 14:55:22 2018 -0400
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/9b55d5bf784ac82cd7f91ee87ed1b1abb3b84858 [^]

Related to issue 38927: added automated test

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/payment/I38927_VerifyPendingPayInForeignAmount.java
---
(0106708)
hgbot   
2018-09-12 15:28   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 625e71fa3c4b031fe4f4b156b97dbd6ff0409e40
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Wed Sep 12 09:27:40 2018 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/625e71fa3c4b031fe4f4b156b97dbd6ff0409e40 [^]

Fixes issue 38927: To calculate pending to pay in a foreign amount it is not
used the configured multiply by rate

- Moved to desing defect

---
M src/org/openbravo/retail/posterminal/term/Payments.java
---
(0106709)
hgbot   
2018-09-12 15:32   
Repository: tools/automation/pi-mobile
Changeset: 794cd9beabbd5f5daa894b43fc95cec56fd2601b
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Wed Sep 12 09:29:45 2018 -0400
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/794cd9beabbd5f5daa894b43fc95cec56fd2601b [^]

Related issue 38927: To calculate pending to pay in a foreign amount it is not
used the configured multiply by rate

Backed out changeset: da9b55d9942e

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashmanagement/I35779_CashMgmLongDescription.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashup/CashupMulticurrencyPrecissionCheck.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashup/I26806_CashupTotalNotShown.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashup/I28181_CashupWrongWithdrawalSummary.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashup/I28491_WrongWithdrawalSection.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashup/I31790_CashupAmountToKeep.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/layaway/I31279_LayawayUSACashPayments.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/layaway/LayawayRetrieval.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/layaway/LayawayVerifyPaymentsInformation.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I29558_IncorrectCurrencyAmountAfterCancelingPayment.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I36982_TransactionsPaidWithOtherCurrencyReturnChangeInDefaultCurrency.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/CreateMulticurrencySale.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/CreateMulticurrencySaleWithPrecissionCheck.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/I28084_SaleLogoutinCheckCash.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/storecurrencyexchangerate/VerifyPaymentBasedOnStoreConversionRate.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I31677_VerifyPaymentMethodSelectionII.java
---
(0106710)
hgbot   
2018-09-12 15:32   
Repository: tools/automation/pi-mobile
Changeset: 181b0ab8d2e64184967f4bc56aa60e30486d24b7
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Wed Sep 12 09:31:15 2018 -0400
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/181b0ab8d2e64184967f4bc56aa60e30486d24b7 [^]

Fixes issue 38927: To calculate pending to pay in a foreign amount it is not
used the configured multiply by rate

- Backed out changeset: 9b55d5bf784a

---
R src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/payment/I38927_VerifyPendingPayInForeignAmount.java
---
(0106753)
hgbot   
2018-09-13 17:43   
Repository: tools/automation/pi-mobile
Changeset: 59e0ae39453307973f35b51659cce11e73900b35
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Thu Sep 13 11:26:54 2018 -0400
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/59e0ae39453307973f35b51659cce11e73900b35 [^]

Related issue 38927: Stabilize Test I31850_VerifyDiscountByPaymentMethod

- Backed out changeset: f5150e2f3392

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_bypaymentmethod/I31850_VerifyDiscountByPaymentMethod.java
---
(0106754)
hgbot   
2018-09-13 17:43   
Repository: tools/automation/pi-mobile
Changeset: cda168900424da1d7ac214166174c4568a217cab
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Thu Sep 13 11:38:54 2018 -0400
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/cda168900424da1d7ac214166174c4568a217cab [^]

Related to issue 38927: Stabilize Test I30305_VerifyDiscountByMultiPayment and
I30305_VerifyDiscountByMultiPaymentII

- Backed out changeset: 9f86c4723637

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_bypaymentmethod/I30305_VerifyDiscountByMultiPayment.java
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_bypaymentmethod/I30305_VerifyDiscountByMultiPaymentII.java
---
(0107276)
hgbot   
2018-10-15 10:24   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: b49f9319b2a518fb1c42c5c26e4c6772c45f4d2b
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Tue Jul 10 16:12:06 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/b49f9319b2a518fb1c42c5c26e4c6772c45f4d2b [^]

Fixes issue 38927: To calculate pending to pay in a foreign amount it is not used the configured multiply by rate

---
M src/org/openbravo/retail/posterminal/term/Payments.java
---
(0107280)
hgbot   
2018-10-15 10:25   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 33136ecf7fa93c741ddba5882da0ad6735d37a1d
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Tue Sep 18 13:37:15 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/33136ecf7fa93c741ddba5882da0ad6735d37a1d [^]

Fixes issue 0038927: To calculate pending to pay in a foreign amount it is not used the configured multiply by rate

---
M src/org/openbravo/retail/posterminal/term/Payments.java
---
(0107281)
hgbot   
2018-10-15 10:26   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 783a69f57df5eab62ed98dbfec7ad791eef9b8b7
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Thu Sep 20 15:37:41 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/783a69f57df5eab62ed98dbfec7ad791eef9b8b7 [^]

Backed out changeset 33136ecf7fa9
Fixes issue 0038927: To calculate pending to pay in a foreign amount it is not used the configured multiply by rate

---
M src/org/openbravo/retail/posterminal/term/Payments.java
---
(0107284)
hgbot   
2018-10-15 10:31   
Repository: tools/automation/pi-mobile
Changeset: 92efa466f3b372b348add622ce127a3a7c2cfe60
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Tue Sep 18 13:38:30 2018 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/92efa466f3b372b348add622ce127a3a7c2cfe60 [^]

Related to issue 38927: To calculate pending to pay in a foreign amount it is
not used the configured multiply by rate

- Changed these test was required because there are difference in the cents of
total amount

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashmanagement/I35779_CashMgmLongDescription.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashup/CashupMulticurrencyPrecissionCheck.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashup/I26806_CashupTotalNotShown.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashup/I28181_CashupWrongWithdrawalSummary.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashup/I28491_WrongWithdrawalSection.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashup/I31790_CashupAmountToKeep.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/layaway/I31279_LayawayUSACashPayments.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/layaway/LayawayRetrieval.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/layaway/LayawayVerifyPaymentsInformation.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I29558_IncorrectCurrencyAmountAfterCancelingPayment.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I36982_TransactionsPaidWithOtherCurrencyReturnChangeInDefaultCurrency.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/CreateMulticurrencySale.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/CreateMulticurrencySaleWithPrecissionCheck.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/I28084_SaleLogoutinCheckCash.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/storecurrencyexchangerate/VerifyPaymentBasedOnStoreConversionRate.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I31677_VerifyPaymentMethodSelectionII.java
---
(0107285)
hgbot   
2018-10-15 10:31   
Repository: tools/automation/pi-mobile
Changeset: 9e060b382c376f52b60839f7769132d415fe7e36
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Tue Sep 18 13:39:31 2018 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/9e060b382c376f52b60839f7769132d415fe7e36 [^]

Related to issue 38927: added automated test

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/payment/I38927_VerifyPendingPayInForeignAmount.java
---
(0107487)
migueldejuana   
2018-10-22 15:20   
This issue is not an issue and the changeset have been reverted