src-db/database/model/tables/FIN_FINANCIAL_ACCOUNT_ACCT.xml
author David Miguelez <david.miguelez@openbravo.com>
Mon, 29 Apr 2013 13:47:02 +0200
changeset 20246 ad7168af39fc
parent 10045 a4a5eb93e111
child 20971 829a6eeb2e3f
permissions -rw-r--r--
Fixes Issue 15768. Executes trigger before deleting record.
eduardo@6832
     1
<?xml version="1.0"?>
eduardo@6832
     2
  <database name="TABLE FIN_FINANCIAL_ACCOUNT_ACCT">
eduardo@6832
     3
    <table name="FIN_FINANCIAL_ACCOUNT_ACCT" primaryKey="FIN_FINANCIAL_ACCOUNT_ACCT_KEY">
eduardo@6832
     4
      <column name="FIN_FINANCIAL_ACCOUNT_ACCT_ID" primaryKey="true" required="true" type="VARCHAR" size="32" autoIncrement="false">
eduardo@6832
     5
        <default/>
eduardo@6832
     6
        <onCreateDefault><![CDATA[get_uuid()]]></onCreateDefault>
eduardo@6832
     7
      </column>
eduardo@6832
     8
      <column name="FIN_FINANCIAL_ACCOUNT_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
eduardo@6832
     9
        <default/>
eduardo@6832
    10
        <onCreateDefault/>
eduardo@6832
    11
      </column>
eduardo@6832
    12
      <column name="C_ACCTSCHEMA_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
eduardo@6832
    13
        <default/>
eduardo@6832
    14
        <onCreateDefault/>
eduardo@6832
    15
      </column>
eduardo@6832
    16
      <column name="AD_CLIENT_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
eduardo@6832
    17
        <default/>
eduardo@6832
    18
        <onCreateDefault/>
eduardo@6832
    19
      </column>
eduardo@6832
    20
      <column name="AD_ORG_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
eduardo@6832
    21
        <default/>
eduardo@6832
    22
        <onCreateDefault/>
eduardo@6832
    23
      </column>
eduardo@6832
    24
      <column name="ISACTIVE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
eduardo@6832
    25
        <default><![CDATA[Y]]></default>
eduardo@6832
    26
        <onCreateDefault/>
eduardo@6832
    27
      </column>
eduardo@6832
    28
      <column name="CREATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
eduardo@6832
    29
        <default><![CDATA[SYSDATE]]></default>
eduardo@6832
    30
        <onCreateDefault/>
eduardo@6832
    31
      </column>
eduardo@6832
    32
      <column name="CREATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
eduardo@6832
    33
        <default/>
eduardo@6832
    34
        <onCreateDefault/>
eduardo@6832
    35
      </column>
eduardo@6832
    36
      <column name="UPDATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
eduardo@6832
    37
        <default><![CDATA[SYSDATE]]></default>
eduardo@6832
    38
        <onCreateDefault/>
eduardo@6832
    39
      </column>
eduardo@6832
    40
      <column name="UPDATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
eduardo@6832
    41
        <default/>
eduardo@6832
    42
        <onCreateDefault/>
eduardo@6832
    43
      </column>
eduardo@6832
    44
      <column name="FIN_RECEIVEPAYMENT_ACCT" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
eduardo@6832
    45
        <default/>
eduardo@6832
    46
        <onCreateDefault/>
eduardo@6832
    47
      </column>
eduardo@6832
    48
      <column name="FIN_MAKEPAYMENT_ACCT" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
eduardo@6832
    49
        <default/>
eduardo@6832
    50
        <onCreateDefault/>
eduardo@6832
    51
      </column>
eduardo@6832
    52
      <column name="FIN_DEPOSIT_ACCT" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
eduardo@6832
    53
        <default/>
eduardo@6832
    54
        <onCreateDefault/>
eduardo@6832
    55
      </column>
eduardo@6832
    56
      <column name="FIN_WITHDRAWAL_ACCT" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
eduardo@6832
    57
        <default/>
eduardo@6832
    58
        <onCreateDefault/>
eduardo@6832
    59
      </column>
eduardo@6832
    60
      <column name="FIN_DEBIT_ACCT" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
