database/model/tables/I_INVOICE.xml
author Adrián Romero <adrian.romero@openbravo.com>
Wed, 05 Dec 2007 20:43:45 +0000
changeset 170 4b5493776a7f
parent 94 4e7ba7b8a4ad
child 238 006d2d0fdea6
permissions -rw-r--r--
Bug fixed: [ 1845110 ] Database model not in sync with database created
carlos@0
     1
<?xml version="1.0"?>
adrian@94
     2
  <database name="TABLE I_INVOICE">
carlos@0
     3
    <table name="I_INVOICE" primaryKey="I_INVOICE_KEY">
carlos@0
     4
      <column name="I_INVOICE_ID" primaryKey="true" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
     5
      <column name="AD_CLIENT_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
     6
      <column name="AD_ORG_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
     7
      <column name="AD_ORGTRX_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
     8
      <column name="ISACTIVE" primaryKey="false" required="false" type="CHAR" size="1" default="Y" autoIncrement="false"/>
carlos@0
     9
      <column name="CREATED" primaryKey="false" required="false" type="TIMESTAMP" size="7" default="SYSDATE" autoIncrement="false"/>
carlos@0
    10
      <column name="CREATEDBY" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    11
      <column name="UPDATED" primaryKey="false" required="false" type="TIMESTAMP" size="7" default="SYSDATE" autoIncrement="false"/>
carlos@0
    12
      <column name="UPDATEDBY" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    13
      <column name="I_ISIMPORTED" primaryKey="false" required="false" type="CHAR" size="1" default="N" autoIncrement="false"/>
carlos@0
    14
      <column name="I_ERRORMSG" primaryKey="false" required="false" type="NVARCHAR" size="2000" autoIncrement="false"/>
carlos@0
    15
      <column name="PROCESSING" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false"/>
carlos@0
    16
      <column name="PROCESSED" primaryKey="false" required="false" type="CHAR" size="1" default="N" autoIncrement="false"/>
carlos@0
    17
      <column name="M_PRICELIST_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    18
      <column name="C_CURRENCY_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    19
      <column name="SALESREP_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    20
      <column name="ISSOTRX" primaryKey="false" required="false" type="CHAR" size="1" default="Y" autoIncrement="false"/>
carlos@0
    21
      <column name="C_BPARTNER_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    22
      <column name="C_BPARTNER_LOCATION_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    23
      <column name="BPARTNERVALUE" primaryKey="false" required="false" type="NVARCHAR" size="40" autoIncrement="false"/>
carlos@0
    24
      <column name="NAME" primaryKey="false" required="false" type="NVARCHAR" size="60" autoIncrement="false"/>
carlos@0
    25
      <column name="C_LOCATION_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    26
      <column name="ADDRESS1" primaryKey="false" required="false" type="NVARCHAR" size="60" autoIncrement="false"/>
carlos@0
    27
      <column name="ADDRESS2" primaryKey="false" required="false" type="NVARCHAR" size="60" autoIncrement="false"/>
carlos@0
    28
      <column name="POSTAL" primaryKey="false" required="false" type="VARCHAR" size="10" autoIncrement="false"/>
carlos@0
    29
      <column name="CITY" primaryKey="false" required="false" type="NVARCHAR" size="60" autoIncrement="false"/>
carlos@0
    30
      <column name="C_REGION_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    31
      <column name="REGIONNAME" primaryKey="false" required="false" type="NVARCHAR" size="60" autoIncrement="false"/>
carlos@0
    32
      <column name="AD_USER_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    33
      <column name="EMAIL" primaryKey="false" required="false" type="NVARCHAR" size="60" autoIncrement="false"/>
carlos@0
    34
      <column name="CONTACTNAME" primaryKey="false" required="false" type="NVARCHAR" size="60" autoIncrement="false"/>
carlos@0
    35
      <column name="PHONE" primaryKey="false" required="false" type="NVARCHAR" size="40" autoIncrement="false"/>
