src-db/database/model/tables/GL_JOURNALLINE.xml
author David Miguelez <david.miguelez@openbravo.com>
Tue, 22 Jan 2013 18:51:23 +0100
changeset 19404 cf2de0fafe31
parent 19402 a71939e3dcc8
child 20967 3993ddeadfe3
permissions -rw-r--r--
Related to Issue 22782. Code Review changes.
carlos@0
     1
<?xml version="1.0"?>
adrian@94
     2
  <database name="TABLE GL_JOURNALLINE">
carlos@0
     3
    <table name="GL_JOURNALLINE" primaryKey="GL_JOURNALENTRY_KEY">
juanpablo@1605
     4
      <column name="GL_JOURNALLINE_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="GL_JOURNAL_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>
antonio@735
    44
      <column name="ISGENERATED" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
antonio@735
    45
        <default><![CDATA[N]]></default>
antonio@735
    46
        <onCreateDefault/>
antonio@735
    47
      </column>
antonio@735
    48
      <column name="DESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false">
antonio@735
    49
        <default/>
antonio@735
    50
        <onCreateDefault/>
antonio@735
    51
      </column>
antonio@735
    52
      <column name="AMTSOURCEDR" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
antonio@735
    53
        <default><![CDATA[0]]></default>
antonio@735
    54
        <onCreateDefault/>
antonio@735
    55
      </column>
antonio@735
    56
      <column name="AMTSOURCECR" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
antonio@735
    57
        <default><![CDATA[0]]></default>
antonio@735
    58
        <onCreateDefault/>
antonio@735
    59
      </column>
juanpablo@1605
    60
      <column name="C_CURRENCY_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    61
        <default/>
antonio@735
    62
        <onCreateDefault/>
antonio@735
    63
      </column>
asier@2586
    64
      <column name="CURRENCYRATETYPE" primaryKey="false" required="true" type="VARCHAR" size="60" autoIncrement="false">
antonio@735
    65
        <default/>
antonio@735
    66
        <onCreateDefault/>
antonio@735
    67
      </column>
antonio@735
    68
      <column name="CURRENCYRATE" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
antonio@735
    69
        <default><![CDATA[0]]></default>
antonio@735
    70
        <onCreateDefault/>
antonio@735
    71
      </column>
ainhoa@11319
    72
      <column name="DATEACCT" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false">
antonio@735
    73
        <default/>
antonio@735
    74
        <onCreateDefault/>
antonio@735
    75
      </column>
antonio@735
    76
      <column name="AMTACCTDR" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
antonio@735
    77
        <default><![CDATA[0]]></default>
antonio@735
    78
        <onCreateDefault/>
antonio@735
    79
      </column>
antonio@735
    80
      <column name="AMTACCTCR" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
antonio@735
    81
        <default><![CDATA[0]]></default>
antonio@735
    82
        <onCreateDefault/>
antonio@735
    83
      </column>
juanpablo@1605
    84
      <column name="C_UOM_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="QTY" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
antonio@735
    89
        <default><![CDATA[0]]></default>
antonio@735
    90
        <onCreateDefault/>
antonio@735
    91
      </column>
juanpablo@1605
    92
      <column name="C_VALIDCOMBINATION_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    93
        <default/>
antonio@735
    94
        <onCreateDefault/>
antonio@735
    95
      </column>
juanpablo@1605
    96
      <column name="C_DEBT_PAYMENT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    97
        <default/>
antonio@735
    98
        <onCreateDefault/>
antonio@735
    99
      </column>
eduardo@4098
   100
      <column name="C_WITHHOLDING_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
eduardo@4098
   101
        <default/>
eduardo@4098
   102
        <onCreateDefault/>
eduardo@4098
   103
      </column>
eduardo@4098
   104
      <column name="C_TAX_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
eduardo@4098
   105
        <default/>
eduardo@4098
   106
        <onCreateDefault/>
eduardo@4098
   107
      </column>
gorkaion@13162
   108
      <column name="USER1_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
gorkaion@13162
   109
        <default/>
gorkaion@13162
   110
        <onCreateDefault/>
gorkaion@13162
   111
      </column>
gorkaion@13162
   112
      <column name="USER2_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
gorkaion@13162
   113
        <default/>
gorkaion@13162
   114
        <onCreateDefault/>
gorkaion@13162
   115
      </column>
gorkaion@13162
   116
      <column name="C_CAMPAIGN_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
gorkaion@13162
   117
        <default/>
gorkaion@13162
   118
        <onCreateDefault/>
gorkaion@13162
   119
      </column>
gorkaion@13162
   120
      <column name="C_PROJECT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
gorkaion@13162
   121
        <default/>
gorkaion@13162
   122
        <onCreateDefault/>
gorkaion@13162
   123
      </column>
gorkaion@13162
   124
      <column name="C_ACTIVITY_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
gorkaion@13162
   125
        <default/>
gorkaion@13162
   126
        <onCreateDefault/>