eduardo@6832
    61
        <default/>
eduardo@6832
    62
        <onCreateDefault/>
eduardo@6832
    63
      </column>
eduardo@6832
    64
      <column name="FIN_CREDIT_ACCT" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
eduardo@6832
    65
        <default/>
eduardo@6832
    66
        <onCreateDefault/>
eduardo@6832
    67
      </column>
eduardo@8543
    68
      <column name="FIN_BANKFEE_ACCT" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
gorkaion@6874
    69
        <default/>
gorkaion@6874
    70
        <onCreateDefault/>
gorkaion@6874
    71
      </column>
eduardo@8543
    72
      <column name="FIN_BANKREVALUATIONGAIN_ACCT" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
gorkaion@6874
    73
        <default/>
gorkaion@6874
    74
        <onCreateDefault/>
gorkaion@6874
    75
      </column>
eduardo@8543
    76
      <column name="FIN_BANKREVALUATIONLOSS_ACCT" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
gorkaion@6874
    77
        <default/>
gorkaion@6874
    78
        <onCreateDefault/>
gorkaion@6874
    79
      </column>
eduardo@7618
    80
      <column name="FIN_OUT_INTRANSIT_ACCT" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
eduardo@7618
    81
        <default/>
eduardo@7618
    82
        <onCreateDefault/>
eduardo@7618
    83
      </column>
eduardo@7618
    84
      <column name="FIN_OUT_CLEAR_ACCT" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
eduardo@7618
    85
        <default/>
eduardo@7618
    86
        <onCreateDefault/>
eduardo@7618
    87
      </column>
eduardo@7618
    88
      <column name="FIN_IN_INTRANSIT_ACCT" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
eduardo@7618
    89
        <default/>
eduardo@7618
    90
        <onCreateDefault/>
eduardo@7618
    91
      </column>
eduardo@7618
    92
      <column name="FIN_IN_CLEAR_ACCT" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
eduardo@7618
    93
        <default/>
eduardo@7618
    94
        <onCreateDefault/>
eduardo@7618
    95
      </column>
eduardo@9860
    96
      <column name="FIN_ASSET_ACCT" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
eduardo@9860
    97
        <default/>
eduardo@9860
    98
        <onCreateDefault/>
eduardo@9860
    99
      </column>
eduardo@9860
   100
      <column name="FIN_TRANSITORY_ACCT" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
eduardo@9860
   101
        <default/>
eduardo@9860
   102
        <onCreateDefault/>
eduardo@9860
   103
      </column>
eduardo@10045
   104
      <column name="ENABLEBANKSTATEMENT" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
eduardo@10045
   105
        <default><![CDATA[N]]></default>
eduardo@10045
   106
        <onCreateDefault/>
eduardo@10045
   107
      </column>
eduardo@6832
   108
      <foreign-key foreignTable="AD_CLIENT" name="FIN_FINACC_ACCT_AD_CLIENT">
eduardo@6832
   109
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
eduardo@6832
   110
      </foreign-key>
eduardo@6832
   111
      <foreign-key foreignTable="AD_ORG" name="FIN_FINACC_ACCT_AD_ORG">
eduardo@6832
   112
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
eduardo@6832
   113
      </foreign-key>
eduardo@9876
   114
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="FIN_FINACC_ACCT_ASSET">
eduardo@9876
   115
        <reference local="FIN_ASSET_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
eduardo@9876
   116
      </foreign-key>
gorkaion@6874
   117
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="FIN_FINACC_ACCT_BANKFEE">
gorkaion@6874
   118
        <reference local="FIN_BANKFEE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
gorkaion@6874
   119
      </foreign-key>
eduardo@6832
   120
      <foreign-key foreignTable="C_ACCTSCHEMA" name="FIN_FINACC_ACCT_C_ACCTSCHEM" onDelete="cascade">
eduardo@6832
   121
        <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
eduardo@6832
   122
      </foreign-key>
eduardo@6832
   123
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="FIN_FINACC_ACCT_CREDIT">
eduardo@6832
   124
        <reference local="FIN_CREDIT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
eduardo@6832
   125
      </foreign-key>
eduardo@6832
   126
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="FIN_FINACC_ACCT_DEBIT">
eduardo@6832
   127
        <reference local="FIN_DEBIT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
