Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0015793Openbravo ERP09. Financial managementpublic2011-01-27 13:172011-03-01 12:36
adrianromero 
dalsasua 
urgentmajoralways
closedfixed 
5
2.50MP24 
2.50MP27 
Core
No
0015793: accounting generated in cancellation settlement of a bank statement, with currency distinct to schema currency, is not correct
if you create a debt payment from bank statement line (with currency distinct to schema currency) and then create invoice (with currency distinct to schema currency) which match with cancellation settlement associated to bank statement,
when you post the settlement C generated to match both payments the accounting is wrong
1. create conversion rates:
General Setup || Application || Conversion Rates || Conversion Rate
 new record:
   from currency EUR
   to currency USD
   valid from 01/01/2010
   valid to 30/08/2010
   multiply rate 3
   divide rate 0.333333
 new record:
   from currency USD
   to currency EUR
   valid from 01/01/2010
   valid to 30/08/2010
   multiply rate 0.333333
   divide rate 3
 new record:
   from currency EUR
   to currency USD
   valid from 01/09/2010
   valid to 22/12/2222
   multiply rate 2
   divide rate 0.5
 new record:
   from currency USD
   to currency EUR
   valid from 01/09/2010
   valid to 22/12/2222
   multiply rate 0.5
   divide rate 2

2. create bank statement
Financial Management || Receivables & Payables || Transactions || Bank Statement || Header
 Transaction Date 30/08/2010

3. create payment: Financial Management || Receivables & Payables || Transactions || Bank Statement || Header >> Lines
 run create payment process
  business partner: mcGiver
  amount 100
  currency USD
  Form of payment: bank deposit
  receipt=YES
4. process and post bank statement.
5. Master Data Management || Pricing || Price List || Price List : create pricelist in USD and set price for Hat product
6. Sales Management || Transactions || Sales Invoice || Header : create sales invoice for USD pricelist and Mcgiver for date=27-12-2010
Add line for hat for 100euro. Process invoice.

7. Go to Sales Management || Transactions || Sales Invoice || Header >> Payment and realize that SettlementCancelled *C* has been created using system's date. Navigate to it and Post it. Realize that entry generated is:
66800 Diferencias negativas de cambio
43000 Clientes (euros)
43000 Clientes (euros)
the date of settlement *C* generated should not be system (today) date
No tags attached.
depends on defect 00155332.50MP26 closed dalsasua accounting generated in cancellation settlement of a bank statement, with currency distinct to schema currency, is not correct 
Issue History
2011-01-27 13:17adrianromeroNew Issue
2011-01-27 13:17adrianromeroAssigned To => dalsasua
2011-01-27 13:17adrianromeroModules => Core
2011-01-27 13:17adrianromeroIssue generated from0015533
2011-01-27 13:17adrianromeroRelationship addeddepends on 0015533
2011-01-27 13:18adrianromeroStatusnew => scheduled
2011-01-31 11:20dalsasuafix_in_branch => 2.50
2011-01-31 12:32dalsasuaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=1460#r1460
2011-01-31 12:46dalsasuaNote Added: 0033964
2011-02-01 12:13hgbotCheckin
2011-02-01 12:13hgbotNote Added: 0033984
2011-02-01 12:13hgbotStatusscheduled => resolved
2011-02-01 12:13hgbotResolutionopen => fixed
2011-02-01 12:13hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.50/rev/581935359120ec90b9d12afec0e698d6badd5f56 [^]
2011-03-01 12:36maiteNote Added: 0034468
2011-03-01 12:36maiteStatusresolved => closed
2011-03-01 12:36maiteFixed in Version => 2.50MP27

Notes
(0033964)
dalsasua   
2011-01-31 12:46   
In order to fix this issue, processing of the invoice will be changed: when creating the new settlement, it will use invoice dates, and not system date. Please notice that this will not avoid the appearance of the currency balancing account for all cases. In the reported scenario, for example, we have:
1- One payment created on 30/08/2010 (conversion rate 1:3)
2- One invoice created on January 2011 (conversion rate 1:2)
The total flow of the transaction related is:
On 30/08/2010-> Settlement that creates the payment
43000..Clientes.............33,33..............
43000..Clientes............-33,33..............
On January 2011-> Invoice
70000..Ventas...........................50,00..
43000..Clientes.............50,00..............
On January 2011-> Settlement that cancels the payment
43000..Clientes.........................50,00.. <- To cancel the amount posted by the invoice
43000..Clientes........................-33,33.. <- To cancel the amount posted by the creation settlement
66800..Diferencias cambio...16,67.............. <- Difference between conversion rate when payment creation was posted, and rate when payment cancellation is posted.
(0033984)
hgbot   
2011-02-01 12:13   
Repository: erp/stable/2.50
Changeset: 581935359120ec90b9d12afec0e698d6badd5f56
Author: David Alsasua <david.alsasua <at> openbravo.com>
Date: Mon Jan 31 13:03:53 2011 +0100
URL: http://code.openbravo.com/erp/stable/2.50/rev/581935359120ec90b9d12afec0e698d6badd5f56 [^]

Fixes issue 15793. Settlement uses invoice dates when created

---
M src-db/database/model/functions/C_INVOICE_POST.xml
---
(0034468)
maite   
2011-03-01 12:36   
verified