src-db/database/model/tables/C_ORDERLINE.xml
author Gorka Ion Damián <gorkaion.damian@openbravo.com>
Mon, 12 Nov 2012 18:05:28 +0100
changeset 18693 7b17189c848b
parent 18662 c05cf8173234
child 18698 a289a347fb07
permissions -rw-r--r--
[Reservations]Add res status in SO and SOL.
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">
juanpablo@1605
     4
      <column name="C_ORDERLINE_ID" primaryKey="true" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
     5
        <default/>
antonio@735
     6
        <onCreateDefault/>
antonio@735
     7
      </column>
juanpablo@1605
     8
      <column name="AD_CLIENT_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
     9
        <default/>
antonio@735
    10
        <onCreateDefault/>
antonio@735
    11
      </column>
juanpablo@1605
    12
      <column name="AD_ORG_ID" primaryKey="false" required="true" type="VARCHAR" size="32" 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>
juanpablo@1605
    24
      <column name="CREATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" 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>
juanpablo@1605
    32
      <column name="UPDATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    33
        <default/>
antonio@735
    34
        <onCreateDefault/>
antonio@735
    35
      </column>
juanpablo@1605
    36
      <column name="C_ORDER_ID" primaryKey="false" required="true" type="VARCHAR" size="32" 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>
juanpablo@1605
    44
      <column name="C_BPARTNER_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    45
        <default/>
antonio@735
    46
        <onCreateDefault/>
antonio@735
    47
      </column>
juanpablo@1605
    48
      <column name="C_BPARTNER_LOCATION_ID" primaryKey="false" required="false" type="VARCHAR" size="32" 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>
juanpablo@1605
    72
      <column name="M_PRODUCT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    73
        <default/>
antonio@735
    74
        <onCreateDefault/>
antonio@735
    75
      </column>
juanpablo@1605
    76
      <column name="M_WAREHOUSE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" 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>
juanpablo@1605
    84
      <column name="C_UOM_ID" primaryKey="false" required="true" type="VARCHAR" size="32" 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>
juanpablo@1605
   104
      <column name="M_SHIPPER_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   105
        <default/>
antonio@735
   106
        <onCreateDefault/>
antonio@735
   107
      </column>
juanpablo@1605
   108
      <column name="C_CURRENCY_ID" primaryKey="false" required="true" type="VARCHAR" size="32" 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>
juanpablo@1605
   136
      <column name="C_CHARGE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" 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>
juanpablo@1605
   144
      <column name="C_TAX_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   145
        <default/>
antonio@735
   146
        <onCreateDefault/>
antonio@735
   147
      </column>
juanpablo@1605
   148
      <column name="S_RESOURCEASSIGNMENT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   149
        <default/>
antonio@735
   150
        <onCreateDefault/>
antonio@735
   151
      </column>
juanpablo@1605
   152
      <column name="REF_ORDERLINE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   153
        <default/>
antonio@735
   154
        <onCreateDefault/>
antonio@735
   155
      </column>
juanpablo@1605
   156
      <column name="M_ATTRIBUTESETINSTANCE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   157
        <default/>
antonio@735
   158
        <onCreateDefault/>
antonio@735
   159
      </column>
antonio@735
   160
      <column name="ISDESCRIPTION" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
antonio@735
   161
        <default><![CDATA[N]]></default>
antonio@735
   162
        <onCreateDefault/>
antonio@735
   163
      </column>
antonio@735
   164
      <column name="QUANTITYORDER" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
antonio@735
   165
        <default/>
antonio@735
   166
        <onCreateDefault/>
antonio@735
   167
      </column>
juanpablo@1605
   168
      <column name="M_PRODUCT_UOM_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   169
        <default/>
antonio@735
   170
        <onCreateDefault/>
antonio@735
   171
      </column>
juanpablo@1605
   172
      <column name="M_OFFER_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   173
        <default/>
antonio@735
   174
        <onCreateDefault/>
antonio@735
   175
      </column>
antonio@735
   176
      <column name="PRICESTD" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
antonio@735
   177
        <default><![CDATA[0]]></default>
antonio@735
   178
        <onCreateDefault/>
antonio@735
   179
      </column>
gorka@3491
   180
      <column name="CANCELPRICEAD" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
harikrishnan@5157
   181
        <default><![CDATA[N]]></default>
gorka@3638
   182
        <onCreateDefault><![CDATA['N']]></onCreateDefault>
gorka@3491
   183
      </column>
victor@3593
   184
      <column name="C_ORDER_DISCOUNT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
victor@3593
   185
        <default/>
victor@3593
   186
        <onCreateDefault/>
victor@3593
   187
      </column>
balamurugan@5969
   188
      <column name="ISEDITLINENETAMT" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
balamurugan@5969
   189
        <default><![CDATA[N]]></default>