carlos@0
    36
      <column name="C_COUNTRY_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    37
      <column name="COUNTRYCODE" primaryKey="false" required="false" type="CHAR" size="2" autoIncrement="false"/>
carlos@0
    38
      <column name="C_DOCTYPE_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    39
      <column name="DOCTYPENAME" primaryKey="false" required="false" type="NVARCHAR" size="60" autoIncrement="false"/>
carlos@0
    40
      <column name="C_PAYMENTTERM_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    41
      <column name="PAYMENTTERMVALUE" primaryKey="false" required="false" type="NVARCHAR" size="40" autoIncrement="false"/>
carlos@0
    42
      <column name="C_PROJECT_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    43
      <column name="C_CAMPAIGN_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    44
      <column name="C_ACTIVITY_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    45
      <column name="C_INVOICE_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    46
      <column name="DOCUMENTNO" primaryKey="false" required="false" type="NVARCHAR" size="30" autoIncrement="false"/>
carlos@0
    47
      <column name="DESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false"/>
carlos@0
    48
      <column name="M_PRODUCT_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    49
      <column name="PRODUCTVALUE" primaryKey="false" required="false" type="NVARCHAR" size="40" autoIncrement="false"/>
carlos@0
    50
      <column name="UPC" primaryKey="false" required="false" type="NVARCHAR" size="30" autoIncrement="false"/>
carlos@0
    51
      <column name="SKU" primaryKey="false" required="false" type="NVARCHAR" size="30" autoIncrement="false"/>
carlos@0
    52
      <column name="C_TAX_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    53
      <column name="TAXINDICATOR" primaryKey="false" required="false" type="VARCHAR" size="5" autoIncrement="false"/>
carlos@0
    54
      <column name="TAXAMT" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
carlos@0
    55
      <column name="C_INVOICELINE_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    56
      <column name="LINEDESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false"/>
carlos@0
    57
      <column name="QTYORDERED" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
carlos@0
    58
      <column name="PRICEACTUAL" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
carlos@0
    59
      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_IINVOICE">
carlos@0
    60
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
carlos@0
    61
      </foreign-key>
carlos@0
    62
      <foreign-key foreignTable="AD_ORG" name="ADORG_IINVOICE">
carlos@0
    63
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
carlos@0
    64
      </foreign-key>
carlos@0
    65
      <foreign-key foreignTable="AD_ORG" name="ADORGTRX_IINVOICE">
carlos@0
    66
        <reference local="AD_ORGTRX_ID" foreign="AD_ORG_ID"/>
carlos@0
    67
      </foreign-key>
carlos@0
    68
      <foreign-key foreignTable="AD_USER" name="ADUSER_IINVOICE">
carlos@0
    69
        <reference local="AD_USER_ID" foreign="AD_USER_ID"/>
carlos@0
    70
      </foreign-key>
carlos@0
    71
      <foreign-key foreignTable="C_ACTIVITY" name="CACTIVITY_IINVOICE">
carlos@0
    72
        <reference local="C_ACTIVITY_ID" foreign="C_ACTIVITY_ID"/>
carlos@0
    73
      </foreign-key>
carlos@0
    74
      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_IINVOICE">
carlos@0
    75
        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
carlos@0
    76
      </foreign-key>
carlos@0
    77
      <foreign-key foreignTable="C_BPARTNER_LOCATION" name="CBPLOCATION_IINVOICE">
carlos@0
    78
        <reference local="C_BPARTNER_LOCATION_ID" foreign="C_BPARTNER_LOCATION_ID"/>
carlos@0
    79
      </foreign-key>
carlos@0
    80
      <foreign-key foreignTable="C_CAMPAIGN" name="CCAMPAIGN_IINVOICE">
carlos@0
    81
        <reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
carlos@0
    82
      </foreign-key>
carlos@0
    83
      <foreign-key foreignTable="C_COUNTRY" name="CCOUNTRY_IINVOICE">
