2006-12-29 05:37:29 +07:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database">
|
|
|
|
<database name="default" defaultIdMethod="none">
|
|
|
|
<table name="C_INVOICE">
|
2007-01-23 23:59:13 +07:00
|
|
|
<column name="C_INVOICE_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:37:29 +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:37:29 +07:00
|
|
|
<column name="UPDATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" default="CURRENT_TIMESTAMP" 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:37:29 +07:00
|
|
|
<column name="ISSOTRX" primaryKey="false" required="true" type="CHAR" size="1" default="Y" autoIncrement="false"/>
|
|
|
|
<column name="DOCUMENTNO" primaryKey="false" required="true" type="VARCHAR" size="30" autoIncrement="false"/>
|
|
|
|
<column name="DOCSTATUS" primaryKey="false" required="true" type="CHAR" size="2" autoIncrement="false"/>
|
|
|
|
<column name="DOCACTION" primaryKey="false" required="true" type="CHAR" size="2" autoIncrement="false"/>
|
|
|
|
<column name="PROCESSING" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false"/>
|
|
|
|
<column name="PROCESSED" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
|
|
|
|
<column name="POSTED" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
|
2007-01-23 23:59:13 +07:00
|
|
|
<column name="C_DOCTYPE_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
|
|
|
|
<column name="C_DOCTYPETARGET_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
|
|
|
|
<column name="C_ORDER_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
|
2006-12-29 05:37:29 +07:00
|
|
|
<column name="DESCRIPTION" primaryKey="false" required="false" type="VARCHAR" size="255" autoIncrement="false"/>
|
|
|
|
<column name="ISAPPROVED" primaryKey="false" required="true" type="CHAR" size="1" default="Y" autoIncrement="false"/>
|
|
|
|
<column name="ISTRANSFERRED" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
|
|
|
|
<column name="ISPRINTED" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
|
2007-01-23 23:59:13 +07:00
|
|
|
<column name="SALESREP_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
|
2006-12-29 05:37:29 +07:00
|
|
|
<column name="DATEINVOICED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false"/>
|
|
|
|
<column name="DATEPRINTED" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false"/>
|
|
|
|
<column name="DATEACCT" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false"/>
|
2007-01-23 23:59:13 +07:00
|
|
|
<column name="C_BPARTNER_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
|
|
|
|
<column name="C_BPARTNER_LOCATION_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
|
2006-12-29 05:37:29 +07:00
|
|
|
<column name="POREFERENCE" primaryKey="false" required="false" type="VARCHAR" size="20" autoIncrement="false"/>
|
|
|
|
<column name="ISDISCOUNTPRINTED" primaryKey="false" required="true" type="CHAR" size="1" default="Y" autoIncrement="false"/>
|
|
|
|
<column name="DATEORDERED" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false"/>
|
2007-01-23 23:59:13 +07:00
|
|
|
<column name="C_CURRENCY_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
|
2006-12-29 05:37:29 +07:00
|
|
|
<column name="PAYMENTRULE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false"/>
|
2007-01-23 23:59:13 +07:00
|
|
|
<column name="C_PAYMENTTERM_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
|
|
|
|
<column name="C_CHARGE_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
|
2007-02-01 23:50:31 +07:00
|
|
|
<column name="CHARGEAMT" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
|
|
|
|
<column name="TOTALLINES" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
|
|
|
|
<column name="GRANDTOTAL" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
|
2007-01-23 23:59:13 +07:00
|
|
|
<column name="M_PRICELIST_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
|
2006-12-29 05:37:29 +07:00
|
|
|
<column name="ISTAXINCLUDED" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
|
2007-01-23 23:59:13 +07:00
|
|
|
<column name="C_CAMPAIGN_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
|
|
|
|
<column name="C_PROJECT_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
|
|
|
|
<column name="C_ACTIVITY_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
|
2006-12-29 05:37:29 +07:00
|
|
|
<column name="ISPAID" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
|
2007-01-23 23:59:13 +07:00
|
|
|
<column name="C_PAYMENT_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
|
|
|
|
<column name="C_CASHLINE_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
|
2006-12-29 05:37:29 +07:00
|
|
|
<column name="CREATEFROM" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false"/>
|
|
|
|
<column name="GENERATETO" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false"/>
|
|
|
|
<column name="SENDEMAIL" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
|
2007-01-23 23:59:13 +07:00
|
|
|
<column name="AD_USER_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
|
2006-12-29 05:37:29 +07:00
|
|
|
<column name="COPYFROM" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false"/>
|
|
|
|
<column name="ISSELFSERVICE" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
|
2007-01-23 23:59:13 +07:00
|
|
|
<column name="AD_ORGTRX_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
|
|
|
|
<column name="USER1_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
|
|
|
|
<column name="USER2_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
|
|
|
|
<column name="C_CONVERSIONTYPE_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
|
2006-12-29 05:37:29 +07:00
|
|
|
<column name="ISPAYSCHEDULEVALID" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
|
2007-01-23 23:59:13 +07:00
|
|
|
<column name="REF_INVOICE_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
|
2006-12-29 05:37:29 +07:00
|
|
|
<column name="ISINDISPUTE" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
|
|
|
|
<column name="INVOICECOLLECTIONTYPE" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false"/>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="AD_ORG" name="ADORG_CINVOICE" onDelete="none">
|
2006-12-29 05:37:29 +07:00
|
|
|
<reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
|
|
|
|
</foreign-key>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="AD_ORG" name="ADORGTRX_CINVOICE" onDelete="none">
|
2007-03-01 12:59:56 +07:00
|
|
|
<reference local="AD_ORGTRX_ID" foreign="AD_ORG_ID"/>
|
|
|
|
</foreign-key>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="AD_USER" name="ADUSER_SR_CINVOICE" onDelete="none">
|
2006-12-29 05:37:29 +07:00
|
|
|
<reference local="SALESREP_ID" foreign="AD_USER_ID"/>
|
|
|
|
</foreign-key>
|
2007-04-02 17:15:26 +07:00
|
|
|
<foreign-key foreignTable="AD_USER" name="ADUSER_CINVOICE" onDelete="none">
|
|
|
|
<reference local="AD_USER_ID" foreign="AD_USER_ID"/>
|
|
|
|
</foreign-key>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="C_ACTIVITY" name="CACTIVITY_CINVOICE" onDelete="none">
|
2006-12-29 05:37:29 +07:00
|
|
|
<reference local="C_ACTIVITY_ID" foreign="C_ACTIVITY_ID"/>
|
|
|
|
</foreign-key>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_CINVOICE" onDelete="none">
|
2006-12-29 05:37:29 +07:00
|
|
|
<reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
|
|
|
|
</foreign-key>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="C_BPARTNER_LOCATION" name="C_BPLOCATION_CINVOICE" onDelete="none">
|
2006-12-29 05:37:29 +07:00
|
|
|
<reference local="C_BPARTNER_LOCATION_ID" foreign="C_BPARTNER_LOCATION_ID"/>
|
|
|
|
</foreign-key>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="C_CAMPAIGN" name="CCAMPAIGN_CINVOICE" onDelete="none">
|
2006-12-29 05:37:29 +07:00
|
|
|
<reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
|
|
|
|
</foreign-key>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="C_CASHLINE" name="CCASHLINE_CINVOICE" onDelete="none">
|
2006-12-29 05:37:29 +07:00
|
|
|
<reference local="C_CASHLINE_ID" foreign="C_CASHLINE_ID"/>
|
|
|
|
</foreign-key>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="C_CHARGE" name="CCHARGE_CINVOICE" onDelete="none">
|
2006-12-29 05:37:29 +07:00
|
|
|
<reference local="C_CHARGE_ID" foreign="C_CHARGE_ID"/>
|
|
|
|
</foreign-key>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="C_CONVERSIONTYPE" name="CCONVERSIONTYPE_CINVOICE" onDelete="none">
|
2006-12-29 05:37:29 +07:00
|
|
|
<reference local="C_CONVERSIONTYPE_ID" foreign="C_CONVERSIONTYPE_ID"/>
|
|
|
|
</foreign-key>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_CINVOICE" onDelete="none">
|
2006-12-29 05:37:29 +07:00
|
|
|
<reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
|
|
|
|
</foreign-key>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="C_DOCTYPE" name="CDOCTYPETARGET_CINVOICE" onDelete="none">
|
2007-02-01 23:50:31 +07:00
|
|
|
<reference local="C_DOCTYPETARGET_ID" foreign="C_DOCTYPE_ID"/>
|
|
|
|
</foreign-key>
|
2007-04-02 17:15:26 +07:00
|
|
|
<foreign-key foreignTable="C_DOCTYPE" name="CDOCTYPE_CINVOICE" onDelete="none">
|
|
|
|
<reference local="C_DOCTYPE_ID" foreign="C_DOCTYPE_ID"/>
|
2006-12-29 05:37:29 +07:00
|
|
|
</foreign-key>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="C_ELEMENTVALUE" name="CELEMENTVALUEUSER1_CINVOICE" onDelete="none">
|
2007-03-01 12:59:56 +07:00
|
|
|
<reference local="USER1_ID" foreign="C_ELEMENTVALUE_ID"/>
|
|
|
|
</foreign-key>
|
2007-04-02 17:15:26 +07:00
|
|
|
<foreign-key foreignTable="C_ELEMENTVALUE" name="CELEMENTVALUEUSER2_CINVOICE" onDelete="none">
|
|
|
|
<reference local="USER2_ID" foreign="C_ELEMENTVALUE_ID"/>
|
|
|
|
</foreign-key>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="C_INVOICE" name="CINVOICE_REF" onDelete="none">
|
2006-12-29 05:37:29 +07:00
|
|
|
<reference local="REF_INVOICE_ID" foreign="C_INVOICE_ID"/>
|
|
|
|
</foreign-key>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="C_ORDER" name="CORDER_CINVOICE" onDelete="none">
|
2006-12-29 05:37:29 +07:00
|
|
|
<reference local="C_ORDER_ID" foreign="C_ORDER_ID"/>
|
|
|
|
</foreign-key>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="C_PAYMENT" name="CPAYMENT_CINVOICE" onDelete="none">
|
2006-12-29 05:37:29 +07:00
|
|
|
<reference local="C_PAYMENT_ID" foreign="C_PAYMENT_ID"/>
|
|
|
|
</foreign-key>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="C_PAYMENTTERM" name="CPAYMENTTERM_CINVOICE" onDelete="none">
|
2006-12-29 05:37:29 +07:00
|
|
|
<reference local="C_PAYMENTTERM_ID" foreign="C_PAYMENTTERM_ID"/>
|
|
|
|
</foreign-key>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="C_PROJECT" name="CPROJECT_CINVOICE" onDelete="none">
|
2006-12-29 05:37:29 +07:00
|
|
|
<reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
|
|
|
|
</foreign-key>
|
2007-03-22 06:56:13 +07:00
|
|
|
<foreign-key foreignTable="M_PRICELIST" name="MPRICELIST_CINVOICE" onDelete="none">
|
2006-12-29 05:37:29 +07:00
|
|
|
<reference local="M_PRICELIST_ID" foreign="M_PRICELIST_ID"/>
|
|
|
|
</foreign-key>
|
|
|
|
<index name="C_INVOICE_ORDER">
|
|
|
|
<index-column name="C_ORDER_ID"/>
|
|
|
|
</index>
|
|
|
|
<index name="C_INVOICE_BPARTNER">
|
|
|
|
<index-column name="C_BPARTNER_ID"/>
|
|
|
|
</index>
|
2007-02-01 23:50:31 +07:00
|
|
|
<unique name="C_INVOICE_KEY">
|
|
|
|
<unique-column name="C_INVOICE_ID"/>
|
|
|
|
</unique>
|
2006-12-29 05:37:29 +07:00
|
|
|
<unique name="C_INVOICE_DOCUMENTNO">
|
|
|
|
<unique-column name="DOCUMENTNO"/>
|
|
|
|
<unique-column name="C_DOCTYPE_ID"/>
|
|
|
|
<unique-column name="C_BPARTNER_ID"/>
|
|
|
|
</unique>
|
|
|
|
<index name="C_INVOICE_PAID">
|
|
|
|
<index-column name="AD_CLIENT_ID"/>
|
|
|
|
<index-column name="ISPAID"/>
|
|
|
|
</index>
|
|
|
|
<check>
|
|
|
|
<rule><![CDATA[IsActive in ('Y','N')]]></rule>
|
|
|
|
</check>
|
|
|
|
<check>
|
|
|
|
<rule><![CDATA[IsSOTrx in ('Y','N')]]></rule>
|
|
|
|
</check>
|
|
|
|
<check>
|
|
|
|
<rule><![CDATA[Processed in ('Y','N')]]></rule>
|
|
|
|
</check>
|
|
|
|
<check>
|
|
|
|
<rule><![CDATA[IsApproved in ('Y','N')]]></rule>
|
|
|
|
</check>
|
|
|
|
<check>
|
|
|
|
<rule><![CDATA[IsTransferred in ('Y','N')]]></rule>
|
|
|
|
</check>
|
|
|
|
<check>
|
|
|
|
<rule><![CDATA[IsPrinted in ('Y','N')]]></rule>
|
|
|
|
</check>
|
|
|
|
<check>
|
|
|
|
<rule><![CDATA[IsDiscountPrinted in ('Y','N')]]></rule>
|
|
|
|
</check>
|
|
|
|
<check>
|
|
|
|
<rule><![CDATA[IsTaxIncluded in ('Y','N')]]></rule>
|
|
|
|
</check>
|
|
|
|
<check>
|
|
|
|
<rule><![CDATA[IsPaid in ('Y','N')]]></rule>
|
|
|
|
</check>
|
|
|
|
<check>
|
|
|
|
<rule><![CDATA[CreateFrom in ('Y','N')]]></rule>
|
|
|
|
</check>
|
|
|
|
<check>
|
|
|
|
<rule><![CDATA[GenerateTo in ('Y','N')]]></rule>
|
|
|
|
</check>
|
|
|
|
</table>
|
|
|
|
</database>
|