balamurugan@5969
   190
        <onCreateDefault/>
balamurugan@5969
   191
      </column>
eduardo@6017
   192
      <column name="TAXBASEAMT" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
eduardo@6017
   193
        <default/>
eduardo@6017
   194
        <onCreateDefault><![CDATA[LINENETAMT]]></onCreateDefault>
eduardo@6017
   195
      </column>
gorkaion@14378
   196
      <column name="M_INOUTLINE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
gorkaion@14378
   197
        <default/>
gorkaion@14378
   198
        <onCreateDefault/>
gorkaion@14378
   199
      </column>
pablo@14549
   200
      <column name="C_RETURN_REASON_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
pablo@14549
   201
        <default/>
pablo@14549
   202
        <onCreateDefault/>
pablo@14549
   203
      </column>
hari@17318
   204
      <column name="GROSS_UNIT_PRICE" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
meeravalli@17308
   205
        <default><![CDATA[0]]></default>
meeravalli@17308
   206
        <onCreateDefault/>
meeravalli@17308
   207
      </column>
hari@17318
   208
      <column name="LINE_GROSS_AMOUNT" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
meeravalli@17308
   209
        <default><![CDATA[0]]></default>
meeravalli@17308
   210
        <onCreateDefault/>
meeravalli@17308
   211
      </column>
gorkaion@17480
   212
      <column name="GROSSPRICELIST" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
gorkaion@17480
   213
        <default/>
gorkaion@17480
   214
        <onCreateDefault/>
gorkaion@17480
   215
      </column>
gorkaion@18637
   216
      <column name="M_WAREHOUSE_RULE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
gorkaion@18637
   217
        <default/>
gorkaion@18637
   218
        <onCreateDefault/>
gorkaion@18637
   219
      </column>
gorkaion@18662
   220
      <column name="CREATE_RESERVATION" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false">
gorkaion@18662
   221
        <default/>
gorkaion@18662
   222
        <onCreateDefault/>
gorkaion@18662
   223
      </column>
gorkaion@18693
   224
      <column name="SO_RES_STATUS" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false">
gorkaion@18693
   225
        <default/>
gorkaion@18693
   226
        <onCreateDefault/>
gorkaion@18693
   227
      </column>
asier@5551
   228
      <foreign-key foreignTable="AD_CLIENT" name="C_ORDERLINE_AD_CLIENT">
carlos@0
   229
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
carlos@0
   230
      </foreign-key>
asier@5551
   231
      <foreign-key foreignTable="AD_ORG" name="C_ORDERLINE_AD_ORG">
carlos@0
   232
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
carlos@0
   233
      </foreign-key>
asier@5551
   234
      <foreign-key foreignTable="C_BPARTNER" name="C_ORDERLINE_C_BPARTNER">
asier@5551
   235
        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
asier@5551
   236
      </foreign-key>
asier@5551
   237
      <foreign-key foreignTable="C_BPARTNER_LOCATION" name="C_ORDERLINE_C_BPARTNER_LOCATIO">
asier@5551
   238
        <reference local="C_BPARTNER_LOCATION_ID" foreign="C_BPARTNER_LOCATION_ID"/>
asier@5551
   239
      </foreign-key>
asier@5551
   240
      <foreign-key foreignTable="C_CHARGE" name="C_ORDERLINE_C_CHARGE">
asier@5551
   241
        <reference local="C_CHARGE_ID" foreign="C_CHARGE_ID"/>
asier@5551
   242
      </foreign-key>
asier@5551
   243
      <foreign-key foreignTable="C_CURRENCY" name="C_ORDERLINE_C_CURRENCY">
asier@5551
   244
        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
asier@5551
   245
      </foreign-key>
asier@5551
   246
      <foreign-key foreignTable="C_ORDER" name="C_ORDERLINE_C_ORDER">
asier@5551
   247
        <reference local="C_ORDER_ID" foreign="C_ORDER_ID"/>
asier@5551
   248
      </foreign-key>
asier@5551
   249
      <foreign-key foreignTable="C_ORDER_DISCOUNT" name="C_ORDERLINE_C_ORDER_DISCOUNT">
asier@5551
   250
        <reference local="C_ORDER_DISCOUNT_ID" foreign="C_ORDER_DISCOUNT_ID"/>
asier@5551
   251
      </foreign-key>
pablo@14549
   252
      <foreign-key foreignTable="C_RETURN_REASON" name="C_ORDERLINE_C_RETURN_REASON">
pablo@14549
   253
        <reference local="C_RETURN_REASON_ID" foreign="C_RETURN_REASON_ID"/>
pablo@14549
   254
      </foreign-key>
asier@5551
   255
      <foreign-key foreignTable="C_TAX" name="C_ORDERLINE_C_TAX">