carlos@0
    84
        <reference local="C_COUNTRY_ID" foreign="C_COUNTRY_ID"/>
carlos@0
    85
      </foreign-key>
carlos@0
    86
      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_IINVOICE">
carlos@0
    87
        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
carlos@0
    88
      </foreign-key>
carlos@0
    89
      <foreign-key foreignTable="C_DOCTYPE" name="CDOCTYPE_IINVOICE">
carlos@0
    90
        <reference local="C_DOCTYPE_ID" foreign="C_DOCTYPE_ID"/>
carlos@0
    91
      </foreign-key>
adrian@170
    92
      <foreign-key foreignTable="C_INVOICELINE" name="CINVLICELINE_IINVOICE">
adrian@170
    93
        <reference local="C_INVOICELINE_ID" foreign="C_INVOICELINE_ID"/>
adrian@170
    94
      </foreign-key>
carlos@0
    95
      <foreign-key foreignTable="C_INVOICE" name="CINVOICE_IINVOICE">
carlos@0
    96
        <reference local="C_INVOICE_ID" foreign="C_INVOICE_ID"/>
carlos@0
    97
      </foreign-key>
carlos@0
    98
      <foreign-key foreignTable="C_LOCATION" name="CLOCATION_IINVOICE">
carlos@0
    99
        <reference local="C_LOCATION_ID" foreign="C_LOCATION_ID"/>
carlos@0
   100
      </foreign-key>
carlos@0
   101
      <foreign-key foreignTable="C_PAYMENTTERM" name="CPAYMENTTERM_IINVOICE">
carlos@0
   102
        <reference local="C_PAYMENTTERM_ID" foreign="C_PAYMENTTERM_ID"/>
carlos@0
   103
      </foreign-key>
carlos@0
   104
      <foreign-key foreignTable="C_PROJECT" name="CPROJECT_IINVOICE">
carlos@0
   105
        <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
carlos@0
   106
      </foreign-key>
carlos@0
   107
      <foreign-key foreignTable="C_REGION" name="CREGION_IINVOICE">
carlos@0
   108
        <reference local="C_REGION_ID" foreign="C_REGION_ID"/>
carlos@0
   109
      </foreign-key>
carlos@0
   110
      <foreign-key foreignTable="C_TAX" name="CTAX_IINVOICE">
carlos@0
   111
        <reference local="C_TAX_ID" foreign="C_TAX_ID"/>
carlos@0
   112
      </foreign-key>
carlos@0
   113
      <foreign-key foreignTable="M_PRICELIST" name="MPRICELIST_IINVOICE">
carlos@0
   114
        <reference local="M_PRICELIST_ID" foreign="M_PRICELIST_ID"/>
carlos@0
   115
      </foreign-key>
carlos@0
   116
      <foreign-key foreignTable="M_PRODUCT" name="NPRODUCT_IINVOICE">
carlos@0
   117
        <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
carlos@0
   118
      </foreign-key>
adrian@170
   119
      <foreign-key foreignTable="AD_USER" name="REFAD_USER1974">
adrian@170
   120
        <reference local="SALESREP_ID" foreign="AD_USER_ID"/>
adrian@170
   121
      </foreign-key>
adrian@170
   122
      <check name="I_INVOICE_I_ISIMPORTED_CHECK" condition="I_IsImported in (&apos;Y&apos;,&apos;N&apos;)"/>
adrian@94
   123
      <check name="I_INVOICE_ISACTIVE_CHECK" condition="IsActive in (&apos;Y&apos;,&apos;N&apos;)"/>
adrian@170
   124
      <check name="I_INVOICE_ISSOTRX_CHECK" condition="IsSOTrx in (&apos;Y&apos;,&apos;N&apos;)"/>
adrian@94
   125
      <check name="I_INVOICE_PROCESSED_CHECK" condition="Processed in (&apos;Y&apos;,&apos;N&apos;)"/>
carlos@0
   126
    </table>
adrian@94
   127
  </database>