details:   http://code.openbravo.com/erp/devel/pi/rev/5502a43ccb02
changeset: 3421:5502a43ccb02
user:      David Abragimov <david.abragimov <at> opensuite.com>
date:      Tue Mar 17 17:27:39 2009 +0200
summary:   Bug fix 0007820: On Multiphase Project, if I run the Generate Orders 
process I get a wrong message

diffstat:

 src-db/database/model/functions/C_GENERATESOFROMPROJECTPHASE.xml |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r 9a15f942ab9b -r 5502a43ccb02 
src-db/database/model/functions/C_GENERATESOFROMPROJECTPHASE.xml
--- a/src-db/database/model/functions/C_GENERATESOFROMPROJECTPHASE.xml  Tue Mar 
17 16:53:40 2009 +0200
+++ b/src-db/database/model/functions/C_GENERATESOFROMPROJECTPHASE.xml  Tue Mar 
17 17:27:39 2009 +0200
@@ -77,13 +77,15 @@
         SELECT P.C_BPARTNER_ID, P.C_BPARTNER_LOCATION_ID, P.M_PRICELIST_ID, 
PL.NAME AS PRICE_LIST_NAME,
           P.C_CURRENCY_ID, P.PAYMENTRULE, P.C_PAYMENTTERM_ID, 
P.M_WAREHOUSE_ID, P.SALESREP_ID,
           P.BILLTO_ID, P.C_CAMPAIGN_ID, P.C_PROJECT_ID, P.AD_USER_ID, 
P.DESCRIPTION, P.PROJECTSTATUS,
-          PP.NAME AS PHASE_NAME, PP.AD_CLIENT_ID, PP.AD_ORG_ID
+          PP.NAME AS PHASE_NAME, PP.AD_CLIENT_ID, PP.AD_ORG_ID, 
OI.C_LOCATION_ID AS ORGLOCATIONID
         FROM C_PROJECT P,
           C_PROJECTPHASE PP,
-          M_PRICELIST PL
+          M_PRICELIST PL,
+          AD_ORGINFO OI
         WHERE P.C_PROJECT_ID=PP.C_PROJECT_ID
           AND PP.C_PROJECTPHASE_ID=v_Record_ID
           AND P.M_PRICELIST_ID = PL.M_PRICELIST_ID
+          AND PP.AD_ORG_ID = OI.AD_ORG_ID
         )
       LOOP
         -- Check that we have some restrictions
@@ -105,6 +107,8 @@
           RAISE_APPLICATION_ERROR(-20000, '@ProjectWarehouseNotFound@'||'.');
         ELSIF Cur_SO.SALESREP_ID IS NULL THEN
           RAISE_APPLICATION_ERROR(-20000, '@ProjectSalesRepNotFound@'||'.');
+        ELSIF Cur_SO.ORGLOCATIONID IS NULL THEN
+          RAISE_APPLICATION_ERROR(-20000, '@NoLocationNoTaxCalculated@'||'.');
         END IF;
 
         -- Get Business Partner Location

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to