database/model/tables/C_ORDERLINE.xml
author Antonio Moreno <antonio.moreno@openbravo.com>
Tue, 22 Apr 2008 13:22:11 +0000
changeset 735 daced7e311c9
parent 410 ec5115414c8c
permissions -rw-r--r--
Structure after exporting from PostgreSQL with new dbsourcemanager
carlos@0
     1
<?xml version="1.0"?>
adrian@94
     2
  <database name="TABLE C_ORDERLINE">
carlos@0
     3
    <table name="C_ORDERLINE" primaryKey="C_ORDERLINE_KEY">
antonio@735
     4
      <column name="C_ORDERLINE_ID" primaryKey="true" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
antonio@735
     5
        <default/>
antonio@735
     6
        <onCreateDefault/>
antonio@735
     7
      </column>
antonio@735
     8
      <column name="AD_CLIENT_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
antonio@735
     9
        <default/>
antonio@735
    10
        <onCreateDefault/>
antonio@735
    11
      </column>
antonio@735
    12
      <column name="AD_ORG_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
antonio@735
    13
        <default/>
antonio@735
    14
        <onCreateDefault/>
antonio@735
    15
      </column>
antonio@735
    16
      <column name="ISACTIVE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
antonio@735
    17
        <default><![CDATA[Y]]></default>
antonio@735
    18
        <onCreateDefault/>
antonio@735
    19
      </column>
antonio@735
    20
      <column name="CREATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
antonio@735
    21
        <default><![CDATA[SYSDATE]]></default>
antonio@735
    22
        <onCreateDefault/>
antonio@735
    23
      </column>
antonio@735
    24
      <column name="CREATEDBY" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
antonio@735
    25
        <default/>
antonio@735
    26
        <onCreateDefault/>
antonio@735
    27
      </column>
antonio@735
    28
      <column name="UPDATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
antonio@735
    29
        <default><![CDATA[SYSDATE]]></default>
antonio@735
    30
        <onCreateDefault/>
antonio@735
    31
      </column>
antonio@735
    32
      <column name="UPDATEDBY" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
antonio@735
    33
        <default/>
antonio@735
    34
        <onCreateDefault/>
antonio@735
    35
      </column>
antonio@735
    36
      <column name="C_ORDER_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
antonio@735
    37
        <default/>
antonio@735
    38
        <onCreateDefault/>
antonio@735
    39
      </column>
antonio@735
    40
      <column name="LINE" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
antonio@735
    41
        <default/>
antonio@735
    42
        <onCreateDefault/>
antonio@735
    43
      </column>
antonio@735
    44
      <column name="C_BPARTNER_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
antonio@735
    45
        <default/>
antonio@735
    46
        <onCreateDefault/>
antonio@735
    47
      </column>
antonio@735
    48
      <column name="C_BPARTNER_LOCATION_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
antonio@735
    49
        <default/>
antonio@735
    50
        <onCreateDefault/>
antonio@735
    51
      </column>
antonio@735
    52
      <column name="DATEORDERED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
antonio@735
    53
        <default/>
antonio@735
    54
        <onCreateDefault/>
antonio@735
    55
      </column>
antonio@735
    56
      <column name="DATEPROMISED" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false">
antonio@735
    57
        <default/>
antonio@735
    58
        <onCreateDefault/>
antonio@735
    59
      </column>
antonio@735
    60
      <column name="DATEDELIVERED" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false">
antonio@735
    61
        <default/>
antonio@735
    62
        <onCreateDefault/>
antonio@735
    63
      </column>
antonio@735
    64
      <column name="DATEINVOICED" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false">
antonio@735
    65
        <default/>
antonio@735
    66
        <onCreateDefault/>
antonio@735
    67
      </column>
antonio@735
    68
      <column name="DESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="2000" autoIncrement="false">
antonio@735
    69
        <default/>
antonio@735
    70
        <onCreateDefault/>
antonio@735
    71
      </column>
