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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0007039
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 03. Procurement managementmajorsometimes2009-01-21 09:342009-04-21 12:39
ReportermmarquezView Statuspublic 
Assigned ToHennadzi 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchpiFixed in SCM revision12637
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version2.40SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0007039: Purchase Order -> Copy From Order does not find sometimes tax setup

DescriptionWhen you use this option from Purchase order, sometimes does not find the corresponding TAX, and it's ok setup.
Proposed SolutionI'va just upload two file. Anyway, I explain the lines midified:

You have to modify two files (attached):

File "src/org/openbravo/erpCommon/ad_actionButton/CopyFromPOOrder.java":
Replace the next line:

String strCTaxID = Tax.get(this, data[i].mProductId, DateTimeData.today(this), order[0].adOrgId, order[0].mWarehouseId.equals("")?vars.getWarehouse():order[0].mWarehouseId, CopyFromPOOrderData.cBPartnerLocationId(this, order[0].cBpartnerId), CopyFromPOOrderData.cBPartnerLocationId(this, order[0].cBpartnerId), order[0].cProjectId, true);

by

String strCTaxID = Tax.get(this, data[i].mProductId, DateTimeData.today(this), order[0].adOrgId, order[0].mWarehouseId.equals("")?vars.getWarehouse():order[0].mWarehouseId, CopyFromPOOrderData.cBPartnerLocationId(this, order[0].cBpartnerId), CopyFromPOOrderData.cBPartnerLocationId(this, order[0].cBpartnerId), order[0].cProjectId, order[0].issotrx.equals("Y")?true:false);

File "src/org/openbravo/erpCommon/ad_actionButton/CopyFromPOOrder_data.xsql":
In the SqlMethod name="select", replace the next SELECT:

SELECT O.C_BPARTNER_ID, O.C_BPARTNER_LOCATION_ID, O.M_WAREHOUSE_ID, O.C_CURRENCY_ID, O.C_PROJECT_ID,
        O.M_PRICELIST_ID, COALESCE(MAX(OL.LINE),0) AS LINE, O.AD_ORG_ID, O.AD_CLIENT_ID, '' AS C_UOM_ID, '' AS M_PRODUCT_ID,
        '' AS QTYORDERED, '' AS QUANTITYORDER, '' AS M_PRODUCT_UOM_ID,
        '' AS DESCRIPTION, '' AS PRICESTD, '' AS M_OFFER_ID, '' as orderline
        FROM C_ORDER O LEFT JOIN C_ORDERLINE OL ON O.C_ORDER_ID = OL.C_ORDER_ID
        WHERE O.C_ORDER_ID = TO_NUMBER(?)
        GROUP BY O.C_BPARTNER_ID, O.C_BPARTNER_LOCATION_ID, O.M_WAREHOUSE_ID, O.C_CURRENCY_ID, O.C_PROJECT_ID,
        O.M_PRICELIST_ID, O.AD_ORG_ID, O.AD_CLIENT_ID


by

SELECT O.C_BPARTNER_ID, O.C_BPARTNER_LOCATION_ID, O.M_WAREHOUSE_ID, O.C_CURRENCY_ID, O.C_PROJECT_ID,
        O.M_PRICELIST_ID, COALESCE(MAX(OL.LINE),0) AS LINE, O.AD_ORG_ID, O.AD_CLIENT_ID, '' AS C_UOM_ID, '' AS M_PRODUCT_ID,
        '' AS QTYORDERED, '' AS QUANTITYORDER, '' AS M_PRODUCT_UOM_ID,
        '' AS DESCRIPTION, '' AS PRICESTD, '' AS M_OFFER_ID, '' as orderline, O.ISSOTRX
        FROM C_ORDER O LEFT JOIN C_ORDERLINE OL ON O.C_ORDER_ID = OL.C_ORDER_ID
        WHERE O.C_ORDER_ID = TO_NUMBER(?)
        GROUP BY O.C_BPARTNER_ID, O.C_BPARTNER_LOCATION_ID, O.M_WAREHOUSE_ID, O.C_CURRENCY_ID, O.C_PROJECT_ID,
        O.M_PRICELIST_ID, O.AD_ORG_ID, O.AD_CLIENT_ID, O.ISSOTRX
Tagscomsup_sprint5
Attached Files? file icon CopyFromPOOrder.java [^] (10,990 bytes) 2009-01-21 09:34
? file icon CopyFromPOOrder_data.xsql [^] (5,688 bytes) 2009-01-21 09:35

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 0007264 closedHennadzi Purchase Order -> Copy From Order does not find sometimes tax setup 

-  Notes
(0012993)
svnbot (reporter)
2009-02-02 10:50

Repository: openbravo
Revision: 12637
Author: hennadzi
Date: 2009-02-02 10:50:46 +0100 (Mon, 02 Feb 2009)

Fixed bug 0007039: Purchase Order -> Copy From Order does not find sometimes tax setup

---
U trunk/src/org/openbravo/erpCommon/ad_actionButton/CopyFromPOOrder.java
U trunk/src/org/openbravo/erpCommon/ad_actionButton/CopyFromPOOrder_data.xsql
---

https://dev.openbravo.com/websvn/openbravo/?rev=12637&sc=1 [^]

- Issue History
Date Modified Username Field Change
2009-01-21 09:34 mmarquez New Issue
2009-01-21 09:34 mmarquez Assigned To => rafaroda
2009-01-21 09:34 mmarquez sf_bug_id 0 => 2525849
2009-01-21 09:34 mmarquez File Added: CopyFromPOOrder.java
2009-01-21 09:34 mmarquez Issue Monitored: mmarquez
2009-01-21 09:35 mmarquez File Added: CopyFromPOOrder_data.xsql
2009-01-30 12:19 psarobe Status new => scheduled
2009-01-30 12:19 psarobe fix_in_branch => trunk
2009-01-30 13:51 PavelPonomarev Assigned To rafaroda => Hennadzi
2009-02-02 10:50 svnbot Checkin
2009-02-02 10:50 svnbot Note Added: 0012993
2009-02-02 10:50 svnbot Status scheduled => resolved
2009-02-02 10:50 svnbot Resolution open => fixed
2009-02-02 10:50 svnbot svn_revision => 12637
2009-02-02 15:35 Hennadzi Tag Attached: comsup_sprint5
2009-04-21 12:39 psarobe Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker