src-db/database/model/tables/M_PRODUCT_ACCT.xml
author Antonio Moreno <antonio.moreno@openbravo.com>
Wed, 23 Apr 2008 17:34:12 +0000
changeset 756 ae11e4610537
parent 735 database/model/tables/M_PRODUCT_ACCT.xml@daced7e311c9
child 1225 53c43708c783
permissions -rw-r--r--
Moved database folder to src-db folder
<?xml version="1.0"?>
  <database name="TABLE M_PRODUCT_ACCT">
    <table name="M_PRODUCT_ACCT" primaryKey="M_PRODUCT_ACCT_KEY">
      <column name="M_PRODUCT_ID" primaryKey="true" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="C_ACCTSCHEMA_ID" primaryKey="true" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="AD_CLIENT_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="AD_ORG_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" 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="DECIMAL" size="10,0" 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="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="P_REVENUE_ACCT" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="P_EXPENSE_ACCT" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="P_ASSET_ACCT" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="P_PURCHASEPRICEVARIANCE_ACCT" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="P_INVOICEPRICEVARIANCE_ACCT" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="P_COGS_ACCT" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="P_TRADEDISCOUNTREC_ACCT" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="P_TRADEDISCOUNTGRANT_ACCT" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_MPRODUCTACCT">
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_ORG" name="ADORG_MPRODUCTACCT">
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA_MPRODUCTACCT" onDelete="cascade">
        <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_PRODUCT" name="M_PRODUCT_M_PRODUCT_ACCT" onDelete="cascade">
        <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PASSET_MPRODUCT">
        <reference local="P_ASSET_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PCOGS_MPRODUCT">
        <reference local="P_COGS_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PEXPENSE_MPRODUCT">
        <reference local="P_EXPENSE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PINVOICEPV_MPRODUCT">
        <reference local="P_INVOICEPRICEVARIANCE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PPURCHASEPV_MPRODUCT">
        <reference local="P_PURCHASEPRICEVARIANCE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PREVENUE_MPRODUCT">
        <reference local="P_REVENUE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PTDISCOUNTGRANT_MPRODUCT">
        <reference local="P_TRADEDISCOUNTGRANT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_PTDISCOUNTREC_MPRODUCT">
        <reference local="P_TRADEDISCOUNTREC_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
      </foreign-key>
      <unique name="M_PROD_ACCT_PROD_ORG_SCHE_UNI">
        <unique-column name="M_PRODUCT_ID"/>
        <unique-column name="AD_ORG_ID"/>
        <unique-column name="C_ACCTSCHEMA_ID"/>
      </unique>
      <check name="M_PRODUCT_ACCT_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
    </table>
  </database>