src-db/database/model/tables/C_INVOICELINE.xml
author Asier Lostalé <asier.lostale@openbravo.com>
Mon, 05 May 2008 06:59:24 +0000
changeset 799 fef2c5e2feb7
parent 756 ae11e4610537
child 1605 8a0fe0193bef
permissions -rw-r--r--
Merged cleanup branch (r3931) with trunk
<?xml version="1.0"?>
  <database name="TABLE C_INVOICELINE">
    <table name="C_INVOICELINE" primaryKey="C_INVOICELINE_KEY">
      <column name="C_INVOICELINE_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="C_INVOICE_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="C_ORDERLINE_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="M_INOUTLINE_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="LINE" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="DESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="2000" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="M_PRODUCT_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="QTYINVOICED" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
        <default><![CDATA[0]]></default>
        <onCreateDefault/>
      </column>
      <column name="PRICELIST" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
        <default><![CDATA[0]]></default>
        <onCreateDefault/>
      </column>
      <column name="PRICEACTUAL" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
        <default><![CDATA[0]]></default>
        <onCreateDefault/>
      </column>
      <column name="PRICELIMIT" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
        <default><![CDATA[0]]></default>
        <onCreateDefault/>
      </column>
      <column name="LINENETAMT" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
        <default><![CDATA[0]]></default>
        <onCreateDefault/>
      </column>
      <column name="C_CHARGE_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="CHARGEAMT" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
        <default><![CDATA[0]]></default>
        <onCreateDefault/>
      </column>
      <column name="C_UOM_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="C_TAX_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="S_RESOURCEASSIGNMENT_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="TAXAMT" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
        <default><![CDATA[0]]></default>
        <onCreateDefault/>
      </column>
      <column name="M_ATTRIBUTESETINSTANCE_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="ISDESCRIPTION" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
        <default><![CDATA[N]]></default>
        <onCreateDefault/>
      </column>
      <column name="QUANTITYORDER" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="M_PRODUCT_UOM_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="C_INVOICE_DISCOUNT_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="C_PROJECTLINE_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="M_OFFER_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="PRICESTD" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
        <default><![CDATA[0]]></default>
        <onCreateDefault/>
      </column>
      <column name="EXCLUDEFORWITHHOLDING" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CINVOICELINE">
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_ORG" name="ADORG_CINVOICELINE">
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_CHARGE" name="CCHARGE_CINVOICELINE">
        <reference local="C_CHARGE_ID" foreign="C_CHARGE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_INVOICE" name="CINVOICE_CINVOICELINE">
        <reference local="C_INVOICE_ID" foreign="C_INVOICE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_INVOICE_DISCOUNT" name="CINVOICELINE_FK_DISCINVOICE">
        <reference local="C_INVOICE_DISCOUNT_ID" foreign="C_INVOICE_DISCOUNT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_ORDERLINE" name="CORDERLINE_CINVOICELINE">
        <reference local="C_ORDERLINE_ID" foreign="C_ORDERLINE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_TAX" name="CTAX_CINVOICELINE">
        <reference local="C_TAX_ID" foreign="C_TAX_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_UOM" name="CUOM_CINVOICELINE">
        <reference local="C_UOM_ID" foreign="C_UOM_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_ATTRIBUTESETINSTANCE" name="MATTRSETINST_CINVOICELINE">
        <reference local="M_ATTRIBUTESETINSTANCE_ID" foreign="M_ATTRIBUTESETINSTANCE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_INOUTLINE" name="MINOUTLINE_CINVOICELINE" onDelete="setnull">
        <reference local="M_INOUTLINE_ID" foreign="M_INOUTLINE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_OFFER" name="MOFFER_CINVOICELINE">
        <reference local="M_OFFER_ID" foreign="M_OFFER_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_PRODUCT" name="MPRODUCT_CINVOICELINE">
        <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_PRODUCT_UOM" name="MPRODUCTUOMID_CINVOICELINE">
        <reference local="M_PRODUCT_UOM_ID" foreign="M_PRODUCT_UOM_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_PROJECTLINE" name="PROJECTLINE_CINVOICELINE">
        <reference local="C_PROJECTLINE_ID" foreign="C_PROJECTLINE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="S_RESOURCEASSIGNMENT" name="SRESOURCEASSIGN_CINVOICELINE">
        <reference local="S_RESOURCEASSIGNMENT_ID" foreign="S_RESOURCEASSIGNMENT_ID"/>
      </foreign-key>
      <index name="C_INVOICELINE_INOUTLINE" unique="false">
        <index-column name="M_INOUTLINE_ID"/>
      </index>
      <index name="C_INVOICELINE_INVOICE" unique="false">
        <index-column name="C_INVOICE_ID"/>
      </index>
      <index name="C_INVOICELINE_ORDERLINE" unique="false">
        <index-column name="C_ORDERLINE_ID"/>
      </index>
      <index name="C_INVOICELINE_PRODUCT" unique="false">
        <index-column name="M_PRODUCT_ID"/>
      </index>
      <check name="C_INVOICELINE_CHECK1"><![CDATA[((QUANTITYORDER IS NULL) AND (M_PRODUCT_UOM_ID IS NULL)) OR ((QUANTITYORDER IS NOT NULL) AND (M_PRODUCT_UOM_ID IS NOT NULL))]]></check>
      <check name="C_INVOICELINE_CHECK2"><![CDATA[(LINENETAMT = 0) OR (C_TAX_ID IS NOT NULL)]]></check>
      <check name="C_INVOICELINE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
    </table>
  </database>