asier@5551
   256
        <reference local="C_TAX_ID" foreign="C_TAX_ID"/>
asier@5551
   257
      </foreign-key>
asier@5551
   258
      <foreign-key foreignTable="C_UOM" name="C_ORDERLINE_C_UOM">
asier@5551
   259
        <reference local="C_UOM_ID" foreign="C_UOM_ID"/>
asier@5551
   260
      </foreign-key>
gorkaion@14378
   261
      <foreign-key foreignTable="M_INOUTLINE" name="C_ORDERLINE_INOUTLINE">
gorkaion@14378
   262
        <reference local="M_INOUTLINE_ID" foreign="M_INOUTLINE_ID"/>
gorkaion@14378
   263
      </foreign-key>
asier@5551
   264
      <foreign-key foreignTable="M_ATTRIBUTESETINSTANCE" name="C_ORDERLINE_M_ATTRIBUTESETINST">
asier@5551
   265
        <reference local="M_ATTRIBUTESETINSTANCE_ID" foreign="M_ATTRIBUTESETINSTANCE_ID"/>
asier@5551
   266
      </foreign-key>
asier@5551
   267
      <foreign-key foreignTable="M_OFFER" name="C_ORDERLINE_M_OFFER">
asier@5551
   268
        <reference local="M_OFFER_ID" foreign="M_OFFER_ID"/>
asier@5551
   269
      </foreign-key>
asier@5551
   270
      <foreign-key foreignTable="M_PRODUCT" name="C_ORDERLINE_M_PRODUCT">
asier@5551
   271
        <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
asier@5551
   272
      </foreign-key>
asier@5551
   273
      <foreign-key foreignTable="M_PRODUCT_UOM" name="C_ORDERLINE_M_PRODUCT_UOM">
asier@5551
   274
        <reference local="M_PRODUCT_UOM_ID" foreign="M_PRODUCT_UOM_ID"/>
asier@5551
   275
      </foreign-key>
asier@5551
   276
      <foreign-key foreignTable="M_SHIPPER" name="C_ORDERLINE_M_SHIPPER">
asier@5551
   277
        <reference local="M_SHIPPER_ID" foreign="M_SHIPPER_ID"/>
asier@5551
   278
      </foreign-key>
asier@5551
   279
      <foreign-key foreignTable="M_WAREHOUSE" name="C_ORDERLINE_M_WAREHOUSE">
asier@5551
   280
        <reference local="M_WAREHOUSE_ID" foreign="M_WAREHOUSE_ID"/>
asier@5551
   281
      </foreign-key>
asier@5551
   282
      <foreign-key foreignTable="S_RESOURCEASSIGNMENT" name="C_ORDERLINE_S_RESOURCEASSIGNME">
asier@5551
   283
        <reference local="S_RESOURCEASSIGNMENT_ID" foreign="S_RESOURCEASSIGNMENT_ID"/>
asier@5551
   284
      </foreign-key>
antonio@410
   285
      <foreign-key foreignTable="C_ORDERLINE" name="C_ORDERLINE_SOPOREF">
antonio@410
   286
        <reference local="REF_ORDERLINE_ID" foreign="C_ORDERLINE_ID"/>
adrian@170
   287
      </foreign-key>
gorkaion@18637
   288
      <foreign-key foreignTable="M_WAREHOUSE_RULE" name="C_ORDERLINE_WAREHOUSERULE">
gorkaion@18637
   289
        <reference local="M_WAREHOUSE_RULE_ID" foreign="M_WAREHOUSE_RULE_ID"/>
gorkaion@18637
   290
      </foreign-key>
pablo@14552
   291
      <index name="C_ORDERLINE_C_RETURN_REASON" unique="false">
pablo@14552
   292
        <index-column name="C_RETURN_REASON_ID"/>
pablo@14552
   293
      </index>
adrian@94
   294
      <index name="C_ORDERLINE_ORDER" unique="false">
carlos@0
   295
        <index-column name="C_ORDER_ID"/>
carlos@0
   296
      </index>
adrian@94
   297
      <index name="C_ORDERLINE_PRODUCT" unique="false">
carlos@0
   298
        <index-column name="M_PRODUCT_ID"/>
carlos@0
   299
      </index>
stefan@8505
   300
      <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>
stefan@8505
   301
      <check name="C_ORDERLINE_CHECK2"><![CDATA[(LINENETAMT = 0) OR (C_TAX_ID IS NOT NULL)]]></check>
stefan@8505
   302
      <check name="C_ORDERLINE_DIRECTSHIP_CHECK"><![CDATA[DIRECTSHIP IN ('Y', 'N')]]></check>
stefan@8505
   303
      <check name="C_ORDERLINE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
carlos@0
   304
    </table>
adrian@94
   305
  </database>