gorkaion@13162
   127
      </column>
gorkaion@13162
   128
      <column name="C_SALESREGION_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
gorkaion@13162
   129
        <default/>
gorkaion@13162
   130
        <onCreateDefault/>
gorkaion@13162
   131
      </column>
gorkaion@13162
   132
      <column name="M_PRODUCT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
gorkaion@13162
   133
        <default/>
gorkaion@13162
   134
        <onCreateDefault/>
gorkaion@13162
   135
      </column>
gorkaion@13162
   136
      <column name="C_BPARTNER_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
gorkaion@13162
   137
        <default/>
gorkaion@13162
   138
        <onCreateDefault/>
gorkaion@13162
   139
      </column>
sandra@18873
   140
      <column name="A_ASSET_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
sandra@18873
   141
        <default/>
sandra@18873
   142
        <onCreateDefault/>
sandra@18873
   143
      </column>
sandra@18873
   144
      <column name="C_COSTCENTER_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
sandra@18873
   145
        <default/>
sandra@18873
   146
        <onCreateDefault/>
sandra@18873
   147
      </column>
david@18902
   148
      <column name="FIN_PAYMENT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
david@18902
   149
        <default/>
david@18902
   150
        <onCreateDefault/>
david@18902
   151
      </column>
david@18908
   152
      <column name="FIN_FINANCIAL_ACCOUNT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
david@18908
   153
        <default/>
david@18908
   154
        <onCreateDefault/>
david@18908
   155
      </column>
david@18908
   156
      <column name="FIN_PAYMENTMETHOD_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
david@18908
   157
        <default/>
david@18908
   158
        <onCreateDefault/>
david@18908
   159
      </column>
david@18908
   160
      <column name="OPEN_ITEMS" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
david@18908
   161
        <default><![CDATA[N]]></default>
david@18908
   162
        <onCreateDefault/>
david@18908
   163
      </column>
david@18908
   164
      <column name="C_GLITEM_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
david@18908
   165
        <default/>
david@18908
   166
        <onCreateDefault/>
david@18908
   167
      </column>
david@19013
   168
      <column name="PAYMENTDATE" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false">
david@19013
   169
        <default/>
david@19013
   170
        <onCreateDefault/>
david@19013
   171
      </column>
sandra@18873
   172
      <foreign-key foreignTable="A_ASSET" name="GL_JOURNALLINE_A_ASSET">
sandra@18873
   173
        <reference local="A_ASSET_ID" foreign="A_ASSET_ID"/>
sandra@18873
   174
      </foreign-key>
asier@5551
   175
      <foreign-key foreignTable="AD_CLIENT" name="GL_JOURNALLINE_AD_CLIENT">
carlos@0
   176
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
carlos@0
   177
      </foreign-key>
asier@5551
   178
      <foreign-key foreignTable="AD_ORG" name="GL_JOURNALLINE_AD_ORG">
carlos@0
   179
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
carlos@0
   180
      </foreign-key>
gorkaion@13162
   181
      <foreign-key foreignTable="C_ACTIVITY" name="GL_JOURNALLINE_C_ACTIVITY">
gorkaion@13162
   182
        <reference local="C_ACTIVITY_ID" foreign="C_ACTIVITY_ID"/>
gorkaion@13162
   183
      </foreign-key>
gorkaion@13162
   184
      <foreign-key foreignTable="C_BPARTNER" name="GL_JOURNALLINE_C_BPARTNER">
gorkaion@13162
   185
        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
gorkaion@13162
   186
      </foreign-key>
gorkaion@13162
   187
      <foreign-key foreignTable="C_CAMPAIGN" name="GL_JOURNALLINE_C_CAMPAIGN">
gorkaion@13162
   188
        <reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
gorkaion@13162
   189
      </foreign-key>
sandra@18873
   190
      <foreign-key foreignTable="C_COSTCENTER" name="GL_JOURNALLINE_C_COSTCENTER">
sandra@18873
   191
        <reference local="C_COSTCENTER_ID" foreign="C_COSTCENTER_ID"/>
sandra@18873
   192
      </foreign-key>
asier@5551
   193
      <foreign-key foreignTable="C_CURRENCY" name="GL_JOURNALLINE_C_CURRENCY">
carlos@0
   194
        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
carlos@0
   195
      </foreign-key>
asier@5551
   196
      <foreign-key foreignTable="C_DEBT_PAYMENT" name="GL_JOURNALLINE_C_DEBT_PAYMENT">
carlos@0
   197
        <reference local="C_DEBT_PAYMENT_ID" foreign="C_DEBT_PAYMENT_ID"/>
carlos@0
   198
      </foreign-key>
david@18908
   199
      <foreign-key foreignTable="C_GLITEM" name="GL_JOURNALLINE_C_GLITEM">
david@18908
   200
        <reference local="C_GLITEM_ID" foreign="C_GLITEM_ID"/>
