Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0018146Openbravo ERP09. Financial managementpublic2011-08-01 14:022011-09-27 10:26
malsasua 
ioritzCia 
highminoralways
closedfixed 
20Community Appliance
2.50MP31 
2.50MP352.50MP34 
Google Chrome
Core
No
0018146: incorrect error to process bank statement post with multicurrency
if you have a bank statement with a debt payment with transaction date distinct to statement date, and the conversion rate in transaction date is distinct that conversion rate of statement date, when you process it, error is returned
. conversion rate 15/02/2011 from USD to EUR = 2 / 0.5
. conversion rate 15/03/2011 from USD to EUR = 4 / 0.25
. a bank statement in EUR, with statement date 15/02/2011
. add a debt payments in USD, with transaction date 15/03/2011
. process it
Error is returned
replace in c_bankstatement_post :
SELECT COUNT(*),
MAX(bsl.Line)
INTO v_count,
v_line
FROM C_BANKSTATEMENTLINE bsl,
C_BANKSTATEMENT bs,
C_DEBT_PAYMENT dp
WHERE bsl.C_BankStatement_ID=bs.C_BankStatement_ID
AND bsl.C_BankStatement_ID=v_Record_ID
AND bsl.C_Debt_Payment_ID=dp.C_Debt_Payment_ID
AND bsl.C_Currency_ID<>dp.C_Currency_ID
AND
C_Currency_Round(C_Currency_Convert(
(CASE dp.IsReceipt WHEN 'Y' THEN -- If IsReceipt = N, amount*-1
(dp.Amount-coalesce(dp.WriteOffAmt,0)) ELSE(coalesce(dp.WriteOffAmt,0)-dp.Amount)
END), dp.C_Currency_ID, bsl.C_Currency_ID, bs.StatementDate, NULL, bs.AD_Client_ID, bs.AD_Org_ID),bsl.C_Currency_ID, null)
<> C_Currency_Round(bsl.TrxAmt, bsl.C_Currency_ID, null);
by
SELECT COUNT(*),
MAX(bsl.Line)
INTO v_count,
v_line
FROM C_BANKSTATEMENTLINE bsl,
C_BANKSTATEMENT bs,
C_DEBT_PAYMENT dp
WHERE bsl.C_BankStatement_ID=bs.C_BankStatement_ID
AND bsl.C_BankStatement_ID=v_Record_ID
AND bsl.C_Debt_Payment_ID=dp.C_Debt_Payment_ID
AND bsl.C_Currency_ID<>dp.C_Currency_ID
AND
C_Currency_Round(C_Currency_Convert(
(CASE dp.IsReceipt WHEN 'Y' THEN -- If IsReceipt = N, amount*-1
(dp.Amount-coalesce(dp.WriteOffAmt,0)) ELSE(coalesce(dp.WriteOffAmt,0)-dp.Amount)
END), dp.C_Currency_ID, bsl.C_Currency_ID, bsl.ValutaDate, NULL, bs.AD_Client_ID, bs.AD_Org_ID),bsl.C_Currency_ID, null)
<> C_Currency_Round(bsl.TrxAmt, bsl.C_Currency_ID, null);
No tags attached.
blocks defect 00181452.50MP35 closed jonalegriaesarte incorrect error to process bank statement post with multicurrency 
Issue History
2011-08-01 14:06malsasuaTypedefect => backport
2011-08-01 14:06malsasuafix_in_branch => 2.50
2011-08-01 14:08malsasuaWeb browserGoogle Chrome => Google Chrome
2011-08-01 14:08malsasuaResolution time => 1318370400
2011-08-22 17:54jonalegriaesarteAssigned Tojonalegriaesarte => ioritzCia
2011-09-01 16:55hgbotCheckin
2011-09-01 16:55hgbotNote Added: 0040685
2011-09-01 16:55hgbotStatusscheduled => resolved
2011-09-01 16:55hgbotResolutionopen => fixed
2011-09-01 16:55hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.50/rev/4a001644510908db8a44608029f02397b807de0e [^]
2011-09-27 10:26malsasuaNote Added: 0041308
2011-09-27 10:26malsasuaStatusresolved => closed
2011-09-27 10:26malsasuaFixed in Version => 2.50MP34

Notes
(0040685)
hgbot   
2011-09-01 16:55   
Repository: erp/stable/2.50
Changeset: 4a001644510908db8a44608029f02397b807de0e
Author: Ioritz Cia <ioritz.cia <at> openbravo.com>
Date: Thu Sep 01 16:53:00 2011 +0200
URL: http://code.openbravo.com/erp/stable/2.50/rev/4a001644510908db8a44608029f02397b807de0e [^]

Fixes issue 18146: incorrect error to process bank statement post with multicurrency.

---
M src-db/database/model/functions/C_BANKSTATEMENT_POST.xml
---
(0041308)
malsasua   
2011-09-27 10:26   
verified