Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0037155Openbravo ERPZ. Otherspublic2017-10-24 12:292018-01-03 12:38
maite 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
3.0PR18Q1 
dmiguelez
Advanced Payables and Receivables Mngmt
No
0037155: Wrong transaction's accounting entry when working with multicurrency doubtful debt
Not properly conversion is being done so account "Currency balancing" is used
0. Enable Doubtful Debt functionality by creating Preference with Attribute 'Doubtful_Debt_Visibility' and Value 'Y'
1. Access Business Partner Category window and define Accounting for "Customer - Tier 2" and accounts:

Doubtful Debt Account
Bad Debt Expense Account
Bad Debt Revenue Account
and Allowance for Bad Debts Account.

2. Define new "Conversion Rate" between MXN and USD with Multiplied by=2
3. Create Price List for * organization, MXN currency and Sales Price list=Y. Add any pricelist version. Add product price "Lager Beer" with price 20
4. Register Sales Invoice for "F&B US, Inc." organization, "Moon Light Restaurants, Co." business partner and "Mexican pricelist".
5. Add line for defined product, qty=1. Process invoice and post it. Realize that "1130 - Accounts Receivable" is affected with balance 40
6. Create "Doubtful Debt Run" record for "F&B US, Inc." organization, "Moon Light Restaurants, Co." business partner. Run "Select Doubtful Debt" and select previous invoice. Process
7. Access "Doubtful Debt" window and post record. Realize that balance is properly converted to 40
8. Access Financial Account "Bank - Account 1 - USD" and configure "Wire Transfer" payment method as "Receive Payment in Multiple currencies"
9. Register Payment in for "F&B US, Inc." organization, "Moon Light Restaurants, Co." business partner, Payment Date= invoice's date +1 day, "Wire Transfer" payment method, "Amount=20", "MXN" currency, "Exchange Rate=2.5". Run "Add details" process and select previous invoice. Process payment and register financial account transaction in same step
10. Navigate to Financial Account and Post transaction document. Realize that "Currency balancing" account is used because balance has not been converted (it is 20 when it should be 40, so if you current check balance of doubtful debt accounts you can see that it is not 0)
No tags attached.
Issue History
2017-10-24 12:29maiteNew Issue
2017-10-24 12:29maiteAssigned To => Triage Finance
2017-10-24 12:29maiteModules => Advanced Payables and Receivables Mngmt
2017-10-24 12:29maiteResolution time => 1510614000
2017-10-24 12:29maiteTriggers an Emergency Pack => No
2017-10-24 12:31maiteIssue Monitored: networkb
2017-10-25 08:28dmiguelezAssigned ToTriage Finance => AtulOpenbravo
2017-10-26 21:04AtulOpenbravoStatusnew => scheduled
2017-10-27 10:34AtulOpenbravoNote Added: 0100097
2017-10-27 10:45AtulOpenbravoNote Added: 0100098
2017-11-03 11:44dmiguelezNote Added: 0100245
2017-11-06 09:07hgbotCheckin
2017-11-06 09:07hgbotNote Added: 0100274
2017-11-06 09:07hgbotStatusscheduled => resolved
2017-11-06 09:07hgbotResolutionopen => fixed
2017-11-06 09:07hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c4adf2ef35194d79f4c18d905ad4d37c07c6afcd [^]
2017-11-06 09:07hgbotCheckin
2017-11-06 09:07hgbotNote Added: 0100275
2017-11-06 09:08dmiguelezReview Assigned To => dmiguelez
2017-11-06 09:08dmiguelezNote Added: 0100276
2017-11-06 09:08dmiguelezStatusresolved => closed
2017-11-06 16:05dmiguelezFixed in Version => 3.0PR18Q1
2018-01-03 12:38hudsonbotCheckin
2018-01-03 12:38hudsonbotNote Added: 0101372
2018-01-03 12:38hudsonbotCheckin
2018-01-03 12:38hudsonbotNote Added: 0101373

Notes
(0100097)
AtulOpenbravo   
2017-10-27 10:34   
Test Plan

