src-db/database/model/tables/C_INVOICELINE.xml
author RM packaging bot <staff.rm@openbravo.com>
Tue, 20 Feb 2018 05:47:07 +0000
changeset 33488 688fcca7af57
parent 33477 9b96ff21af72
child 33489 f1d8751dcbf9
permissions -rw-r--r--
Merge temporary head for 3.0PR17Q4.1
<?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="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_INVOICE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="C_ORDERLINE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="M_INOUTLINE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" 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="FINANCIAL_INVOICE_LINE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
        <default><![CDATA[N]]></default>
        <onCreateDefault><![CDATA['N']]></onCreateDefault>
      </column>
      <column name="ACCOUNT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="M_PRODUCT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" 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="VARCHAR" size="32" 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="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="C_TAX_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="S_RESOURCEASSIGNMENT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" 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="VARCHAR" size="32" 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="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="C_INVOICE_DISCOUNT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="C_PROJECTLINE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="M_OFFER_ID" primaryKey="false" required="false" type="VARCHAR" size="32" 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>
      <column name="ISEDITLINENETAMT" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
        <default><![CDATA[N]]></default>
        <onCreateDefault/>
      </column>
      <column name="TAXBASEAMT" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
        <default/>
        <onCreateDefault><![CDATA[LINENETAMT]]></onCreateDefault>
      </column>
      <column name="LINE_GROSS_AMOUNT" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
        <default><![CDATA[0]]></default>
        <onCreateDefault/>
      </column>
      <column name="GROSS_UNIT_PRICE" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
        <default><![CDATA[0]]></default>
        <onCreateDefault/>
      </column>
      <column name="C_BPARTNER_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="PERIODNUMBER" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="GROSSPRICESTD" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
        <default><![CDATA[0]]></default>
        <onCreateDefault/>
      </column>
      <column name="A_ASSET_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="DEFPLANTYPE" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="GROSSPRICELIST" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
        <default><![CDATA[0]]></default>
        <onCreateDefault/>
      </column>
      <column name="C_PROJECT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="ISDEFERRED" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
        <default><![CDATA[N]]></default>
        <onCreateDefault/>
      </column>
      <column name="C_PERIOD_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="C_COSTCENTER_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="USER1_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="USER2_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="EXPLODE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
        <default><![CDATA[N]]></default>
        <onCreateDefault><![CDATA['N']]></onCreateDefault>
      </column>
      <column name="BOM_PARENT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="MATCH_LCCOSTS" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="C_AUM" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="AUMQTY" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <foreign-key foreignTable="AD_CLIENT" name="C_INVOICELINE_AD_CLIENT">
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_ORG" name="C_INVOICELINE_AD_ORG">
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
      </foreign-key>
      <foreign-key foreignTable="A_ASSET" name="C_INVOICELINE_ASSET">
        <reference local="A_ASSET_ID" foreign="A_ASSET_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_INVOICELINE" name="C_INVOICELINE_BOMPARENTID">
        <reference local="BOM_PARENT_ID" foreign="C_INVOICELINE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_UOM" name="C_INVOICELINE_C_AUM">
        <reference local="C_AUM" foreign="C_UOM_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_BPARTNER" name="C_INVOICELINE_C_BPARTNER">
        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_CHARGE" name="C_INVOICELINE_C_CHARGE">
        <reference local="C_CHARGE_ID" foreign="C_CHARGE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_GLITEM" name="C_INVOICELINE_C_GLITEM">
        <reference local="ACCOUNT_ID" foreign="C_GLITEM_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_INVOICE" name="C_INVOICELINE_C_INVOICE">
        <reference local="C_INVOICE_ID" foreign="C_INVOICE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_INVOICE_DISCOUNT" name="C_INVOICELINE_C_INVOICE_DISCOU">
        <reference local="C_INVOICE_DISCOUNT_ID" foreign="C_INVOICE_DISCOUNT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_ORDERLINE" name="C_INVOICELINE_C_ORDERLINE">
        <reference local="C_ORDERLINE_ID" foreign="C_ORDERLINE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_PERIOD" name="C_INVOICELINE_C_PERIOD">
        <reference local="C_PERIOD_ID" foreign="C_PERIOD_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_PROJECTLINE" name="C_INVOICELINE_C_PROJECTLINE">
        <reference local="C_PROJECTLINE_ID" foreign="C_PROJECTLINE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_TAX" name="C_INVOICELINE_C_TAX">
        <reference local="C_TAX_ID" foreign="C_TAX_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_UOM" name="C_INVOICELINE_C_UOM">
        <reference local="C_UOM_ID" foreign="C_UOM_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_COSTCENTER" name="C_INVOICELINE_COSTCENTER">
        <reference local="C_COSTCENTER_ID" foreign="C_COSTCENTER_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_ATTRIBUTESETINSTANCE" name="C_INVOICELINE_M_ATTRIBUTESETIN">
        <reference local="M_ATTRIBUTESETINSTANCE_ID" foreign="M_ATTRIBUTESETINSTANCE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_INOUTLINE" name="C_INVOICELINE_M_INOUTLINE" onDelete="setnull">
        <reference local="M_INOUTLINE_ID" foreign="M_INOUTLINE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_OFFER" name="C_INVOICELINE_M_OFFER">
        <reference local="M_OFFER_ID" foreign="M_OFFER_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_PRODUCT" name="C_INVOICELINE_M_PRODUCT">
        <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_PRODUCT_UOM" name="C_INVOICELINE_M_PRODUCT_UOM">
        <reference local="M_PRODUCT_UOM_ID" foreign="M_PRODUCT_UOM_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_PROJECT" name="C_INVOICELINE_PROJECT">
        <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="S_RESOURCEASSIGNMENT" name="C_INVOICELINE_S_RESOURCEASSIGN">
        <reference local="S_RESOURCEASSIGNMENT_ID" foreign="S_RESOURCEASSIGNMENT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="USER1" name="C_INVOICELINE_USER1">
        <reference local="USER1_ID" foreign="USER1_ID"/>
      </foreign-key>
      <foreign-key foreignTable="USER2" name="C_INVOICELINE_USER2">
        <reference local="USER2_ID" foreign="USER2_ID"/>
      </foreign-key>
      <index name="C_INVOICELINE_INOUTLINE" unique="false">
        <index-column name="M_INOUTLINE_ID"/>
        <whereClause><![CDATA[M_INOUTLINE_ID IS NOT NULL]]></whereClause>
      </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"/>
        <whereClause><![CDATA[C_ORDERLINE_ID IS NOT NULL]]></whereClause>
      </index>
      <index name="C_INVOICELINE_PRODUCT" unique="false">
        <index-column name="M_PRODUCT_ID"/>
      </index>
      <check name="C_INVLINE_ISDEFERRED_CHK"><![CDATA[ISDEFERRED IN ('Y', 'N')]]></check>
      <check name="C_INVLINE_PERIODNUMBER_CHK"><![CDATA[ISDEFERRED = 'Y' AND PERIODNUMBER > 0 OR ISDEFERRED = 'N']]></check>
      <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_CHECK3"><![CDATA[ISDEFERRED = 'Y' AND C_PERIOD_ID IS NOT NULL AND DEFPLANTYPE IS NOT NULL AND M_PRODUCT_ID IS NOT NULL AND PERIODNUMBER IS NOT NULL OR ISDEFERRED = 'N']]></check>
      <check name="C_INVOICELINE_EXPLODE_CHECK"><![CDATA[EXPLODE IN ('Y', 'N')]]></check>
      <check name="C_INVOICELINE_FIN_INVLINE_CHK"><![CDATA[FINANCIAL_INVOICE_LINE IN ('Y', 'N')]]></check>
      <check name="C_INVOICELINE_FINACCT_CHK"><![CDATA[FINANCIAL_INVOICE_LINE = 'Y' AND ACCOUNT_ID IS NOT NULL OR FINANCIAL_INVOICE_LINE = 'N' AND ACCOUNT_ID IS NULL]]></check>
      <check name="C_INVOICELINE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
      <check name="C_INVOICELINE_PRODACCT_CHK"><![CDATA[ACCOUNT_ID IS NOT NULL AND M_PRODUCT_ID IS NULL OR ACCOUNT_ID IS NULL]]></check>
    </table>
  </database>