eduardo@6832
   128
      </foreign-key>
eduardo@6832
   129
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="FIN_FINACC_ACCT_DEPOSIT">
eduardo@6832
   130
        <reference local="FIN_DEPOSIT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
eduardo@6832
   131
      </foreign-key>
eduardo@6832
   132
      <foreign-key foreignTable="FIN_FINANCIAL_ACCOUNT" name="FIN_FINACC_ACCT_FINACC">
eduardo@6832
   133
        <reference local="FIN_FINANCIAL_ACCOUNT_ID" foreign="FIN_FINANCIAL_ACCOUNT_ID"/>
eduardo@6832
   134
      </foreign-key>
eduardo@7618
   135
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="FIN_FINACC_ACCT_INCLEAR">
eduardo@7618
   136
        <reference local="FIN_IN_CLEAR_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
eduardo@7618
   137
      </foreign-key>
eduardo@7618
   138
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="FIN_FINACC_ACCT_ININTRANSIT">
eduardo@7618
   139
        <reference local="FIN_IN_INTRANSIT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
eduardo@7618
   140
      </foreign-key>
eduardo@6832
   141
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="FIN_FINACC_ACCT_MAKEPAYMENT">
eduardo@6832
   142
        <reference local="FIN_MAKEPAYMENT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
eduardo@6832
   143
      </foreign-key>
eduardo@7618
   144
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="FIN_FINACC_ACCT_OUTCLEAR">
eduardo@7618
   145
        <reference local="FIN_OUT_CLEAR_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
eduardo@7618
   146
      </foreign-key>
eduardo@7618
   147
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="FIN_FINACC_ACCT_OUTINTRANSIT">
eduardo@7618
   148
        <reference local="FIN_OUT_INTRANSIT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
eduardo@7618
   149
      </foreign-key>
eduardo@6832
   150
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="FIN_FINACC_ACCT_RECEIVEPAYMENT">
eduardo@6832
   151
        <reference local="FIN_RECEIVEPAYMENT_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
eduardo@6832
   152
      </foreign-key>
gorkaion@6874
   153
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="FIN_FINACC_ACCT_REVALGAIN">
gorkaion@6874
   154
        <reference local="FIN_BANKREVALUATIONGAIN_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
gorkaion@6874
   155
      </foreign-key>
gorkaion@6874
   156
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="FIN_FINACC_ACCT_REVALLOSS">
gorkaion@6874
   157
        <reference local="FIN_BANKREVALUATIONLOSS_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
gorkaion@6874
   158
      </foreign-key>
eduardo@9876
   159
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="FIN_FINACC_ACCT_TRANSITORY">
eduardo@9876
   160
        <reference local="FIN_TRANSITORY_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
eduardo@9876
   161
      </foreign-key>
eduardo@6832
   162
      <foreign-key foreignTable="C_VALIDCOMBINATION" name="FIN_FINACC_ACCT_WITHDRAWAL">
eduardo@6832
   163
        <reference local="FIN_WITHDRAWAL_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
eduardo@6832
   164
      </foreign-key>
eduardo@6832
   165
      <unique name="FIN_FINACC_ACCT_ACCTSCHEMA_UN">
eduardo@6832
   166
        <unique-column name="FIN_FINANCIAL_ACCOUNT_ID"/>
eduardo@6832
   167
        <unique-column name="C_ACCTSCHEMA_ID"/>
eduardo@6832
   168
      </unique>
eduardo@10045
   169
      <check name="FIN_FINACC_ACCT_BSCONFIG_CHECK"><![CDATA[(((ENABLEBANKSTATEMENT = 'Y') AND (FIN_TRANSITORY_ACCT IS NOT NULL)) AND (FIN_ASSET_ACCT IS NOT NULL)) OR (ENABLEBANKSTATEMENT <> 'Y')]]></check>
eduardo@10045
   170
      <check name="FIN_FINACC_ACCT_ENABLEBS_CHECK"><![CDATA[ENABLEBANKSTATEMENT IN ('Y', 'N')]]></check>
stefan@8505
   171
      <check name="FIN_FINACC_ACCT_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
eduardo@6832
   172
    </table>
eduardo@6832
   173
  </database>