antonio@735
    72
      <column name="M_PRODUCT_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
antonio@735
    73
        <default/>
antonio@735
    74
        <onCreateDefault/>
antonio@735
    75
      </column>
antonio@735
    76
      <column name="M_WAREHOUSE_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
antonio@735
    77
        <default/>
antonio@735
    78
        <onCreateDefault/>
antonio@735
    79
      </column>
antonio@735
    80
      <column name="DIRECTSHIP" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
antonio@735
    81
        <default><![CDATA[N]]></default>
antonio@735
    82
        <onCreateDefault/>
antonio@735
    83
      </column>
antonio@735
    84
      <column name="C_UOM_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
antonio@735
    85
        <default/>
antonio@735
    86
        <onCreateDefault/>
antonio@735
    87
      </column>
antonio@735
    88
      <column name="QTYORDERED" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
antonio@735
    89
        <default><![CDATA[0]]></default>
antonio@735
    90
        <onCreateDefault/>
antonio@735
    91
      </column>
antonio@735
    92
      <column name="QTYRESERVED" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
antonio@735
    93
        <default><![CDATA[0]]></default>
antonio@735
    94
        <onCreateDefault/>
antonio@735
    95
      </column>
antonio@735
    96
      <column name="QTYDELIVERED" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
antonio@735
    97
        <default><![CDATA[0]]></default>
antonio@735
    98
        <onCreateDefault/>
antonio@735
    99
      </column>
antonio@735
   100
      <column name="QTYINVOICED" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
antonio@735
   101
        <default><![CDATA[0]]></default>
antonio@735
   102
        <onCreateDefault/>
antonio@735
   103
      </column>
antonio@735
   104
      <column name="M_SHIPPER_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
antonio@735
   105
        <default/>
antonio@735
   106
        <onCreateDefault/>
antonio@735
   107
      </column>
antonio@735
   108
      <column name="C_CURRENCY_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
antonio@735
   109
        <default/>
antonio@735
   110
        <onCreateDefault/>
antonio@735
   111
      </column>
antonio@735
   112
      <column name="PRICELIST" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
antonio@735
   113
        <default><![CDATA[0]]></default>
antonio@735
   114
        <onCreateDefault/>
antonio@735
   115
      </column>
antonio@735
   116
      <column name="PRICEACTUAL" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
antonio@735
   117
        <default><![CDATA[0]]></default>
antonio@735
   118
        <onCreateDefault/>
antonio@735
   119
      </column>
antonio@735
   120
      <column name="PRICELIMIT" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
antonio@735
   121
        <default><![CDATA[0]]></default>
antonio@735
   122
        <onCreateDefault/>
antonio@735
   123
      </column>
antonio@735
   124
      <column name="LINENETAMT" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
antonio@735
   125
        <default><![CDATA[0]]></default>
antonio@735
   126
        <onCreateDefault/>
antonio@735
   127
      </column>
antonio@735
   128
      <column name="DISCOUNT" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
antonio@735
   129
        <default/>
antonio@735
   130
        <onCreateDefault/>
antonio@735
   131
      </column>
antonio@735
   132
      <column name="FREIGHTAMT" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
antonio@735
   133
        <default><![CDATA[0]]></default>
antonio@735
   134
        <onCreateDefault/>
antonio@735
   135
      </column>
antonio@735
   136
      <column name="C_CHARGE_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
antonio@735
   137
        <default/>
antonio@735
   138
        <onCreateDefault/>
antonio@735
   139
      </column>
antonio@735
   140
      <column name="CHARGEAMT" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
antonio@735
   141
        <default><![CDATA[0]]></default>
antonio@735
   142
        <onCreateDefault/>
antonio@735
   143
      </column>
antonio@735
   144
      <column name="C_TAX_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
antonio@735
   145
        <default/>
antonio@735
   146
        <onCreateDefault/>
antonio@735
   147
      </column>
antonio@735
   148
      <column name="LOT" primaryKey="false" required="false" type="VARCHAR" size="20" autoIncrement="false">
