src-db/database/model/tables/C_INVOICE.xml
author Atul Gaware <atul.gaware@openbravo.com>
Tue, 12 Feb 2019 01:28:47 +0530
changeset 35442 018aa4e83090
parent 34905 fd033d0b5bc1
child 35504 add8fb4f0291
permissions -rw-r--r--
Fixes Issue 40119:Set two new columns in C_Invoice as nullable and do not
set a default value

** Remove NOT NULL constraint for columns CREATEFROMORDERS, CREATEFROMINOUTS
** Avoid setting DEFAULT value N for above columns.
** Remove check constraint either Y or N for above columns.
carlos@0
     1
<?xml version="1.0"?>
adrian@94
     2
  <database name="TABLE C_INVOICE">
carlos@0
     3
    <table name="C_INVOICE" primaryKey="C_INVOICE_KEY">
juanpablo@1605
     4
      <column name="C_INVOICE_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>
antonio@735
    36
      <column name="ISSOTRX" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
antonio@735
    37
        <default><![CDATA[Y]]></default>
antonio@735
    38
        <onCreateDefault/>
antonio@735
    39
      </column>
antonio@735
    40
      <column name="DOCUMENTNO" primaryKey="false" required="true" type="NVARCHAR" size="30" autoIncrement="false">
antonio@735
    41
        <default/>
antonio@735
    42
        <onCreateDefault/>
antonio@735
    43
      </column>
asier@2586
    44
      <column name="DOCSTATUS" primaryKey="false" required="true" type="VARCHAR" size="60" autoIncrement="false">
antonio@735
    45
        <default/>
antonio@735
    46
        <onCreateDefault/>
antonio@735
    47
      </column>
asier@2586
    48
      <column name="DOCACTION" primaryKey="false" required="true" type="VARCHAR" size="60" autoIncrement="false">
antonio@735
    49
        <default/>
antonio@735
    50
        <onCreateDefault/>
antonio@735
    51
      </column>
antonio@735
    52
      <column name="PROCESSING" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
antonio@735
    53
        <default/>
antonio@735
    54
        <onCreateDefault/>
antonio@735
    55
      </column>
antonio@735
    56
      <column name="PROCESSED" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
antonio@735
    57
        <default><![CDATA[N]]></default>
antonio@735
    58
        <onCreateDefault/>
antonio@735
    59
      </column>
asier@2586
    60
      <column name="POSTED" primaryKey="false" required="true" type="VARCHAR" size="60" autoIncrement="false">
antonio@735
    61
        <default><![CDATA[N]]></default>
antonio@735
    62
        <onCreateDefault/>
antonio@735
    63
      </column>
juanpablo@1605
    64
      <column name="C_DOCTYPE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    65
        <default/>
antonio@735
    66
        <onCreateDefault/>
antonio@735
    67
      </column>
juanpablo@1605
    68
      <column name="C_DOCTYPETARGET_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    69
        <default/>
antonio@735
    70
        <onCreateDefault/>
antonio@735
    71
      </column>
juanpablo@1605
    72
      <column name="C_ORDER_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    73
        <default/>
antonio@735
    74
        <onCreateDefault/>
antonio@735
    75
      </column>
antonio@735
    76
      <column name="DESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false">
antonio@735
    77
        <default/>
antonio@735
    78
        <onCreateDefault/>
antonio@735
    79
      </column>
antonio@735
    80
      <column name="ISPRINTED" 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="SALESREP_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    85
        <default/>
antonio@735
    86
        <onCreateDefault/>
antonio@735
    87
      </column>
antonio@735
    88
      <column name="DATEINVOICED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
antonio@735
    89
        <default/>
antonio@735
    90
        <onCreateDefault/>
antonio@735
    91
      </column>
antonio@735
    92
      <column name="DATEPRINTED" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false">
antonio@735
    93
        <default/>
antonio@735
    94
        <onCreateDefault/>
antonio@735
    95
      </column>
antonio@735
    96
      <column name="DATEACCT" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
antonio@735
    97
        <default/>
antonio@735
    98
        <onCreateDefault/>
antonio@735
    99
      </column>
