src-db/database/model/tables/C_GLITEM.xml
author Sathiyan Sivaprakasam <sathiyan.sivaprakasam@openbravo.com>
Sat, 22 May 2010 13:20:13 +0530
changeset 7466 7f50029b3ac3
parent 7459 603b188fd15d
child 8504 802eae4a434d
permissions -rw-r--r--
Suggestions after demo has been implemented.
<?xml version="1.0"?>
  <database name="TABLE C_GLITEM">
    <table name="C_GLITEM" primaryKey="C_GLITEM_KEY">
      <column name="C_GLITEM_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="NAME" primaryKey="false" required="true" type="NVARCHAR" size="60" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="DESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="ENABLEINCASH" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
        <default><![CDATA[N]]></default>
        <onCreateDefault><![CDATA['N']]></onCreateDefault>
      </column>
      <column name="ENABLEINFININVOICES" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
        <default><![CDATA[N]]></default>
        <onCreateDefault><![CDATA['N']]></onCreateDefault>
      </column>
      <column name="C_TAXCATEGORY_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="C_WITHHOLDING_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <foreign-key foreignTable="AD_CLIENT" name="C_GLITEM_AD_CLIENT">
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_ORG" name="C_GLITEM_AD_ORG">
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_TAX" name="C_GLITEM_C_TAX">
        <reference local="C_TAX_ID" foreign="C_TAX_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_TAXCATEGORY" name="C_GLITEM_C_TAXCATEGORY">
        <reference local="C_TAXCATEGORY_ID" foreign="C_TAXCATEGORY_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_WITHHOLDING" name="C_GLITEM_C_WITHHOLDING">
        <reference local="C_WITHHOLDING_ID" foreign="C_WITHHOLDING_ID"/>
      </foreign-key>
      <check name="C_GLITEM_FINCAT_CHECK"><![CDATA[((ENABLEINFININVOICES = 'Y') AND (C_TAXCATEGORY_ID IS NOT NULL)) OR ((ENABLEINFININVOICES = 'N') AND (C_TAXCATEGORY_ID IS NULL))]]></check>
      <check name="C_GLITEM_FININVOICES_CHECK"><![CDATA[ENABLEINFININVOICES IN ('Y', 'N')]]></check>
      <check name="C_GLITEM_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
      <check name="C_GLITEM_TAXANDCAT_CHECK"><![CDATA[(((C_TAXCATEGORY_ID IS NOT NULL) AND (C_TAX_ID IS NULL)) AND (C_WITHHOLDING_ID IS NULL)) OR (C_TAXCATEGORY_ID IS NULL)]]></check>
      <check name="C_GLITEM_TAXANDWH_CHECK"><![CDATA[(C_TAX_ID IS NULL) OR (C_WITHHOLDING_ID IS NULL)]]></check>
    </table>
  </database>