Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0018145Openbravo ERP09. Financial managementpublic2011-08-01 14:022011-08-01 17:14
malsasua 
jonalegriaesarte 
highminoralways
closedno change required 
20Community Appliance
2.50MP31 
2.50MP35 
Google Chrome
Core
No
0018145: 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.
depends on backport 00181462.50MP35 closed ioritzCia incorrect error to process bank statement post with multicurrency 
Issue History
2011-08-01 14:02malsasuaNew Issue
2011-08-01 14:02malsasuaAssigned To => jonalegriaesarte
2011-08-01 14:02malsasuaWeb browser => Google Chrome
2011-08-01 14:02malsasuaModules => Core
2011-08-01 14:05malsasuaIssue Monitored: networkb
2011-08-01 14:06malsasuaStatusnew => acknowledged
2011-08-01 14:06malsasuaStatusacknowledged => scheduled
2011-08-01 14:06malsasuafix_in_branch => pi
2011-08-01 17:14jonalegriaesarteNote Added: 0039749
2011-08-01 17:14jonalegriaesarteStatusscheduled => closed
2011-08-01 17:14jonalegriaesarteResolutionopen => no change required

Notes
(0039749)
jonalegriaesarte   
2011-08-01 17:14   
New flow is not affected.