juanpablo@1605
   100
      <column name="C_BPARTNER_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   101
        <default/>
antonio@735
   102
        <onCreateDefault/>
antonio@735
   103
      </column>
juanpablo@1605
   104
      <column name="C_BPARTNER_LOCATION_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   105
        <default/>
antonio@735
   106
        <onCreateDefault/>
antonio@735
   107
      </column>
antonio@735
   108
      <column name="POREFERENCE" primaryKey="false" required="false" type="NVARCHAR" size="20" autoIncrement="false">
antonio@735
   109
        <default/>
antonio@735
   110
        <onCreateDefault/>
antonio@735
   111
      </column>
antonio@735
   112
      <column name="ISDISCOUNTPRINTED" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
antonio@735
   113
        <default><![CDATA[Y]]></default>
antonio@735
   114
        <onCreateDefault/>
antonio@735
   115
      </column>
antonio@735
   116
      <column name="DATEORDERED" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false">
antonio@735
   117
        <default/>
antonio@735
   118
        <onCreateDefault/>
antonio@735
   119
      </column>
juanpablo@1605
   120
      <column name="C_CURRENCY_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   121
        <default/>
antonio@735
   122
        <onCreateDefault/>
antonio@735
   123
      </column>
sandra@16124
   124
      <column name="PAYMENTRULE" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false">
antonio@735
   125
        <default/>
antonio@735
   126
        <onCreateDefault/>
antonio@735
   127
      </column>
juanpablo@1605
   128
      <column name="C_PAYMENTTERM_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   129
        <default/>
antonio@735
   130
        <onCreateDefault/>
antonio@735
   131
      </column>
juanpablo@1605
   132
      <column name="C_CHARGE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   133
        <default/>
antonio@735
   134
        <onCreateDefault/>
antonio@735
   135
      </column>
antonio@735
   136
      <column name="CHARGEAMT" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
antonio@735
   137
        <default><![CDATA[0]]></default>
antonio@735
   138
        <onCreateDefault/>
antonio@735
   139
      </column>
antonio@735
   140
      <column name="TOTALLINES" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
antonio@735
   141
        <default><![CDATA[0]]></default>
antonio@735
   142
        <onCreateDefault/>
antonio@735
   143
      </column>
antonio@735
   144
      <column name="GRANDTOTAL" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
antonio@735
   145
        <default><![CDATA[0]]></default>
antonio@735
   146
        <onCreateDefault/>
antonio@735
   147
      </column>
juanpablo@1605
   148
      <column name="M_PRICELIST_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   149
        <default/>
antonio@735
   150
        <onCreateDefault/>
antonio@735
   151
      </column>
antonio@735
   152
      <column name="ISTAXINCLUDED" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
antonio@735
   153
        <default><![CDATA[N]]></default>
antonio@735
   154
        <onCreateDefault/>
antonio@735
   155
      </column>
juanpablo@1605
   156
      <column name="C_CAMPAIGN_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   157
        <default/>
antonio@735
   158
        <onCreateDefault/>
antonio@735
   159
      </column>
juanpablo@1605
   160
      <column name="C_PROJECT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   161
        <default/>
antonio@735
   162
        <onCreateDefault/>
antonio@735
   163
      </column>
juanpablo@1605
   164
      <column name="C_ACTIVITY_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   165
        <default/>
antonio@735
   166
        <onCreateDefault/>
antonio@735
   167
      </column>
antonio@735
   168
      <column name="CREATEFROM" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
antonio@735
   169
        <default/>
antonio@735
   170
        <onCreateDefault/>
antonio@735
   171
      </column>
antonio@735
   172
      <column name="GENERATETO" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
antonio@735
   173
        <default/>
antonio@735
   174
        <onCreateDefault/>
antonio@735
   175
      </column>
juanpablo@1605
   176
      <column name="AD_USER_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   177
        <default/>
antonio@735
   178
        <onCreateDefault/>
antonio@735
   179
      </column>
antonio@735
   180
      <column name="COPYFROM" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
antonio@735
   181
        <default/>
antonio@735
   182
        <onCreateDefault/>
antonio@735
   183
      </column>
