Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0015140Openbravo ERP09. Financial managementpublic2010-11-09 11:422012-05-25 12:10
dalsasua 
vmromanos 
normalminoralways
closedfixed 
20Ubuntu 9.04
pi 
 
Core
No
0015140: C_TaxPayment_Post procedure retrieves incorrectly the GL Categories
In C_TaxPayment_Post we can see:
      select max(gl_category_id)
      into v_gl_category_id
      from gl_category where name='Standard';
where is not filtering by ad_client_id, so it could retrieve the gl_category_id belonging to a different client. Actually, after Initial Client Setup refactor project, this gl_category elements can be defined at an organization level.
Change mentioned sql by another one that:
1.- Tries to retrieve the gl_category elements belonging to the suitable organization.
2.- If none, then belonging to the suitable client.
3.- If none, the one defined for client with ad_client_id='0'
VMA-Reviewed
Issue History
2010-11-09 11:42dalsasuaNew Issue
2010-11-09 11:42dalsasuaAssigned To => dalsasua
2011-07-20 18:17dalsasuaAssigned Todalsasua => jonalegriaesarte
2011-10-29 18:28psarobeStatusnew => scheduled
2011-10-29 18:28psarobefix_in_branch => pi
2012-02-15 19:04iciordiaAssigned Tojonalegriaesarte => vmromanos
2012-02-16 17:22vmromanosTag Attached: VMA-Reviewed
2012-05-04 11:40naiaramartinezNote Added: 0048370
2012-05-08 19:20hgbotCheckin
2012-05-08 19:20hgbotNote Added: 0048478
2012-05-08 19:20hgbotStatusscheduled => resolved
2012-05-08 19:20hgbotResolutionopen => fixed
2012-05-08 19:20hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/35f4310c1d259e49734859ac07bc71c378ce8dae [^]
2012-05-08 19:21miruritaNote Added: 0048480
2012-05-08 19:21miruritaStatusresolved => closed
2012-05-25 12:10hudsonbotCheckin
2012-05-25 12:10hudsonbotNote Added: 0049067

Notes
(0048370)
naiaramartinez   
2012-05-04 11:40   
Test Plan:
  Go to Tax Register Type window and create new record:
     Organization: F&B US, Inc.
     Sales transaction: no
     The selected G/L item has to have an accounting schema.
  Go to lines tab create new record:
     tax: NY Sales Tax - US State Sales Tax
     Document type: AP Invoice
  Create another tax regster type:
     Organization: F&B US, Inc.
     Sales transaction: yes
     The selected G/L item has to have an accounting schema.
  Go to lines tab create new record:
     tax: NY Sales Tax - US State Sales Tax
     Document type: AR Invoice

  Go to G/L Category window:
     Select the record that has 'Standard' as name.
     Chagne the Organziation and set 'F&B España - Región Norte'

  Go to Tax Payment window and create a new record:
     Organization: F&B US, Inc.
  Press Process button and notice that an error message is shown.

  Now, go back to G/L Category window:
     Select the record that has 'Standard' as name.
     Change the Organziation and set '*'
  
  Go back to Tax Payment window. Select the newly created record. Press Process button. Notice that now the tax payment is processed.
(0048478)
hgbot   
2012-05-08 19:20   
Repository: erp/devel/pi
Changeset: 35f4310c1d259e49734859ac07bc71c378ce8dae
Author: Naiara Martinez <naiara.martinez <at> openbravo.com>
Date: Tue May 08 14:02:33 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/35f4310c1d259e49734859ac07bc71c378ce8dae [^]

fixed bug 15140 in c_taxPayment_post add an organization and client validation
this is done to retrieve correctly the GL Categories

---
M src-db/database/model/functions/C_TAXPAYMENT_POST.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0048480)
mirurita   
2012-05-08 19:21   
code review + testing OK
(0049067)
hudsonbot   
2012-05-25 12:10   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5401e185a8b0 [^]

Maturity status: Test