- Enable Doubtful Debt functionality by creating Preference with Attribute 'Doubtful_Debt_Visibility' and Value 'Y'
- Access Business Partner Category window and define Accounting for "Customer - Tier 2" and accounts:
   - Doubtful Debt Account
   - Bad Debt Expense Account
   - Bad Debt Revenue Account
   - Allowance for Bad Debts Account.

- Define new "Conversion Rate" between MXN and USD with Multiplied by=2
- Create Price List for * organization, MXN currency and Sales Price list=Y. -
- Add any pricelist version. Add product price "Lager Beer" with price 20
- Register Sales Invoice for "F&B US, Inc." organization, "Moon Light Restaurants, Co." business partner and "Mexican pricelist".
- Add line for defined product, qty=1. Process invoice and post it. Realize that "1130 - Accounts Receivable" is affected with balance 40
- Create "Doubtful Debt Run" record for "F&B US, Inc." organization, "Moon Light Restaurants, Co." business partner. Run "Select Doubtful Debt" and select previous invoice. Process
- Access "Doubtful Debt" window and post record. Realize that balance is properly converted to 40
- Access Financial Account "Bank - Account 1 - USD" and configure "Wire Transfer" payment method as "Receive Payment in Multiple currencies"
- Register Payment in for "F&B US, Inc." organization, "Moon Light Restaurants, Co." business partner, Payment Date= invoice's date +1 day, "Wire Transfer" payment method, "Amount=20", "MXN" currency, "Exchange Rate=2.5". Run "Add details" process and select previous invoice. Process payment and register financial account transaction in same step
- Navigate to Financial Account and Post transaction document. Realize that doubtful debt amount has been converted to 40.
(0100098)
AtulOpenbravo   
2017-10-27 10:45   
Test Plan

- Enable Doubtful Debt functionality by creating Preference with Attribute 'Doubtful_Debt_Visibility' and Value 'Y'
- Access Business Partner Category window and define Accounting for "Customer - Tier 2" and accounts:
   - Doubtful Debt Account
   - Bad Debt Expense Account
   - Bad Debt Revenue Account
   - Allowance for Bad Debts Account.

- Define new "Conversion Rate" between MXN and USD with Multiplied by=2
- Create Price List for * organization, MXN currency and Sales Price list=Y. -
- Add any pricelist version. Add product price "Lager Beer" with price 20
- Register Sales Invoice for "F&B US, Inc." organization, "Moon Light Restaurants, Co." business partner and "Mexican pricelist".
- Add line for defined product, qty=1. Process invoice and post it. Realize that "1130 - Accounts Receivable" is affected with balance 40
- Create "Doubtful Debt Run" record for "F&B US, Inc." organization, "Moon Light Restaurants, Co." business partner. Run "Select Doubtful Debt" and select previous invoice. Process
- Access "Doubtful Debt" window and post record. Realize that balance is properly converted to 40
- Access Financial Account "Bank - Account 1 - USD" and configure "Wire Transfer" payment method,
  set "Receive Payment in Multiple currencies" = Yes,
  set Upon Receipt use = Blank
  set Upon Deposit use = Blank
  set Upon Reconciliation use = Deposited Payment Account.
  set Upon Payment use = Blank
  set Upon Withdrawal use = Blank
  set Upon Reconciliation use = Withdrawn Payment Account.
- Register Payment in for "F&B US, Inc." organization, "Moon Light Restaurants, Co." business parter, Payment Date= invoice's date +1 day, "Wire Transfer" payment method, "Amount=20", "MXN" currency, "Exchange Rate=2.5". Run "Add details" process and select previous invoice. Process payment and register financial account transaction in same step
- Navigate to Financial Account, Bank Statement tab create a header with name Test 37155.
- Create line for Moon Light Restaurants, Co. business partner and amount in = 40. Process bank statement.
- In Financial Account, click Match Statement button, realize that previous bank statement line and payment is matched automatically.
- Click on Reconcile All and navigate to reconciliation tab, select record created in previous step.
- Post reconciliation.
- Realize that Doubt Debt Account is posted with credit amount 40, Allowance for Bad Debt Acct Debited with amount 40, Bad Debt Revenue Acct is credited with amount 40. All these amounts are properly converted.
(0100245)
dmiguelez   
2017-11-03 11:44   
Test Plan

