Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011948Openbravo ERP09. Financial managementpublic2010-01-12 19:402010-06-22 14:09
networkb 
rafaroda 
immediatemajoralways
closedfixed 
5
2.50MP9 
2.50MP11 
Core
No
0011948: C_GETTAX doesn't order properly when there are more than one tax rates defined for one tax category
I you define more than one tax rates for the same tax category setting different "Valid from date", when creating documents Tax set is not the correct one
1. Financial Management || Accounting || Setup || Tax Rate || Tax : create a new record with
*Valid from date= 01/01/2010
Sales/Purchase=both
*Tax category=VAT 16 (already created for SmallBazar)

2. Sales Management || Transactions || Sales Order || Header : create new record with date > 01/01/2010
3. Create line with product=beer (which has Tax category=VAT 16) and realize that tax assigned is VAT16% ant not the new one
No tags attached.
related to backport 00134952.40MP13 closed adrianromero C_GETTAX doesn't order properly when there are more than one tax rates defined for one tax category 
Issue History
2010-01-12 19:40networkbNew Issue
2010-01-12 19:40networkbAssigned To => rafaroda
2010-01-13 10:49psarobeStatusnew => scheduled
2010-01-13 10:49psarobefix_in_branch => pi
2010-01-18 14:58hgbotCheckin
2010-01-18 14:58hgbotNote Added: 0023504
2010-01-18 14:58hgbotStatusscheduled => resolved
2010-01-18 14:58hgbotResolutionopen => fixed
2010-01-18 14:58hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/ad62f64f097e762d6250d32e6c87ee4262a681ea [^]
2010-01-18 14:59rafarodaNote Added: 0023505
2010-01-19 07:12arunkumarNote Added: 0023547
2010-01-19 07:12arunkumarStatusresolved => new
2010-01-19 07:12arunkumarResolutionfixed => open
2010-01-19 11:06arunkumarStatusnew => scheduled
2010-01-20 08:34rafarodaStatusscheduled => resolved
2010-01-20 08:34rafarodaResolutionopen => fixed
2010-01-20 08:35arunkumarNote Added: 0023597
2010-01-20 08:35arunkumarStatusresolved => closed
2010-01-20 08:35arunkumarFixed in Version => 2.50MP11
2010-01-20 09:31rafarodaNote Deleted: 0023547
2010-01-20 23:26hudsonbotCheckin
2010-01-20 23:26hudsonbotNote Added: 0023666
2010-01-21 00:00anonymoussf_bug_id0 => 2935929
2010-06-01 16:39adrianromeroIssue cloned0013495
2010-06-01 16:39adrianromeroRelationship addedrelated to 0013495
2010-06-11 16:13hgbotCheckin
2010-06-11 16:13hgbotNote Added: 0028312
2010-06-11 16:13hgbotStatusclosed => resolved
2010-06-11 16:13hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/ad62f64f097e762d6250d32e6c87ee4262a681ea [^] => http://code.openbravo.com/erp/devel/pi/rev/2ad66893bab274a0ed112a8ab2f443612af78846 [^]
2010-06-11 16:15adrianromeroNote Added: 0028313
2010-06-12 22:49hudsonbotCheckin
2010-06-12 22:49hudsonbotNote Added: 0028331
2010-06-14 08:17arunkumarNote Added: 0028339
2010-06-14 08:17arunkumarStatusresolved => closed
2010-06-14 08:17arunkumarFixed in Version2.50MP11 =>
2010-06-14 11:31hgbotCheckin
2010-06-14 11:31hgbotNote Added: 0028351
2010-06-14 11:31hgbotStatusclosed => resolved
2010-06-14 11:31hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/2ad66893bab274a0ed112a8ab2f443612af78846 [^] => http://code.openbravo.com/erp/devel/pi/rev/44c5b03fcca1d1b7526a1171b52c4838e0fc5e2d [^]
2010-06-15 05:43hudsonbotCheckin
2010-06-15 05:43hudsonbotNote Added: 0028401
2010-06-22 14:09arunkumarNote Added: 0028667
2010-06-22 14:09arunkumarStatusresolved => closed

Notes
(0023504)
hgbot   
2010-01-18 14:58   
Repository: erp/devel/pi
Changeset: ad62f64f097e762d6250d32e6c87ee4262a681ea
Author: Rafa Roda Palacios <rafael.roda <at> openbravo.com>
Date: Sun Jan 17 18:53:10 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/ad62f64f097e762d6250d32e6c87ee4262a681ea [^]

Fixes issue 11948 Modified C_GETTAX to select the newest valid tax.

---
M src-db/database/model/functions/C_GETTAX.xml
---
(0023505)
rafaroda   
2010-01-18 14:59   
Steps to test the fix:
1) Navigate to Financial Management || Accounting || Setup || Tax Rate || Tax and create a new record.
* Name = New 16%
* Valid From = 01-01-2010 (this is important: tax selection among valid taxes must be based on this date, taking the newest one that may have been added because of a modification in the new tax policy)
* Tax Category = VAT 16%
* Sales/Purchase Type = Both
* Rate = 16%
2) Navigate to Tax Zone tab and select From Country and To Country = Spain
3) Create a Sales Order.
4) Create a line for product Grand Beer (which has Tax Category = VAT 16%)
In Tax drop-down list New 16% tax must be selected automatically.
(0023597)
arunkumar   
2010-01-20 08:35   
Tested & Working fine
(0023666)
hudsonbot   
2010-01-20 23:26   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/ad62f64f097e [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/fa6621f85351 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/obx/core/OpenbravoERP-2.50CI.15942.obx [^]
(0028312)
hgbot   
2010-06-11 16:13   
Repository: erp/devel/pi
Changeset: 2ad66893bab274a0ed112a8ab2f443612af78846
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Fri Jun 11 16:13:19 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/2ad66893bab274a0ed112a8ab2f443612af78846 [^]

Fixes issue 0011948: C_GETTAX doesn't order properly when there are more than one tax rates defined for one tax category
The ORDER BY clause has been modified in order to take into account first the field Valid From Date

---
M src-db/database/model/functions/C_GETTAX.xml
---
(0028313)
adrianromero   
2010-06-11 16:15   
* Test the issue
Follow the steps to test and verify that now the new tax is selected. It has been added a new change set because the first changeset did not fixed the issue in all cases. When different Locations, or Business partner categories are involved it did not worked because the order by ValidFrom field must be in the first place of the ORDER BY clause.

* Other areas affected
All windows that call the C_GETTAX function are affected but only the behavior of what tax is selected first depending on the ValidFrom value is affected no other possibles changes can appear.
(0028331)
hudsonbot   
2010-06-12 22:49   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/2ad66893bab2 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/0b85119b92bc [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17589.obx [^]
(0028339)
arunkumar   
2010-06-14 08:17   
Tested working fine
(0028351)
hgbot   
2010-06-14 11:31   
Repository: erp/devel/pi
Changeset: 44c5b03fcca1d1b7526a1171b52c4838e0fc5e2d
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Mon Jun 14 11:30:02 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/44c5b03fcca1d1b7526a1171b52c4838e0fc5e2d [^]

Fixes issue 0011948: C_GETTAX doesn't order properly when there are more than one tax rates defined for one tax category
Reverting last change it was incorrect

---
M src-db/database/model/functions/C_GETTAX.xml
---
(0028401)
hudsonbot   
2010-06-15 05:43   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/44c5b03fcca1 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/f7644da65496 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17606.obx [^]
(0028667)
arunkumar   
2010-06-22 14:09   
Tested working fine