antonio@735
   149
        <default/>
antonio@735
   150
        <onCreateDefault/>
antonio@735
   151
      </column>
antonio@735
   152
      <column name="SERNO" primaryKey="false" required="false" type="VARCHAR" size="20" autoIncrement="false">
antonio@735
   153
        <default/>
antonio@735
   154
        <onCreateDefault/>
antonio@735
   155
      </column>
antonio@735
   156
      <column name="S_RESOURCEASSIGNMENT_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
antonio@735
   157
        <default/>
antonio@735
   158
        <onCreateDefault/>
antonio@735
   159
      </column>
antonio@735
   160
      <column name="REF_ORDERLINE_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
antonio@735
   161
        <default/>
antonio@735
   162
        <onCreateDefault/>
antonio@735
   163
      </column>
antonio@735
   164
      <column name="M_ATTRIBUTESETINSTANCE_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
antonio@735
   165
        <default/>
antonio@735
   166
        <onCreateDefault/>
antonio@735
   167
      </column>
antonio@735
   168
      <column name="ISDESCRIPTION" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
antonio@735
   169
        <default><![CDATA[N]]></default>
antonio@735
   170
        <onCreateDefault/>
antonio@735
   171
      </column>
antonio@735
   172
      <column name="QUANTITYORDER" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
antonio@735
   173
        <default/>
antonio@735
   174
        <onCreateDefault/>
antonio@735
   175
      </column>
antonio@735
   176
      <column name="M_PRODUCT_UOM_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
antonio@735
   177
        <default/>
antonio@735
   178
        <onCreateDefault/>
antonio@735
   179
      </column>
antonio@735
   180
      <column name="LASTPRICESO" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
antonio@735
   181
        <default/>
antonio@735
   182
        <onCreateDefault/>
antonio@735
   183
      </column>
antonio@735
   184
      <column name="M_OFFER_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
antonio@735
   185
        <default/>
antonio@735
   186
        <onCreateDefault/>
antonio@735
   187
      </column>
antonio@735
   188
      <column name="PRICESTD" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
antonio@735
   189
        <default><![CDATA[0]]></default>
antonio@735
   190
        <onCreateDefault/>
antonio@735
   191
      </column>
carlos@0
   192
      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CORDERLINE">
carlos@0
   193
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
carlos@0
   194
      </foreign-key>
carlos@0
   195
      <foreign-key foreignTable="AD_ORG" name="ADORG_CORDERLINE">
carlos@0
   196
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
carlos@0
   197
      </foreign-key>
antonio@410
   198
      <foreign-key foreignTable="C_ORDERLINE" name="C_ORDERLINE_SOPOREF">
antonio@410
   199
        <reference local="REF_ORDERLINE_ID" foreign="C_ORDERLINE_ID"/>
adrian@170
   200
      </foreign-key>
carlos@0
   201
      <foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_SOLINE">
carlos@0
   202
        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
carlos@0
   203
      </foreign-key>
antonio@410
   204
      <foreign-key foreignTable="C_BPARTNER_LOCATION" name="CBPARTNERLOCATION_SOLINE">
antonio@410
   205
        <reference local="C_BPARTNER_LOCATION_ID" foreign="C_BPARTNER_LOCATION_ID"/>
antonio@410
   206
      </foreign-key>
carlos@0
   207
      <foreign-key foreignTable="C_CHARGE" name="CCHARGE_CORDERLINE">
carlos@0
   208
        <reference local="C_CHARGE_ID" foreign="C_CHARGE_ID"/>
carlos@0
   209
      </foreign-key>
carlos@0
   210
      <foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_CORDERLINE">
carlos@0
   211
        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
carlos@0
   212
      </foreign-key>
carlos@0
   213
      <foreign-key foreignTable="C_ORDER" name="CORDER_CORDERLINE">
carlos@0
   214
        <reference local="C_ORDER_ID" foreign="C_ORDER_ID"/>
