Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0014923Openbravo ERP03. Procurement managementpublic2010-10-19 19:202010-10-30 11:24
psarobe 
dalsasua 
immediatemajoralways
closedfixed 
5
2.50MP22 
2.50MP23 
Core
No
0014923: If there is not warehouse defined, taxes are not properly calculated
If the ERP has no warehouse defined, I mean, there is any warehouse created then taxes are not calculated well
1. Have a context running withou any warehouse
2. Go to Procurement->Transactions->Procurement invoice
3. Click new and select a bpartner
4. Move to lines tab and select a product. Notice that no tax is selected in the combo box when it has to


--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Product.java
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Product.java
@@ -75,12 +75,14 @@
           .getOrganizationStructureProvider(vars.getClient());
       if (!strADOrgID.equals(strWarehouseOrg)) {
         Organization org = OBDal.getInstance().get(Organization.class, strADOrgID);
- Organization warehouseOrg = OBDal.getInstance().get(Organization.class, strWarehouseOrg);
- if (!osp.isInNaturalTree(org, warehouseOrg) && !osp.isInNaturalTree(warehouseOrg, org))
- strWarehouseForOrg = SLOrderProductData.getWarehouseOfOrg(this, vars.getClient(),
- strADOrgID);
- if (!strWarehouseForOrg.equals(""))
- strWharehouse = strWarehouseForOrg;
+ if (strWarehouseOrg != null) {
+ Organization warehouseOrg = OBDal.getInstance().get(Organization.class, strWarehouseOrg);
+ if (!osp.isInNaturalTree(org, warehouseOrg) && !osp.isInNaturalTree(warehouseOrg, org))
+ strWarehouseForOrg = SLOrderProductData.getWarehouseOfOrg(this, vars.getClient(),
+ strADOrgID);
+ if (!strWarehouseForOrg.equals(""))
+ strWharehouse = strWarehouseForOrg;
+ }
       }
       String strTabId = vars.getStringParameter("inpTabId");
Regression
related to defect 0014047 closed dalsasua Taxes in procurement invoice not properly calculate under some circunstances 
Issue History
2010-10-19 19:20psarobeNew Issue
2010-10-19 19:20psarobeAssigned To => dalsasua
2010-10-19 19:20psarobeTag Attached: Regression
2010-10-19 19:20psarobeStatusnew => scheduled
2010-10-19 19:20psarobefix_in_branch => pi
2010-10-19 19:21psarobeNote Added: 0031990
2010-10-19 19:22psarobeRelationship addedrelated to 0014047
2010-10-19 19:22psarobeNote Edited: 0031990bug_revision_view_page.php?bugnote_id=0031990#r1096
2010-10-20 12:24dalsasuafix_in_branchpi =>
2010-10-20 12:24dalsasuaProposed Solution updated
2010-10-20 12:57hgbotCheckin
2010-10-20 12:57hgbotNote Added: 0032006
2010-10-20 12:57hgbotStatusscheduled => resolved
2010-10-20 12:57hgbotResolutionopen => fixed
2010-10-20 12:57hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6d605d17991c46ec97c15c68318a021e44c3b8bd [^]
2010-10-20 23:44hudsonbotCheckin
2010-10-20 23:44hudsonbotNote Added: 0032031
2010-10-22 04:03sureshbabuStatusresolved => closed
2010-10-22 04:03sureshbabuNote Added: 0032088
2010-10-30 11:24anonymoussf_bug_id0 => 3098750

Notes
(0031990)
psarobe   
2010-10-19 19:21   
(edited on: 2010-10-19 19:22)
This regression was introduced by this fix 14047

(0032006)
hgbot   
2010-10-20 12:57   
Repository: erp/devel/pi
Changeset: 6d605d17991c46ec97c15c68318a021e44c3b8bd
Author: David Alsasua <david.alsasua <at> openbravo.com>
Date: Wed Oct 20 12:56:48 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/6d605d17991c46ec97c15c68318a021e44c3b8bd [^]

Fixes issue 14923: If there is not warehouse defined, taxes are not properly calculated

---
M src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Product.java
---
(0032031)
hudsonbot   
2010-10-20 23:44   
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/6d605d17991c [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/580d14a11e98 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18576.obx [^]
(0032088)
sureshbabu   
2010-10-22 04:03   
verified in oracle context