added Exchange rate table
authorSalvador Zapata <salvador.zapata@openbravo.com>
Wed, 22 Jun 2011 22:09:10 +0200
changeset 13324 4c67babc7810
parent 13323 f5c1f04bb7ac
child 13325 c2d21db7bb30
added Exchange rate table
src-db/database/model/tables/C_CONVERSION_RATE_DOCUMENT.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-db/database/model/tables/C_CONVERSION_RATE_DOCUMENT.xml	Wed Jun 22 22:09:10 2011 +0200
@@ -0,0 +1,88 @@
+<?xml version="1.0"?>
+  <database name="TABLE C_CONVERSION_RATE_DOCUMENT">
+    <table name="C_CONVERSION_RATE_DOCUMENT" primaryKey="C_CURRENCYRATEDOC_KEY">
+      <column name="C_CONVERSION_RATE_DOCUMENT_ID" primaryKey="true" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="AD_CLIENT_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="AD_ORG_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="ISACTIVE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[Y]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="CREATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
+        <default><![CDATA[SYSDATE]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="CREATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="UPDATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
+        <default><![CDATA[SYSDATE]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="UPDATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="C_CURRENCY_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="C_CURRENCY_ID_TO" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="C_INVOICE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="FIN_PAYMENT_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="APRM_FINACC_TRANSACTION_V_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="RATE" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="FOREIGN_AMOUNT" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <foreign-key foreignTable="FIN_FINACC_TRANSACTION" name="C_CONVERSIONRATEDOC_TXN">
+        <reference local="APRM_FINACC_TRANSACTION_V_ID" foreign="FIN_FINACC_TRANSACTION_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_CURRENCY" name="C_CURRENCYRATEDOC_C_CURRENCY">
+        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_INVOICE" name="C_CURRENCYRATEDOCINV">
+        <reference local="C_INVOICE_ID" foreign="C_INVOICE_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="FIN_PAYMENT" name="C_CURRENCYRATEDOCPAY">
+        <reference local="FIN_PAYMENT_ID" foreign="FIN_PAYMENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="C_CURRENCY" name="C_CURRENCYRATEDOCRATETO">
+        <reference local="C_CURRENCY_ID_TO" foreign="C_CURRENCY_ID"/>
+      </foreign-key>
+      <unique name="C_CONVERSIONRATEDOC_ONCE">
+        <unique-column name="C_CURRENCY_ID"/>
+        <unique-column name="C_CURRENCY_ID_TO"/>
+        <unique-column name="C_INVOICE_ID"/>
+        <unique-column name="FIN_PAYMENT_ID"/>
+        <unique-column name="APRM_FINACC_TRANSACTION_V_ID"/>
+      </unique>
+      <check name="C_CONVERSIONRATEDOC_ACTIVE"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+    </table>
+  </database>