2006-12-29 05:45:57 +07:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database">
|
|
|
|
<database name="default" defaultIdMethod="none">
|
|
|
|
<table name="C_TAX">
|
2007-01-23 23:59:13 +07:00
|
|
|
<column name="C_TAX_ID" primaryKey="true" required="true" type="ID" size="10" autoIncrement="false"/>
|
|
|
|
<column name="AD_CLIENT_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
|
|
|
|
<column name="AD_ORG_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
|
2006-12-29 05:45:57 +07:00
|
|
|
<column name="ISACTIVE" primaryKey="false" required="true" type="CHAR" size="1" default="Y" autoIncrement="false"/>
|
|
|
|
<column name="CREATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" default="CURRENT_TIMESTAMP" autoIncrement="false"/>
|
2007-01-23 23:59:13 +07:00
|
|
|
<column name="CREATEDBY" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
|
2006-12-29 05:45:57 +07:00
|
|
|
<column name="UPDATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" default="CURRENT_TIMESTAMP" autoIncrement="false"/>
|
|
|
|
<column name="NAME" primaryKey="false" required="true" type="VARCHAR" size="60" autoIncrement="false"/>
|
2007-01-23 23:59:13 +07:00
|
|
|
<column name="UPDATEDBY" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
|
2006-12-29 05:45:57 +07:00
|
|
|
<column name="DESCRIPTION" primaryKey="false" required="false" type="VARCHAR" size="255" autoIncrement="false"/>
|
|
|
|
<column name="TAXINDICATOR" primaryKey="false" required="false" type="VARCHAR" size="10" autoIncrement="false"/>
|
|
|
|
<column name="ISDOCUMENTLEVEL" primaryKey="false" required="true" type="CHAR" size="1" default="Y" autoIncrement="false"/>
|
|
|
|
<column name="VALIDFROM" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false"/>
|
|
|
|
<column name="ISSUMMARY" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
|
|
|
|
<column name="REQUIRESTAXCERTIFICATE" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
|
2007-02-01 23:50:31 +07:00
|
|
|
<column name="RATE" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false"/>
|
2007-01-23 23:59:13 +07:00
|
|
|
<column name="PARENT_TAX_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
|
|
|
|
<column name="C_COUNTRY_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
|
|
|
|
<column name="C_REGION_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
|
|
|
|
<column name="TO_COUNTRY_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
|
|
|
|
<column name="TO_REGION_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
|
|
|
|
<column name="C_TAXCATEGORY_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
|
2006-12-29 05:45:57 +07:00
|
|
|
<column name="ISDEFAULT" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
|
|
|
|
<column name="ISTAXEXEMPT" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
|
|
|
|
<column name="SOPOTYPE" primaryKey="false" required="true" type="CHAR" size="1" default="B" autoIncrement="false"/>
|
|
|
|
<column name="ISSALESTAX" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="C_COUNTRY" name="C_COUNTRYTO_C_TAX" onDelete="none">
|
2006-12-29 05:45:57 +07:00
|
|
|
<reference local="TO_COUNTRY_ID" foreign="C_COUNTRY_ID"/>
|
|
|
|
</foreign-key>
|
2007-04-02 17:15:26 +07:00
|
|
|
<foreign-key foreignTable="C_COUNTRY" name="C_COUNTRY_C_TAX" onDelete="none">
|
|
|
|
<reference local="C_COUNTRY_ID" foreign="C_COUNTRY_ID"/>
|
2006-12-29 05:45:57 +07:00
|
|
|
</foreign-key>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="C_REGION" name="C_REGION_C_TAX" onDelete="none">
|
2006-12-29 05:45:57 +07:00
|
|
|
<reference local="C_REGION_ID" foreign="C_REGION_ID"/>
|
|
|
|
</foreign-key>
|
2007-04-02 17:15:26 +07:00
|
|
|
<foreign-key foreignTable="C_REGION" name="C_REGIONTO_C_TAX" onDelete="none">
|
|
|
|
<reference local="TO_REGION_ID" foreign="C_REGION_ID"/>
|
|
|
|
</foreign-key>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="C_TAX" name="CTAX_PARENT" onDelete="none">
|
2006-12-29 05:45:57 +07:00
|
|
|
<reference local="PARENT_TAX_ID" foreign="C_TAX_ID"/>
|
|
|
|
</foreign-key>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="C_TAXCATEGORY" name="CTAXCATEGORY_CTAX" onDelete="cascade">
|
2006-12-29 05:45:57 +07:00
|
|
|
<reference local="C_TAXCATEGORY_ID" foreign="C_TAXCATEGORY_ID"/>
|
|
|
|
</foreign-key>
|
2007-02-01 23:50:31 +07:00
|
|
|
<unique name="C_TAX_KEY">
|
|
|
|
<unique-column name="C_TAX_ID"/>
|
|
|
|
</unique>
|
2006-12-29 05:45:57 +07:00
|
|
|
<unique name="C_TAX_NAME">
|
|
|
|
<unique-column name="AD_CLIENT_ID"/>
|
|
|
|
<unique-column name="NAME"/>
|
|
|
|
</unique>
|
|
|
|
<check>
|
|
|
|
<rule><![CDATA[IsActive in ('Y','N')]]></rule>
|
|
|
|
</check>
|
|
|
|
<check>
|
|
|
|
<rule><![CDATA[IsDocumentLevel in ('Y','N')]]></rule>
|
|
|
|
</check>
|
|
|
|
<check>
|
|
|
|
<rule><![CDATA[RequiresTaxCertificate in ('Y','N')]]></rule>
|
|
|
|
</check>
|
|
|
|
</table>
|
|
|
|
</database>
|