antonio@735
   184
      <column name="ISSELFSERVICE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
antonio@735
   185
        <default><![CDATA[N]]></default>
antonio@735
   186
        <onCreateDefault/>
antonio@735
   187
      </column>
juanpablo@1605
   188
      <column name="AD_ORGTRX_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   189
        <default/>
antonio@735
   190
        <onCreateDefault/>
antonio@735
   191
      </column>
juanpablo@1605
   192
      <column name="USER1_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   193
        <default/>
antonio@735
   194
        <onCreateDefault/>
antonio@735
   195
      </column>
juanpablo@1605
   196
      <column name="USER2_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   197
        <default/>
antonio@735
   198
        <onCreateDefault/>
antonio@735
   199
      </column>
antonio@735
   200
      <column name="WITHHOLDINGAMOUNT" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
antonio@735
   201
        <default/>
antonio@735
   202
        <onCreateDefault/>
antonio@735
   203
      </column>
antonio@735
   204
      <column name="TAXDATE" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false">
antonio@735
   205
        <default/>
antonio@735
   206
        <onCreateDefault/>
antonio@735
   207
      </column>
juanpablo@1605
   208
      <column name="C_WITHHOLDING_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   209
        <default/>
antonio@735
   210
        <onCreateDefault/>
antonio@735
   211
      </column>
eduardo@5508
   212
      <column name="ISPAID" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
eduardo@5508
   213
        <default><![CDATA[N]]></default>
eduardo@5570
   214
        <onCreateDefault><![CDATA['N']]></onCreateDefault>
eduardo@5508
   215
      </column>
eduardo@5508
   216
      <column name="TOTALPAID" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
eduardo@5508
   217
        <default><![CDATA[0]]></default>
eduardo@5570
   218
        <onCreateDefault><![CDATA[0]]></onCreateDefault>
eduardo@5508
   219
      </column>
eduardo@5508
   220
      <column name="OUTSTANDINGAMT" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
eduardo@5508
   221
        <default><![CDATA[0]]></default>
eduardo@5570
   222
        <onCreateDefault><![CDATA[0]]></onCreateDefault>
eduardo@5508
   223
      </column>
eduardo@5508
   224
      <column name="DAYSTILLDUE" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
eduardo@5508
   225
        <default><![CDATA[0]]></default>
eduardo@5570
   226
        <onCreateDefault><![CDATA[0]]></onCreateDefault>
eduardo@5508
   227
      </column>
eduardo@5508
   228
      <column name="DUEAMT" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
eduardo@5508
   229
        <default><![CDATA[0]]></default>
eduardo@5570
   230
        <onCreateDefault><![CDATA[0]]></onCreateDefault>
eduardo@5508
   231
      </column>
eduardo@5508
   232
      <column name="LASTCALCULATEDONDATE" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false">
eduardo@5508
   233
        <default/>
eduardo@5508
   234
        <onCreateDefault/>
eduardo@5508
   235
      </column>
eduardo@5508
   236
      <column name="UPDATEPAYMENTMONITOR" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
eduardo@5508
   237
        <default><![CDATA[N]]></default>
eduardo@5570
   238
        <onCreateDefault><![CDATA['N']]></onCreateDefault>
eduardo@5508
   239
      </column>
gorkaion@6874
   240
      <column name="FIN_PAYMENTMETHOD_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
gorkaion@6874
   241
        <default/>
gorkaion@6874
   242
        <onCreateDefault/>
gorkaion@6874
   243
      </column>
mikel@9938
   244
      <column name="FIN_PAYMENT_PRIORITY_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
mikel@9938
   245
        <default/>
mikel@9938
   246
        <onCreateDefault/>
mikel@9938
   247
      </column>
david@15453
   248
      <column name="FINALSETTLEMENT" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false">
david@15453
   249
        <default/>
david@15453
   250
        <onCreateDefault/>
david@15453
   251
      </column>
david@15453
   252
      <column name="DAYSOUTSTANDING" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
david@15453
   253
        <default/>
david@15453
   254
        <onCreateDefault/>
david@15453
   255
      </column>
david@15453
   256
      <column name="PERCENTAGEOVERDUE" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
