Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011158Openbravo ERP09. Financial managementpublic2009-10-28 12:172009-11-19 00:00
networkb 
vmromanos 
urgentmajoralways
closedfixed 
5
2.50MP7 
2.50MP92.50MP9 
Core
No
0011158: Method selectLinesPeriodClosed from DocLineBank_data.xsql takes C_Calendar_ID from AD_ClientInfo instead of from AD_Org
In 2.50 you can now define the calendar for organization's level (instead of entity level as before) but this select continue taking calendar information from entity instead of from organization.
In this select change table ad_clientinfo by ad_org:

SELECT COUNT(*) AS COUNT
FROM C_BANKSTATEMENTLINE BL left join C_DEBT_PAYMENT DP on BL.C_DEBT_PAYMENT_ID
= DP.C_DEBT_PAYMENT_ID
WHERE C_BANKSTATEMENT_ID = ?
AND EXISTS (SELECT 1
FROM C_YEAR, C_PERIOD, C_PERIODCONTROL, AD_CLIENTINFO
WHERE C_YEAR.C_YEAR_ID = C_PERIOD.C_YEAR_ID
AND C_PERIOD.C_PERIOD_ID = C_PERIODCONTROL.C_PERIOD_ID
AND C_YEAR.C_CALENDAR_ID = AD_CLIENTINFO.C_CALENDAR_ID
AND AD_CLIENTINFO.AD_CLIENT_ID = BL.AD_CLIENT_ID
AND C_PERIODCONTROL.DOCBASETYPE = 'CMB'
AND C_PERIODCONTROL.PERIODSTATUS <> 'O'
AND BL.DATEACCT >= C_PERIOD.STARTDATE
AND BL.DATEACCT < C_PERIOD.ENDDATE + 1)
GROUP BY bl.line
ORDER BY LINE
No tags attached.
related to defect 00111572.50MP9 closed vinothbabu callout SL_Journal_Period takes C_Calendar_ID from AD_ClientInfo instead of from 
Issue History
2009-10-28 12:17networkbNew Issue
2009-10-28 12:17networkbAssigned To => rafaroda
2009-10-28 14:36rafarodaNote Added: 0021447
2009-10-28 14:36rafarodaAssigned Torafaroda => dalsasua
2009-10-28 14:36rafarodaPriorityimmediate => urgent
2009-10-28 14:36rafarodaStatusnew => scheduled
2009-10-28 14:37rafarodaRelationship addedrelated to 0011157
2009-10-29 19:07networkbNote Added: 0021478
2009-11-05 12:33vmromanosNote Added: 0021604
2009-11-16 13:11vmromanosAssigned Todalsasua => vmromanos
2009-11-16 15:40hgbotCheckin
2009-11-16 15:40hgbotNote Added: 0021862
2009-11-16 15:40hgbotStatusscheduled => resolved
2009-11-16 15:40hgbotResolutionopen => fixed
2009-11-16 15:40hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/37c9fc63f10b1fd280f06c85f21c2edaf5242481 [^]
2009-11-16 15:43hgbotCheckin
2009-11-16 15:43hgbotNote Added: 0021864
2009-11-16 15:43hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/37c9fc63f10b1fd280f06c85f21c2edaf5242481 [^] => http://code.openbravo.com/erp/devel/pi/rev/67ec1d5a7b16307ebe5d90f8edc694388386ba5b [^]
2009-11-18 08:13sureshbabuNote Added: 0021939
2009-11-18 08:13sureshbabuStatusresolved => closed
2009-11-18 08:13sureshbabuFixed in Version => 2.50MP9
2009-11-19 00:00anonymoussf_bug_id0 => 2900155

Notes
(0021447)
rafaroda   
2009-10-28 14:36   
Please provide proper steps to reproduce this issue.
(0021478)
networkb   
2009-10-29 19:07   
We can not provide Steps To Reproduce because the bug was found reviewing source code.
(0021604)
vmromanos   
2009-11-05 12:33   
Instead of getting the calendar directly from the organization, use the ad_org_getcalendarowner(p_organization character varying) database function
(0021862)
hgbot   
2009-11-16 15:40   
Repository: erp/devel/pi
Changeset: 37c9fc63f10b1fd280f06c85f21c2edaf5242481
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Mon Nov 16 15:39:01 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/37c9fc63f10b1fd280f06c85f21c2edaf5242481 [^]

Fixed bug 11158: Method selectLinesPeriodClosed in DocLineBank_data.xsql

---
M src/org/openbravo/erpCommon/ad_forms/DocLineBank_data.xsql
---
(0021864)
hgbot   
2009-11-16 15:43   
Repository: erp/devel/pi
Changeset: 67ec1d5a7b16307ebe5d90f8edc694388386ba5b
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Mon Nov 16 15:45:43 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/67ec1d5a7b16307ebe5d90f8edc694388386ba5b [^]

Issue 11158: updated copyright year

---
M src/org/openbravo/erpCommon/ad_forms/DocLineBank_data.xsql
---
(0021939)
sureshbabu   
2009-11-18 08:13   
Tested working fine (Steps which i followed to cross check the fix: Repeated the same steps mentioned in the issue id 11157 for creating new organization and periods for the newly created organization, then i created bank statement and executed Bank report)