- Enable Doubtful Debt functionality by creating Preference with Attribute 'Doubtful_Debt_Visibility' and Value 'Y'
- Access Business Partner Category window and define Accounting for "Customer - Tier 2" and accounts:
   - Doubtful Debt Account
   - Bad Debt Expense Account
   - Bad Debt Revenue Account
   - Allowance for Bad Debts Account.

- Define new "Conversion Rate" between MXN and USD with Multiplied by=2
- Create Price List for * organization, MXN currency and Sales Price list=Y. -
- Add any pricelist version. Add product price "Lager Beer" with price 20
- Register Sales Invoice for "F&B US, Inc." organization, "Moon Light Restaurants, Co." business partner and "Mexican pricelist".
- Add line for defined product, qty=1. Process invoice and post it. Realize that "1130 - Accounts Receivable" is affected with balance 40
- Create "Doubtful Debt Run" record for "F&B US, Inc." organization, "Moon Light Restaurants, Co." business partner. Run "Select Doubtful Debt" and select previous invoice. Process
- Access "Doubtful Debt" window and post record. Realize that balance is properly converted to 40
- Access Financial Account "Bank - Account 1 - USD" and configure "Wire Transfer" payment method,
  set "Receive Payment in Multiple currencies" = Yes,
  set Upon Receipt use = Cleared Payment Account
  set Upon Deposit use = Blank
  set Upon Reconciliation use = Blank
  set Upon Payment use = Cleared Payment Account
  set Upon Withdrawal use = Blank
  set Upon Reconciliation use = Withdrawn Payment Account.
- Register Payment in for "F&B US, Inc." organization, "Moon Light Restaurants, Co." business parter, Payment Date= invoice's date +1 day, "Wire Transfer" payment method, "Amount=20", "MXN" currency, "Exchange Rate=2.5". Run "Add details" process and select previous invoice. Process payment and register financial account transaction in same step
- Post payment.
- Realize that Doubt Debt Account is posted with credit amount 40, Allowance for Bad Debt Acct Debited with amount 40, Bad Debt Revenue Acct is credited with amount 40. All these amounts are properly converted.
(0100274)
hgbot   
2017-11-06 09:07   
Repository: erp/devel/pi
Changeset: c4adf2ef35194d79f4c18d905ad4d37c07c6afcd
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Thu Oct 26 22:43:25 2017 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/c4adf2ef35194d79f4c18d905ad4d37c07c6afcd [^]

Fixes Issue 37155:Wrong transaction's accounting entry when
working with multicurrency doubtful debt

Use invoice currency for fact acct line instead of financial
account transaction currency in case of doubtful debt posting

---
M src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
M src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java
---
(0100275)
hgbot   
2017-11-06 09:07   
Repository: erp/devel/pi
Changeset: d0a5ddee9b68239c16e35e5fc813f8c5fd495ccc
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Fri Nov 03 11:59:33 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/d0a5ddee9b68239c16e35e5fc813f8c5fd495ccc [^]

Related to Issue 37155. Fixes conversion rate at doc level for posting
Reconciliations with Doubtful Debts

* When creating a new DocLine for DoubfulDebts, use a DocReconciliationLine
  instance, which is a child of DocLine
* Set the Transaction Id to the new DocLine
* This will allow to retrieve the conversion at Document Level from the Transaction
  when calculating the amount paid
* Added explanatory comments

---
M src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
M src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java
---
(0100276)
dmiguelez   
2017-11-06 09:08   
Code Review + Testing Ok
(0101372)
hudsonbot   
2018-01-03 12:38   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c81e0d3cbab5 [^]
Maturity status: Test
(0101373)
hudsonbot   
2018-01-03 12:38   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c81e0d3cbab5 [^]
Maturity status: Test