david@15453
   257
        <default/>
david@15453
   258
        <onCreateDefault/>
david@15453
   259
      </column>
pandeeswari@18809
   260
      <column name="C_COSTCENTER_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
pandeeswari@18809
   261
        <default/>
pandeeswari@18809
   262
        <onCreateDefault/>
pandeeswari@18809
   263
      </column>
asier@18337
   264
      <column name="CALCULATE_PROMOTIONS" primaryKey="false" required="false" type="VARCHAR" size="1" autoIncrement="false">
asier@18337
   265
        <default/>
asier@18337
   266
        <onCreateDefault/>
asier@18337
   267
      </column>
pandeeswari@18809
   268
      <column name="A_ASSET_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
pandeeswari@18809
   269
        <default/>
pandeeswari@18809
   270
        <onCreateDefault/>
pandeeswari@18809
   271
      </column>
victor@21513
   272
      <column name="ISCASHVAT" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
victor@21513
   273
        <default><![CDATA[N]]></default>
victor@21513
   274
        <onCreateDefault/>
victor@21513
   275
      </column>
sandra@25543
   276
      <column name="PREPAYMENTAMT" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
sandra@25543
   277
        <default><![CDATA[0]]></default>
sandra@25543
   278
        <onCreateDefault><![CDATA[0]]></onCreateDefault>
sandra@25543
   279
      </column>
atul@35442
   280
      <column name="CREATEFROMORDERS" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
atul@35442
   281
        <default/>
markmm82@34519
   282
        <onCreateDefault/>
markmm82@34519
   283
      </column>
atul@35442
   284
      <column name="CREATEFROMINOUTS" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
atul@35442
   285
        <default/>
markmm82@34519
   286
        <onCreateDefault/>
markmm82@34519
   287
      </column>
asier@5551
   288
      <foreign-key foreignTable="C_BPARTNER_LOCATION" name="C_BPLOCATION_CINVOICE">
asier@5551
   289
        <reference local="C_BPARTNER_LOCATION_ID" foreign="C_BPARTNER_LOCATION_ID"/>
asier@5551
   290
      </foreign-key>
asier@5551
   291
      <foreign-key foreignTable="AD_CLIENT" name="C_INVOICE_AD_CLIENT">
carlos@0
   292
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
carlos@0
   293
      </foreign-key>
asier@5551
   294
      <foreign-key foreignTable="AD_ORG" name="C_INVOICE_AD_ORG">
antonio@410
   295
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
antonio@410
   296
      </foreign-key>
asier@5551
   297
      <foreign-key foreignTable="AD_ORG" name="C_INVOICE_AD_ORGTRX">
gorkaion@238
   298
        <reference local="AD_ORGTRX_ID" foreign="AD_ORG_ID"/>
gorkaion@238
   299
      </foreign-key>
asier@5551
   300
      <foreign-key foreignTable="AD_USER" name="C_INVOICE_AD_USER">
carlos@0
   301
        <reference local="AD_USER_ID" foreign="AD_USER_ID"/>
carlos@0
   302
      </foreign-key>
pandeeswari@18809
   303
      <foreign-key foreignTable="A_ASSET" name="C_INVOICE_ASSET">
pandeeswari@18809
   304
        <reference local="A_ASSET_ID" foreign="A_ASSET_ID"/>
pandeeswari@18809
   305
      </foreign-key>
asier@5551
   306
      <foreign-key foreignTable="C_ACTIVITY" name="C_INVOICE_C_ACTIVITY">
asier@5551
   307
        <reference local="C_ACTIVITY_ID" foreign="C_ACTIVITY_ID"/>
carlos@0
   308
      </foreign-key>
asier@5551
   309
      <foreign-key foreignTable="C_BPARTNER" name="C_INVOICE_C_BPARTNER">
asier@5551
   310
        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
asier@5551
   311
      </foreign-key>
asier@5551
   312
      <foreign-key foreignTable="C_CAMPAIGN" name="C_INVOICE_C_CAMPAIGN">
asier@5551
   313
        <reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
asier@5551
   314
      </foreign-key>
