Fixed bug 4132: Create/export cycles differ in Oracle and PostgreSQL
authorCarlos Romero <carlos.romero@openbravo.com>
Wed, 25 Jun 2008 22:24:09 +0000
changeset 1359 108ca01497b9
parent 1358 388775c959c4
child 1360 fd32e4c536e8
Fixed bug 4132: Create/export cycles differ in Oracle and PostgreSQL
src-db/database/model/views/C_DEBT_PAYMENT_V.xml
src-db/database/model/views/C_INVOICE_V.xml
src-db/database/model/views/MA_PROCESSPLAN_TOTALIZED.xml
src-db/database/model/views/RV_C_INVOICE.xml
src-db/database/sourcedata/AD_COLUMN.xml
--- a/src-db/database/model/views/C_DEBT_PAYMENT_V.xml	Wed Jun 25 15:53:20 2008 +0000
+++ b/src-db/database/model/views/C_DEBT_PAYMENT_V.xml	Wed Jun 25 22:24:09 2008 +0000
@@ -1,18 +1,17 @@
 <?xml version="1.0"?>
   <database name="VIEW C_DEBT_PAYMENT_V">
-    <view name="C_DEBT_PAYMENT_V"><![CDATA[SELECT c_debt_payment.c_debt_payment_id, c_debt_payment.ad_client_id, c_debt_payment.ad_org_id, c_debt_payment.isactive, c_debt_payment.created, c_debt_payment.createdby, c_debt_payment.updated, c_debt_payment.updatedby, c_debt_payment.isreceipt, c_debt_payment.c_settlement_cancel_id, c_debt_payment.c_settlement_generate_id, c_debt_payment.description, c_debt_payment.c_invoice_id, c_debt_payment.c_bpartner_id, c_debt_payment.c_currency_id, c_debt_payment.c_cashline_id, c_debt_payment.c_bankaccount_id, c_debt_payment.c_cashbook_id, c_debt_payment.paymentrule, c_debt_payment.ispaid, c_debt_payment.dateplanned, c_debt_payment.ismanual, c_debt_payment.isvalid, c_debt_payment.c_bankstatementline_id, c_debt_payment.changesettlementcancel, c_debt_payment.cancel_processed, c_debt_payment.generate_processed, 
-c_debt_payment.C_WITHHOLDING_ID,c_debt_payment.WITHHOLDINGAMOUNT,
+    <view name="C_DEBT_PAYMENT_V"><![CDATA[SELECT c_debt_payment.c_debt_payment_id, c_debt_payment.ad_client_id, c_debt_payment.ad_org_id, c_debt_payment.isactive, c_debt_payment.created, c_debt_payment.createdby, c_debt_payment.updated, c_debt_payment.updatedby, c_debt_payment.isreceipt, c_debt_payment.c_settlement_cancel_id, c_debt_payment.c_settlement_generate_id, c_debt_payment.description, c_debt_payment.c_invoice_id, c_debt_payment.c_bpartner_id, c_debt_payment.c_currency_id, c_debt_payment.c_cashline_id, c_debt_payment.c_bankaccount_id, c_debt_payment.c_cashbook_id, c_debt_payment.paymentrule, c_debt_payment.ispaid, c_debt_payment.dateplanned, c_debt_payment.ismanual, c_debt_payment.isvalid, c_debt_payment.c_bankstatementline_id, c_debt_payment.changesettlementcancel, c_debt_payment.cancel_processed, c_debt_payment.generate_processed, c_debt_payment.c_withholding_id, c_debt_payment.withholdingamount, 
         CASE c_debt_payment.isreceipt
             WHEN 'Y' THEN c_debt_payment.amount
-            ELSE c_debt_payment.amount * (-1)
+            ELSE c_debt_payment.amount * -1
         END AS amount, 
         CASE c_debt_payment.isreceipt
             WHEN 'Y' THEN c_debt_payment.writeoffamt
-            ELSE c_debt_payment.writeoffamt * (-1)
+            ELSE c_debt_payment.writeoffamt * -1
         END AS writeoffamt, 
         CASE c_debt_payment.isreceipt
             WHEN 'Y' THEN 1
-            ELSE (-1)
+            ELSE -1
         END AS multiplierap, c_debt_payment.glitemamt, c_debt_payment.c_order_id, c_debt_payment.status
    FROM c_debt_payment]]></view>
   </database>
--- a/src-db/database/model/views/C_INVOICE_V.xml	Wed Jun 25 15:53:20 2008 +0000
+++ b/src-db/database/model/views/C_INVOICE_V.xml	Wed Jun 25 22:24:09 2008 +0000
@@ -2,23 +2,23 @@
   <database name="VIEW C_INVOICE_V">
     <view name="C_INVOICE_V"><![CDATA[SELECT i.c_invoice_id, i.ad_client_id, i.ad_org_id, i.isactive, i.created, i.createdby, i.updated, i.updatedby, i.issotrx, i.documentno, i.docstatus, i.docaction, i.processing, i.processed, i.c_doctype_id, i.c_doctypetarget_id, i.c_order_id, i.description, i.salesrep_id, i.dateinvoiced, i.dateprinted, i.dateacct, i.c_bpartner_id, i.c_bpartner_location_id, i.ad_user_id, i.poreference, i.dateordered, i.c_currency_id, i.paymentrule, i.c_paymentterm_id, i.c_charge_id, i.m_pricelist_id, i.c_campaign_id, i.c_project_id, i.c_activity_id, i.isprinted, i.isdiscountprinted, 
         CASE
-            WHEN substr(d.docbasetype, 3) = 'C' THEN i.chargeamt * (-1)
+            WHEN substr(d.docbasetype, 3) = 'C' THEN i.chargeamt * -1
             ELSE i.chargeamt
         END AS chargeamt, 
         CASE
-            WHEN substr(d.docbasetype, 3) = 'C' THEN i.totallines * (-1)
+            WHEN substr(d.docbasetype, 3) = 'C' THEN i.totallines * -1
             ELSE i.totallines
         END AS totallines, 
         CASE
-            WHEN substr(d.docbasetype, 3) = 'C' THEN i.grandtotal * (-1)
+            WHEN substr(d.docbasetype, 3) = 'C' THEN i.grandtotal * -1
             ELSE i.grandtotal
         END AS grandtotal, 
         CASE
-            WHEN substr(d.docbasetype, 3) = 'C' THEN (-1)
+            WHEN substr(d.docbasetype, 3) = 'C' THEN -1
             ELSE 1
         END AS multiplier, 
         CASE
-            WHEN substr(d.docbasetype, 2, 1) = 'P' THEN (-1)
+            WHEN substr(d.docbasetype, 2, 1) = 'P' THEN -1
             ELSE 1
         END AS multiplierap, d.docbasetype
    FROM c_invoice i
--- a/src-db/database/model/views/MA_PROCESSPLAN_TOTALIZED.xml	Wed Jun 25 15:53:20 2008 +0000
+++ b/src-db/database/model/views/MA_PROCESSPLAN_TOTALIZED.xml	Wed Jun 25 22:24:09 2008 +0000
@@ -4,7 +4,7 @@
    FROM m_product, ma_processplan_version, ( SELECT ma_processplan_version.ma_processplan_version_id, ma_sequenceproduct.m_product_id, sum(
                 CASE ma_sequenceproduct.productiontype
                     WHEN '+' THEN ma_sequenceproduct.quantity * ma_sequence.multiplier
-                    WHEN '-' THEN ma_sequenceproduct.quantity * ma_sequence.multiplier * (-1)
+                    WHEN '-' THEN ma_sequenceproduct.quantity * ma_sequence.multiplier * -1
                     ELSE NULL
                 END) AS qty
            FROM ma_processplan_version, ma_sequence, ma_sequenceproduct
@@ -12,7 +12,7 @@
           GROUP BY ma_processplan_version.ma_processplan_version_id, ma_sequenceproduct.m_product_id) sp1, ( SELECT ma_processplan_version.ma_processplan_version_id, ma_sequenceproduct.m_product_id, sum(
                 CASE ma_sequenceproduct.productiontype
                     WHEN '+' THEN ma_sequenceproduct.quantity * ma_sequence.multiplier
-                    WHEN '-' THEN ma_sequenceproduct.quantity * ma_sequence.multiplier * (-1)
+                    WHEN '-' THEN ma_sequenceproduct.quantity * ma_sequence.multiplier * -1
                     ELSE NULL
                 END) AS qty
            FROM ma_processplan_version, ma_sequence, ma_sequenceproduct
--- a/src-db/database/model/views/RV_C_INVOICE.xml	Wed Jun 25 15:53:20 2008 +0000
+++ b/src-db/database/model/views/RV_C_INVOICE.xml	Wed Jun 25 22:24:09 2008 +0000
@@ -2,19 +2,19 @@
   <database name="VIEW RV_C_INVOICE">
     <view name="RV_C_INVOICE"><![CDATA[SELECT i.c_invoice_id, i.ad_client_id, i.ad_org_id, i.isactive, i.created, i.createdby, i.updated, i.updatedby, i.issotrx, i.documentno, i.docstatus, i.docaction, i.isprinted, i.isdiscountprinted, i.processing, i.processed, i.c_doctype_id, i.c_doctypetarget_id, i.c_order_id, i.description, i.salesrep_id, i.dateinvoiced, i.dateprinted, i.dateacct, i.c_bpartner_id, i.c_bpartner_location_id, i.ad_user_id, b.c_bp_group_id, i.poreference, i.dateordered, i.c_currency_id, i.paymentrule, i.c_paymentterm_id, i.m_pricelist_id, i.c_campaign_id, i.c_project_id, i.c_activity_id, i.c_charge_id, 
         CASE substr(d.docbasetype, 3)
-            WHEN 'C' THEN i.chargeamt * (-1)
+            WHEN 'C' THEN i.chargeamt * -1
             ELSE i.chargeamt
         END AS chargeamt, 
         CASE substr(d.docbasetype, 3)
-            WHEN 'C' THEN i.totallines * (-1)
+            WHEN 'C' THEN i.totallines * -1
             ELSE i.totallines
         END AS totallines, 
         CASE substr(d.docbasetype, 3)
-            WHEN 'C' THEN i.grandtotal * (-1)
+            WHEN 'C' THEN i.grandtotal * -1
             ELSE i.grandtotal
         END AS grandtotal, 
         CASE substr(d.docbasetype, 3)
-            WHEN 'C' THEN (-1)
+            WHEN 'C' THEN -1
             ELSE 1
         END AS multiplier
    FROM c_invoice i, c_doctype d, c_bpartner b
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Wed Jun 25 15:53:20 2008 +0000
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Wed Jun 25 22:24:09 2008 +0000
@@ -113275,11 +113275,11 @@
 <!--3577 CREATED-->
 <!--3577-->              <CREATED><![CDATA[1999-12-19 20:39:44.0]]></CREATED>
 <!--3577 UPDATED-->
-<!--3577-->              <UPDATED><![CDATA[2000-05-05 15:37:10.0]]></UPDATED>
+<!--3577-->              <UPDATED><![CDATA[2008-06-25 23:42:16.0]]></UPDATED>
 <!--3577 CREATEDBY-->
 <!--3577-->              <CREATEDBY><![CDATA[0]]></CREATEDBY>
 <!--3577 UPDATEDBY-->
-<!--3577-->              <UPDATEDBY><![CDATA[0]]></UPDATEDBY>
+<!--3577-->              <UPDATEDBY><![CDATA[100]]></UPDATEDBY>
 <!--3577 NAME-->
 <!--3577-->              <NAME><![CDATA[Name]]></NAME>
 <!--3577 DESCRIPTION-->
@@ -113307,7 +113307,7 @@
 <!--3577 ISIDENTIFIER-->
 <!--3577-->              <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER>
 <!--3577 SEQNO-->
-<!--3577-->              <SEQNO><![CDATA[1]]></SEQNO>
+<!--3577-->              <SEQNO><![CDATA[2]]></SEQNO>
 <!--3577 ISTRANSLATED-->
 <!--3577-->              <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
 <!--3577 ISENCRYPTED-->
@@ -149908,11 +149908,11 @@
 <!--4770 CREATED-->
 <!--4770-->              <CREATED><![CDATA[2000-10-15 20:10:06.0]]></CREATED>
 <!--4770 UPDATED-->
-<!--4770-->              <UPDATED><![CDATA[2000-10-15 20:10:06.0]]></UPDATED>
+<!--4770-->              <UPDATED><![CDATA[2008-06-25 23:40:10.0]]></UPDATED>
 <!--4770 CREATEDBY-->
 <!--4770-->              <CREATEDBY><![CDATA[100]]></CREATEDBY>
 <!--4770 UPDATEDBY-->
-<!--4770-->              <UPDATEDBY><![CDATA[0]]></UPDATEDBY>
+<!--4770-->              <UPDATEDBY><![CDATA[100]]></UPDATEDBY>
 <!--4770 NAME-->
 <!--4770-->              <NAME><![CDATA[Line No.]]></NAME>
 <!--4770 DESCRIPTION-->
@@ -149940,7 +149940,7 @@
 <!--4770 ISIDENTIFIER-->
 <!--4770-->              <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER>
 <!--4770 SEQNO-->
-<!--4770-->              <SEQNO><![CDATA[1]]></SEQNO>
+<!--4770-->              <SEQNO><![CDATA[2]]></SEQNO>
 <!--4770 ISTRANSLATED-->
 <!--4770-->              <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
 <!--4770 ISENCRYPTED-->
@@ -169752,11 +169752,11 @@
 <!--5297 CREATED-->
 <!--5297-->              <CREATED><![CDATA[2000-12-22 22:20:21.0]]></CREATED>
 <!--5297 UPDATED-->
-<!--5297-->              <UPDATED><![CDATA[2001-11-14 18:36:48.0]]></UPDATED>
+<!--5297-->              <UPDATED><![CDATA[2008-06-25 23:38:35.0]]></UPDATED>
 <!--5297 CREATEDBY-->
 <!--5297-->              <CREATEDBY><![CDATA[0]]></CREATEDBY>
 <!--5297 UPDATEDBY-->
-<!--5297-->              <UPDATEDBY><![CDATA[0]]></UPDATEDBY>
+<!--5297-->              <UPDATEDBY><![CDATA[100]]></UPDATEDBY>
 <!--5297 NAME-->
 <!--5297-->              <NAME><![CDATA[Amount]]></NAME>
 <!--5297 DESCRIPTION-->
@@ -169782,7 +169782,7 @@
 <!--5297 ISIDENTIFIER-->
 <!--5297-->              <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER>
 <!--5297 SEQNO-->
-<!--5297-->              <SEQNO><![CDATA[2]]></SEQNO>
+<!--5297-->              <SEQNO><![CDATA[3]]></SEQNO>
 <!--5297 ISTRANSLATED-->
 <!--5297-->              <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
 <!--5297 ISENCRYPTED-->