Openbravo Issue Tracking System - Retail Modules
View Issue Details
0041114Retail ModulesWeb POSpublic2019-06-18 11:152019-06-26 14:10
inaki_garcia 
rqueralta 
immediatemajoralways
closedfixed 
5
pi 
RR19Q3 
marvintm
Automated tests
2019-06-11
main
https://code.openbravo.com/erp/devel/pi/rev/9cc793f1bb71e37b7f18eb6716ea760dafe55815 [^]
No
0041114: Invoicing an Order with a prepayment in a different currency shows inconsistent Received Amounts in the Payment Plan of Order
When invoicing an Order by partially prepaying it to a different currency (such as from EUR to USD), the Received Amount in the foreign currency doesn't match the original one. The Received foreign amount seems to match that of the Expected Amount for the Order.

This issue has arised thanks to the automated tests contributed for the related issue, SALRegression31873In*, which are running in the qa-pi-salreg and qa-pi-proreg jobs of the "qa" tab in
CI. It's reproducible in "main" and "pi" as of june 2019, but not in PR19Q1.1.

The steps to reproduce by the automated test are similar to these of the related issue. If further configuration details were needed, check the related issue
https://issues.openbravo.com/view.php?id=29403 [^]

0. Define conversion rate for today between EUR and USD
0. Define Prepayment account for Bebidas Alegres business partner in Vendor Accounting tab
0. Ensure that there is a Price List in USD currency, for purchase transactions. If it doesn't exist, create it
0. Define Financial Account payment to use different currencies for the same organization the Business Partner belongs to. Create a new Payment Method if needed which has the
"Receive Payments in Multiple Currencies" and "Make Payments in Multiple Currencies" checkboxes checked
1. Register Purchase Order for "España" org and "Bebidas Alegres" BP with the newly created Payment Method and with "Immediate" Invoice Term. Add any line setting qty=2 and process
2. Register Payment via the "Add Payment" process action to prepay the order completely
3. Register Purchase Invoice for "España" org and "Bebidas Alegres" BP. Run "Create lines from" and select previous order. Edit qty to set 1 and process
4. Post invoice and realize that entry generated for International Group ledger (in USD) is not correct as balance of prepayment account is not the invoice gross amount converted
4*. NOTICE that in the Payment Details of the first payment of the Payment Plan of the original Sales/Purchase Order, the "Received Amount *" and "Received (Account Currency)" fields don't match with each other

The execution of the automated test is depicted in the attached video, and the step 4*. can be checked in the 08:45-09:05 timeframe.
No tags attached.
related to defect 00318733.0PR16Q2 closed vmromanos Openbravo ERP Wrong multicurrency accounting entry when posting partial invoice related to a prepaid order 
caused by defect 0040928 closed rqueralta Retail Modules The precision of the financial account currency is not used in transactions when paying a ticket with a different currency 
? text.ParseException __ 17-06-2019 09_47_17.avi (4,655,248) 2019-06-18 11:15
https://issues.openbravo.com/file_download.php?file_id=13023&type=bug
Issue History
2019-06-18 11:15inaki_garciaNew Issue
2019-06-18 11:15inaki_garciaAssigned To => Triage Finance
2019-06-18 11:15inaki_garciaFile Added: text.ParseException __ 17-06-2019 09_47_17.avi
2019-06-18 11:15inaki_garciaModules => Core
2019-06-18 11:15inaki_garciaRegression introduced in release => main
2019-06-18 11:15inaki_garciaTriggers an Emergency Pack => No
2019-06-18 11:15inaki_garciaIssue generated from0031873
2019-06-18 11:15inaki_garciaRelationship addedrelated to 0031873
2019-06-18 11:25inaki_garciaversionmain => pi
2019-06-18 12:57inaki_garciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18954#r18954
2019-06-18 13:40SandrahuguetRegression level => Automated tests
2019-06-18 13:40SandrahuguetRegression date => 2019-06-11
2019-06-18 13:40SandrahuguetRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/9cc793f1bb71e37b7f18eb6716ea760dafe55815 [^]
2019-06-18 13:40SandrahuguetAssigned ToTriage Finance => Retail
2019-06-18 13:52jorge-garciaProjectOpenbravo ERP => Retail Modules
2019-06-18 13:53jorge-garciaCategory09. Financial management => Web POS
2019-06-18 14:00jorge-garciaRelationship addedcaused by 0040928
2019-06-18 14:26ngarciaIssue Monitored: ngarcia
2019-06-24 12:21guilleaerStatusnew => scheduled
2019-06-24 12:22guilleaerNote Added: 0112972
2019-06-24 12:22guilleaerStatusscheduled => resolved
2019-06-24 12:22guilleaerFixed in Version => RR19Q3
2019-06-24 12:22guilleaerResolutionopen => fixed
2019-06-24 12:22guilleaerAssigned ToRetail => rqueralta
2019-06-24 19:03marvintmStatusresolved => new
2019-06-24 19:03marvintmResolutionfixed => open
2019-06-24 19:03marvintmFixed in VersionRR19Q3 =>
2019-06-26 00:25rqueraltaStatusnew => scheduled
2019-06-26 00:26rqueraltaStatusscheduled => resolved
2019-06-26 00:26rqueraltaResolutionopen => fixed
2019-06-26 14:10marvintmNote Added: 0113033
2019-06-26 14:10marvintmReview Assigned To => marvintm
2019-06-26 14:10marvintmNote Added: 0113034
2019-06-26 14:10marvintmStatusresolved => closed
2019-06-26 14:10marvintmFixed in Version => RR19Q3

Notes
(0112972)
guilleaer   
2019-06-24 12:22   
Repository: erp/devel/pi
Changeset: fedce3dcb450098dfdf30948be3c2e64a5772eb5
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Tue Jun 18 18:28:20 2019 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/fedce3dcb450098dfdf30948be3c2e64a5772eb5 [^] [^]

Fixed issue 40928: The precision of the financial account currency is not
used in transactions when paying a ticket with a different currency

- If Payment_Schedule_Detail amount is different to Fin_Payment amount the
paidconverted is payment amount by rate in other case is the fin_payment amount

---
M src-db/database/model/views/FIN_PAYMENT_DETAIL_V.xml
---
(0113033)
marvintm   
2019-06-26 14:10   
Repository: erp/devel/pi
Changeset: 4a6e7e8d1c4c54b829802143377cb060238e315a
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Tue Jun 25 18:18:00 2019 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/4a6e7e8d1c4c54b829802143377cb060238e315a [^] [^]

Related to issue 40928: Backed out changeset: fedce3dcb450

---
M src-db/database/model/views/FIN_PAYMENT_DETAIL_V.xml
---
(0113034)
marvintm   
2019-06-26 14:10   
Changeset causing the issue was backed out.