asier@5551
   315
      <foreign-key foreignTable="C_CHARGE" name="C_INVOICE_C_CHARGE">
asier@5551
   316
        <reference local="C_CHARGE_ID" foreign="C_CHARGE_ID"/>
asier@5551
   317
      </foreign-key>
asier@5551
   318
      <foreign-key foreignTable="C_CURRENCY" name="C_INVOICE_C_CURRENCY">
asier@5551
   319
        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
asier@5551
   320
      </foreign-key>
asier@5551
   321
      <foreign-key foreignTable="C_DOCTYPE" name="C_INVOICE_C_DOCTYPE">
asier@5551
   322
        <reference local="C_DOCTYPE_ID" foreign="C_DOCTYPE_ID"/>
asier@5551
   323
      </foreign-key>
asier@5551
   324
      <foreign-key foreignTable="C_DOCTYPE" name="C_INVOICE_C_DOCTYPETARGET">
asier@5551
   325
        <reference local="C_DOCTYPETARGET_ID" foreign="C_DOCTYPE_ID"/>
asier@5551
   326
      </foreign-key>
asier@5551
   327
      <foreign-key foreignTable="C_ORDER" name="C_INVOICE_C_ORDER">
asier@5551
   328
        <reference local="C_ORDER_ID" foreign="C_ORDER_ID"/>
asier@5551
   329
      </foreign-key>
asier@5551
   330
      <foreign-key foreignTable="C_PAYMENTTERM" name="C_INVOICE_C_PAYMENTTERM">
asier@5551
   331
        <reference local="C_PAYMENTTERM_ID" foreign="C_PAYMENTTERM_ID"/>
asier@5551
   332
      </foreign-key>
asier@5551
   333
      <foreign-key foreignTable="C_PROJECT" name="C_INVOICE_C_PROJECT">
asier@5551
   334
        <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
antonio@410
   335
      </foreign-key>
martin@2771
   336
      <foreign-key foreignTable="C_WITHHOLDING" name="C_INVOICE_C_WITHHOLDING">
martin@2771
   337
        <reference local="C_WITHHOLDING_ID" foreign="C_WITHHOLDING_ID"/>
martin@2771
   338
      </foreign-key>
pandeeswari@18809
   339
      <foreign-key foreignTable="C_COSTCENTER" name="C_INVOICE_COSTCENTER">
pandeeswari@18809
   340
        <reference local="C_COSTCENTER_ID" foreign="C_COSTCENTER_ID"/>
pandeeswari@18809
   341
      </foreign-key>
gorkaion@6874
   342
      <foreign-key foreignTable="FIN_PAYMENTMETHOD" name="C_INVOICE_FIN_PAYMENTMETHOD">
gorkaion@6874
   343
        <reference local="FIN_PAYMENTMETHOD_ID" foreign="FIN_PAYMENTMETHOD_ID"/>
gorkaion@6874
   344
      </foreign-key>
asier@5551
   345
      <foreign-key foreignTable="M_PRICELIST" name="C_INVOICE_M_PRICELIST">
asier@5551
   346
        <reference local="M_PRICELIST_ID" foreign="M_PRICELIST_ID"/>
carlos@0
   347
      </foreign-key>
asier@5551
   348
      <foreign-key foreignTable="AD_USER" name="C_INVOICE_SALESREP">
asier@5551
   349
        <reference local="SALESREP_ID" foreign="AD_USER_ID"/>
carlos@0
   350
      </foreign-key>
eduardo@18847
   351
      <foreign-key foreignTable="USER1" name="C_INVOICE_USER1">
eduardo@18847
   352
        <reference local="USER1_ID" foreign="USER1_ID"/>
pandeeswari@18809
   353
      </foreign-key>
eduardo@18848
   354
      <foreign-key foreignTable="USER2" name="C_INVOICE_USER2">
eduardo@18848
   355
        <reference local="USER2_ID" foreign="USER2_ID"/>
pandeeswari@18809
   356
      </foreign-key>
mikel@9938
   357
      <foreign-key foreignTable="FIN_PAYMENT_PRIORITY" name="FIN_INVOICE_PAYMENT_PRIORITY">
mikel@9938
   358
        <reference local="FIN_PAYMENT_PRIORITY_ID" foreign="FIN_PAYMENT_PRIORITY_ID"/>
mikel@9938
   359
      </foreign-key>
markmm82@34905
   360
      <index name="C_INVOICE_AD_USER" unique="false">
markmm82@34905
   361
        <index-column name="AD_USER_ID"/>
markmm82@34905
   362
        <whereClause><![CDATA[AD_USER_ID IS NOT NULL]]></whereClause>
markmm82@34905
   363
      </index>
adrian@170
   364
      <index name="C_INVOICE_BPARTNER" unique="false">
adrian@170
   365
        <index-column name="C_BPARTNER_ID"/>
adrian@170
   366
      </index>
adrian@94
   367
      <index name="C_INVOICE_CLIENT_ORG_DATE_DOC" unique="false">
carlos@0
   368
        <index-column name="AD_CLIENT_ID"/>
carlos@0
   369
        <index-column name="AD_ORG_ID"/>
carlos@0
   370
        <index-column name="DATEINVOICED"/>
carlos@0
   371
        <index-column name="DOCUMENTNO"/>
carlos@0
   372
      </index>
adrian@94
   373
      <index name="C_INVOICE_DOCNO" unique="false">
carlos@0
   374
        <index-column name="DOCUMENTNO"/>
carlos@0
   375
      </index>
stefan@21930
   376
      <index name="C_INVOICE_ORDER" unique="false">
stefan@21930
   377
        <index-column name="C_ORDER_ID"/>
victor@31556
   378
        <whereClause><![CDATA[C_ORDER_ID IS NOT NULL]]></whereClause>
stefan@21930
   379
      </index>
fernando@25729
   380
      <index name="C_INVOICE_PAID" unique="false">
fernando@25729
   381
        <index-column name="ISPAID"/>
fernando@25729
   382
      </index>
alvaro@27393
   383
      <index name="C_INVOICE_POSTED" unique="false">
alvaro@27393
   384
        <index-column name="POSTED"/>
alvaro@27393
   385
      </index>
markmm82@34905
   386
      <index name="C_INVOICE_SALESREP" unique="false">
markmm82@34905
   387
        <index-column name="SALESREP_ID"/>
markmm82@34905
   388
        <whereClause><![CDATA[SALESREP_ID IS NOT NULL]]></whereClause>
markmm82@34905
   389
      </index>
adrian@94
   390
      <index name="C_INVOICE_UPDATED" unique="false">
carlos@0
   391
        <index-column name="UPDATED"/>
carlos@0
   392
      </index>
stefan@8505
   393
      <check name="C_INVOICE_CREATEFROM_CHECK"><![CDATA[CREATEFROM IN ('Y', 'N')]]></check>
stefan@8505
   394
      <check name="C_INVOICE_GENERATETO_CHECK"><![CDATA[GENERATETO IN ('Y', 'N')]]></check>
stefan@8505
   395
      <check name="C_INVOICE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
victor@21513
   396
      <check name="C_INVOICE_ISCASHVAT_CH"><![CDATA[ISCASHVAT IN ('Y', 'N')]]></check>
stefan@8505
   397
      <check name="C_INVOICE_ISDISCOUNTPRINTE_CHK"><![CDATA[ISDISCOUNTPRINTED IN ('Y', 'N')]]></check>
stefan@8505
   398
      <check name="C_INVOICE_ISPRINTED_CHECK"><![CDATA[ISPRINTED IN ('Y', 'N')]]></check>
stefan@8505
   399
      <check name="C_INVOICE_ISSOTRX_CHECK"><![CDATA[ISSOTRX IN ('Y', 'N')]]></check>
stefan@8505
   400
      <check name="C_INVOICE_ISTAXINCLUDED_CHECK"><![CDATA[ISTAXINCLUDED IN ('Y', 'N')]]></check>
stefan@8505
   401
      <check name="C_INVOICE_PROCESSED_CHECK"><![CDATA[PROCESSED IN ('Y', 'N')]]></check>
carlos@0
   402
    </table>
adrian@94
   403
  </database>