carlos@0
   215
      </foreign-key>
carlos@0
   216
      <foreign-key foreignTable="C_TAX" name="CTAX_CORDERLINE">
carlos@0
   217
        <reference local="C_TAX_ID" foreign="C_TAX_ID"/>
carlos@0
   218
      </foreign-key>
carlos@0
   219
      <foreign-key foreignTable="C_UOM" name="CUOM_CORDERLINE">
carlos@0
   220
        <reference local="C_UOM_ID" foreign="C_UOM_ID"/>
carlos@0
   221
      </foreign-key>
carlos@0
   222
      <foreign-key foreignTable="M_ATTRIBUTESETINSTANCE" name="MATTRSETINST_CORDERLINE">
carlos@0
   223
        <reference local="M_ATTRIBUTESETINSTANCE_ID" foreign="M_ATTRIBUTESETINSTANCE_ID"/>
carlos@0
   224
      </foreign-key>
carlos@0
   225
      <foreign-key foreignTable="M_OFFER" name="MOFFER_CORDERLINE">
carlos@0
   226
        <reference local="M_OFFER_ID" foreign="M_OFFER_ID"/>
carlos@0
   227
      </foreign-key>
antonio@410
   228
      <foreign-key foreignTable="M_PRODUCT" name="MPRODUCT_CORDERLINE">
antonio@410
   229
        <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
antonio@410
   230
      </foreign-key>
gorkaion@238
   231
      <foreign-key foreignTable="M_PRODUCT_UOM" name="MPRODUCTOUMID_CORDERLINE">
gorkaion@238
   232
        <reference local="M_PRODUCT_UOM_ID" foreign="M_PRODUCT_UOM_ID"/>
gorkaion@238
   233
      </foreign-key>
carlos@0
   234
      <foreign-key foreignTable="M_SHIPPER" name="MSHIPPER_CORDERLINE">
carlos@0
   235
        <reference local="M_SHIPPER_ID" foreign="M_SHIPPER_ID"/>
carlos@0
   236
      </foreign-key>
carlos@0
   237
      <foreign-key foreignTable="M_WAREHOUSE" name="MWAREHOUSE_CORDERLINE">
carlos@0
   238
        <reference local="M_WAREHOUSE_ID" foreign="M_WAREHOUSE_ID"/>
carlos@0
   239
      </foreign-key>
carlos@0
   240
      <foreign-key foreignTable="S_RESOURCEASSIGNMENT" name="SRESOURCEASSIGN_CORDERLINE">
carlos@0
   241
        <reference local="S_RESOURCEASSIGNMENT_ID" foreign="S_RESOURCEASSIGNMENT_ID"/>
carlos@0
   242
      </foreign-key>
adrian@94
   243
      <index name="C_ORDERLINE_ORDER" unique="false">
carlos@0
   244
        <index-column name="C_ORDER_ID"/>
carlos@0
   245
      </index>
adrian@94
   246
      <index name="C_ORDERLINE_PRODUCT" unique="false">
carlos@0
   247
        <index-column name="M_PRODUCT_ID"/>
carlos@0
   248
      </index>
ivan@258
   249
      <check name="C_ORDERLINE_CHECK1"><![CDATA[((QUANTITYORDER IS NULL) AND (M_PRODUCT_UOM_ID IS NULL)) OR ((QUANTITYORDER IS NOT NULL) AND (M_PRODUCT_UOM_ID IS NOT NULL))]]></check>
ivan@258
   250
      <check name="C_ORDERLINE_CHECK2"><![CDATA[(LINENETAMT = 0) OR (C_TAX_ID IS NOT NULL)]]></check>
ivan@258
   251
      <check name="C_ORDERLINE_DIRECTSHIP_CHECK"><![CDATA[DIRECTSHIP IN ('Y', 'N')]]></check>
ivan@258
   252
      <check name="C_ORDERLINE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
carlos@0
   253
    </table>
adrian@94
   254
  </database>