Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0018146
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] 09. Financial managementminoralways2011-08-01 14:022011-09-27 10:26
ReportermalsasuaView Statuspublic 
Assigned ToioritzCia 
PriorityhighResolutionfixedFixed in Version2.50MP34
StatusclosedFix in branch2.50Fixed in SCM revision4a0016445109
ProjectionnoneETAnoneTarget Version2.50MP35
OSLinux 32 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionCommunity ApplianceDatabase version8.3.9Ant version1.7.1
Product Version2.50MP31SCM revision 
Review Assigned To
Web browserGoogle Chrome
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0018146: incorrect error to process bank statement post with multicurrency

Descriptionif 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
Steps To Reproduce. 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
Proposed Solutionreplace 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);
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 00181452.50MP35 closedjonalegriaesarte incorrect error to process bank statement post with multicurrency 

-  Notes
(0040685)
hgbot (developer)
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 (developer)
2011-09-27 10:26

verified

- Issue History
Date Modified Username Field Change
2011-08-01 14:06 malsasua Type defect => backport
2011-08-01 14:06 malsasua fix_in_branch => 2.50
2011-08-01 14:08 malsasua Web browser Google Chrome => Google Chrome
2011-08-01 14:08 malsasua Resolution time => 1318370400
2011-08-22 17:54 jonalegriaesarte Assigned To jonalegriaesarte => ioritzCia
2011-09-01 16:55 hgbot Checkin
2011-09-01 16:55 hgbot Note Added: 0040685
2011-09-01 16:55 hgbot Status scheduled => resolved
2011-09-01 16:55 hgbot Resolution open => fixed
2011-09-01 16:55 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/stable/2.50/rev/4a001644510908db8a44608029f02397b807de0e [^]
2011-09-27 10:26 malsasua Note Added: 0041308
2011-09-27 10:26 malsasua Status resolved => closed
2011-09-27 10:26 malsasua Fixed in Version => 2.50MP34


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker