Fixes erp_devel_pi-pgsql-db-inc-consistency-test build #886
authorMikel Irurita <mikel.irurita@openbravo.com>
Thu, 01 Apr 2010 18:22:18 +0200
changeset 6885 39596de39bca
parent 6884 fc18da8fb8f7
child 6886 60a98816806d
Fixes erp_devel_pi-pgsql-db-inc-consistency-test build #886
src-db/database/model/functions/FIN_GEN_PAYMENTSCHEDULE_INV.xml
src-db/database/model/tables/FIN_FINANCIAL_ACCOUNT.xml
src-db/database/model/views/FIN_PAYMENT_PROP_DETAIL_V.xml
--- a/src-db/database/model/functions/FIN_GEN_PAYMENTSCHEDULE_INV.xml	Thu Apr 01 12:04:44 2010 +0530
+++ b/src-db/database/model/functions/FIN_GEN_PAYMENTSCHEDULE_INV.xml	Thu Apr 01 18:22:18 2010 +0200
@@ -335,7 +335,7 @@
         AND duedate<=now();
       V_DueAmount :=COALESCE(V_DueAmount,0);
       --Getting Day Still Due
-      SELECT COALESCE(TO_NUMBER(MIN(DUEDATE)-TRUNC(NOW())),0) as DAYSTILLDUE
+      SELECT COALESCE(TO_NUMBER(MIN(DUEDATE)-TRUNC(now())),0) as DAYSTILLDUE
       INTO V_DayStillDue
       FROM FIN_PAYMENT_SCHEDULE
       WHERE C_INVOICE_ID=P_RECORD_ID
--- a/src-db/database/model/tables/FIN_FINANCIAL_ACCOUNT.xml	Thu Apr 01 12:04:44 2010 +0530
+++ b/src-db/database/model/tables/FIN_FINANCIAL_ACCOUNT.xml	Thu Apr 01 18:22:18 2010 +0200
@@ -124,6 +124,6 @@
       <foreign-key foreignTable="C_LOCATION" name="FIN_FINACC_LOCATION">
         <reference local="C_LOCATION_ID" foreign="C_LOCATION_ID"/>
       </foreign-key>
-      <check name="FIN_FINACC_DEFAULT_CHECK"><![CDATA[ISDEFAULT IN ('Y','N')]]></check>
+      <check name="FIN_FINACC_DEFAULT_CHECK"><![CDATA[ISDEFAULT IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/views/FIN_PAYMENT_PROP_DETAIL_V.xml	Thu Apr 01 12:04:44 2010 +0530
+++ b/src-db/database/model/views/FIN_PAYMENT_PROP_DETAIL_V.xml	Thu Apr 01 18:22:18 2010 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="VIEW FIN_PAYMENT_PROP_DETAIL_V">
-    <view name="FIN_PAYMENT_PROP_DETAIL_V"><![CDATA[SELECT ppd.fin_payment_prop_detail_id AS fin_payment_prop_detail_v_id, ppd.ad_client_id, ppd.ad_org_id, ppd.isactive, ppd.created, ppd.createdby, ppd.updated, ppd.updatedby, psd.fin_payment_scheduledetail_id, ppd.fin_payment_proposal_id, i.documentno AS invoiceno, o.documentno AS orderno, p.documentno AS paymentno, pd.fin_payment_id, COALESCE(psi.duedate, pso.duedate) AS duedate, COALESCE(i.grandtotal, o.grandtotal) AS invoicedamt, COALESCE(psi.expected, pso.expected) AS expected, ppd.amount AS paidamt, COALESCE(p.c_bpartner_id, i.c_bpartner_id, o.c_bpartner_id) as c_bpartner_id, ppd.writeoffamt
+    <view name="FIN_PAYMENT_PROP_DETAIL_V"><![CDATA[SELECT ppd.fin_payment_prop_detail_id AS fin_payment_prop_detail_v_id, ppd.ad_client_id, ppd.ad_org_id, ppd.isactive, ppd.created, ppd.createdby, ppd.updated, ppd.updatedby, psd.fin_payment_scheduledetail_id, ppd.fin_payment_proposal_id, i.documentno AS invoiceno, o.documentno AS orderno, p.documentno AS paymentno, pd.fin_payment_id, COALESCE(psi.duedate, pso.duedate) AS duedate, COALESCE(i.grandtotal, o.grandtotal) AS invoicedamt, COALESCE(psi.expected, pso.expected) AS expected, ppd.amount AS paidamt, COALESCE(p.c_bpartner_id, i.c_bpartner_id, o.c_bpartner_id) AS c_bpartner_id, ppd.writeoffamt
    FROM fin_payment_prop_detail ppd, fin_payment_scheduledetail psd
    LEFT JOIN fin_payment_sched_inv_v psi ON psd.fin_payment_schedule_invoice = psi.fin_payment_sched_inv_v_id
    LEFT JOIN c_invoice i ON psi.c_invoice_id = i.c_invoice_id