core-jgi/db/ddlutils/model/C_INVOICE.xml

184 lines
12 KiB
XML

<?xml version="1.0"?>
<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database">
<database name="default" defaultIdMethod="none">
<table name="C_INVOICE">
<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"/>
<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"/>
<column name="CREATEDBY" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
<column name="UPDATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" default="CURRENT_TIMESTAMP" autoIncrement="false"/>
<column name="UPDATEDBY" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
<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"/>
<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"/>
<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"/>
<column name="SALESREP_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
<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"/>
<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"/>
<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"/>
<column name="C_CURRENCY_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
<column name="PAYMENTRULE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false"/>
<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"/>
<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"/>
<column name="M_PRICELIST_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
<column name="ISTAXINCLUDED" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
<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"/>
<column name="ISPAID" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
<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"/>
<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"/>
<column name="AD_USER_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
<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"/>
<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"/>
<column name="ISPAYSCHEDULEVALID" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
<column name="REF_INVOICE_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
<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"/>
<foreign-key foreignTable="AD_ORG" name="ADORGTRX_CINVOICE">
<reference local="AD_ORGTRX_ID" foreign="AD_ORG_ID"/>
</foreign-key>
<foreign-key foreignTable="AD_ORG" name="ADORG_CINVOICE">
<reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
</foreign-key>
<foreign-key foreignTable="AD_USER" name="ADUSER_CINVOICE">
<reference local="AD_USER_ID" foreign="AD_USER_ID"/>
</foreign-key>
<foreign-key foreignTable="AD_USER" name="ADUSER_SR_CINVOICE">
<reference local="SALESREP_ID" foreign="AD_USER_ID"/>
</foreign-key>
<foreign-key foreignTable="C_ACTIVITY" name="CACTIVITY_CINVOICE">
<reference local="C_ACTIVITY_ID" foreign="C_ACTIVITY_ID"/>
</foreign-key>
<foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_CINVOICE">
<reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
</foreign-key>
<foreign-key foreignTable="C_BPARTNER_LOCATION" name="C_BPLOCATION_CINVOICE">
<reference local="C_BPARTNER_LOCATION_ID" foreign="C_BPARTNER_LOCATION_ID"/>
</foreign-key>
<foreign-key foreignTable="C_CAMPAIGN" name="CCAMPAIGN_CINVOICE">
<reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
</foreign-key>
<foreign-key foreignTable="C_CASHLINE" name="CCASHLINE_CINVOICE">
<reference local="C_CASHLINE_ID" foreign="C_CASHLINE_ID"/>
</foreign-key>
<foreign-key foreignTable="C_CHARGE" name="CCHARGE_CINVOICE">
<reference local="C_CHARGE_ID" foreign="C_CHARGE_ID"/>
</foreign-key>
<foreign-key foreignTable="C_CONVERSIONTYPE" name="CCONVERSIONTYPE_CINVOICE">
<reference local="C_CONVERSIONTYPE_ID" foreign="C_CONVERSIONTYPE_ID"/>
</foreign-key>
<foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_CINVOICE">
<reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
</foreign-key>
<foreign-key foreignTable="C_DOCTYPE" name="CDOCTYPE_CINVOICE">
<reference local="C_DOCTYPE_ID" foreign="C_DOCTYPE_ID"/>
</foreign-key>
<foreign-key foreignTable="C_DOCTYPE" name="CDOCTYPETARGET_CINVOICE">
<reference local="C_DOCTYPETARGET_ID" foreign="C_DOCTYPE_ID"/>
</foreign-key>
<foreign-key foreignTable="C_ELEMENTVALUE" name="CELEMENTVALUEUSER1_CINVOICE">
<reference local="USER1_ID" foreign="C_ELEMENTVALUE_ID"/>
</foreign-key>
<foreign-key foreignTable="C_ELEMENTVALUE" name="CELEMENTVALUEUSER2_CINVOICE">
<reference local="USER2_ID" foreign="C_ELEMENTVALUE_ID"/>
</foreign-key>
<foreign-key foreignTable="C_INVOICE" name="CINVOICE_REF">
<reference local="REF_INVOICE_ID" foreign="C_INVOICE_ID"/>
</foreign-key>
<foreign-key foreignTable="C_ORDER" name="CORDER_CINVOICE">
<reference local="C_ORDER_ID" foreign="C_ORDER_ID"/>
</foreign-key>
<foreign-key foreignTable="C_PAYMENT" name="CPAYMENT_CINVOICE">
<reference local="C_PAYMENT_ID" foreign="C_PAYMENT_ID"/>
</foreign-key>
<foreign-key foreignTable="C_PAYMENTTERM" name="CPAYMENTTERM_CINVOICE">
<reference local="C_PAYMENTTERM_ID" foreign="C_PAYMENTTERM_ID"/>
</foreign-key>
<foreign-key foreignTable="C_PROJECT" name="CPROJECT_CINVOICE">
<reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
</foreign-key>
<foreign-key foreignTable="M_PRICELIST" name="MPRICELIST_CINVOICE">
<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>
<unique name="C_INVOICE_KEY">
<unique-column name="C_INVOICE_ID"/>
</unique>
<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>