david@18908
   201
      </foreign-key>
gorkaion@13162
   202
      <foreign-key foreignTable="C_PROJECT" name="GL_JOURNALLINE_C_PROJECT">
gorkaion@13162
   203
        <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
gorkaion@13162
   204
      </foreign-key>
gorkaion@13162
   205
      <foreign-key foreignTable="C_SALESREGION" name="GL_JOURNALLINE_C_SALESREGION">
gorkaion@13162
   206
        <reference local="C_SALESREGION_ID" foreign="C_SALESREGION_ID"/>
gorkaion@13162
   207
      </foreign-key>
asier@5551
   208
      <foreign-key foreignTable="C_TAX" name="GL_JOURNALLINE_C_TAX">
eduardo@4098
   209
        <reference local="C_TAX_ID" foreign="C_TAX_ID"/>
eduardo@4098
   210
      </foreign-key>
asier@5551
   211
      <foreign-key foreignTable="C_UOM" name="GL_JOURNALLINE_C_UOM">
carlos@0
   212
        <reference local="C_UOM_ID" foreign="C_UOM_ID"/>
carlos@0
   213
      </foreign-key>
asier@5551
   214
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="GL_JOURNALLINE_C_VALIDCOMBINAT">
carlos@0
   215
        <reference local="C_VALIDCOMBINATION_ID" foreign="C_VALIDCOMBINATION_ID"/>
carlos@0
   216
      </foreign-key>
asier@5551
   217
      <foreign-key foreignTable="C_WITHHOLDING" name="GL_JOURNALLINE_C_WITHHOLDING">
eduardo@4098
   218
        <reference local="C_WITHHOLDING_ID" foreign="C_WITHHOLDING_ID"/>
eduardo@4098
   219
      </foreign-key>
eduardo@18987
   220
      <foreign-key foreignTable="FIN_FINANCIAL_ACCOUNT" name="GL_JOURNALLINE_FINACC">
david@18908
   221
        <reference local="FIN_FINANCIAL_ACCOUNT_ID" foreign="FIN_FINANCIAL_ACCOUNT_ID"/>
david@18908
   222
      </foreign-key>
asier@5551
   223
      <foreign-key foreignTable="GL_JOURNAL" name="GL_JOURNALLINE_GL_JOURNAL">
carlos@0
   224
        <reference local="GL_JOURNAL_ID" foreign="GL_JOURNAL_ID"/>
carlos@0
   225
      </foreign-key>
gorkaion@13162
   226
      <foreign-key foreignTable="M_PRODUCT" name="GL_JOURNALLINE_M_PRODUCT">
gorkaion@13162
   227
        <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
gorkaion@13162
   228
      </foreign-key>
david@18902
   229
      <foreign-key foreignTable="FIN_PAYMENT" name="GL_JOURNALLINE_PAYMENT" onDelete="setnull">
david@18902
   230
        <reference local="FIN_PAYMENT_ID" foreign="FIN_PAYMENT_ID"/>
david@18902
   231
      </foreign-key>
eduardo@18987
   232
      <foreign-key foreignTable="FIN_PAYMENTMETHOD" name="GL_JOURNALLINE_PAYMETHOD">
david@18908
   233
        <reference local="FIN_PAYMENTMETHOD_ID" foreign="FIN_PAYMENTMETHOD_ID"/>
david@18908
   234
      </foreign-key>
eduardo@18847
   235
      <foreign-key foreignTable="USER1" name="GL_JOURNALLINE_USER1">
eduardo@18847
   236
        <reference local="USER1_ID" foreign="USER1_ID"/>
eduardo@18845
   237
      </foreign-key>
eduardo@18848
   238
      <foreign-key foreignTable="USER2" name="GL_JOURNALLINE_USER2">
eduardo@18848
   239
        <reference local="USER2_ID" foreign="USER2_ID"/>
eduardo@18845
   240
      </foreign-key>
stefan@8505
   241
      <check name="GL_JOURNALLINE_C_TAX_ID_CHK"><![CDATA[(C_TAX_ID IS NULL) OR (C_WITHHOLDING_ID IS NULL)]]></check>
stefan@8505
   242
      <check name="GL_JOURNALLINE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
stefan@8505
   243
      <check name="GL_JOURNALLINE_ISGENERATED_CHK"><![CDATA[ISGENERATED IN ('Y', 'N')]]></check>
david@19404
   244
      <check name="GL_JOURNALLINE_OPENITEM_CHECK"><![CDATA[(OPEN_ITEMS = 'N') OR (((((OPEN_ITEMS = 'Y') AND (FIN_FINANCIAL_ACCOUNT_ID IS NOT NULL)) AND (FIN_PAYMENTMETHOD_ID IS NOT NULL)) AND (C_GLITEM_ID IS NOT NULL)) AND (PAYMENTDATE IS NOT NULL))]]></check>
carlos@0
   245
    </table>
adrian@94
   246
  </database>