Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?xml version="1.0" encoding="iso-8859-1" ?> |
2 | ||
3 | <table> | |
4 | <base>CRM/Financial</base> | |
5 | <class>FinancialTrxn</class> | |
6 | <name>civicrm_financial_trxn</name> | |
7 | <add>1.3</add> | |
8 | <log>true</log> | |
9 | <field> | |
10 | <name>id</name> | |
11 | <type>int unsigned</type> | |
12 | <required>true</required> | |
13 | <add>1.3</add> | |
14 | </field> | |
15 | <primaryKey> | |
16 | <name>id</name> | |
17 | <autoincrement>true</autoincrement> | |
18 | </primaryKey> | |
19 | <field> | |
20 | <name>from_account_id</name> | |
21 | <type>int unsigned</type> | |
22 | <comment>FK to financial_account table.</comment> | |
23 | <add>3.2</add> | |
24 | <drop>4.3</drop> | |
25 | </field> | |
26 | <foreignKey> | |
27 | <name>from_account_id</name> | |
28 | <table>civicrm_financial_account</table> | |
29 | <key>id</key> | |
30 | <add>3.2</add> | |
31 | <drop>4.3</drop> | |
32 | </foreignKey> | |
33 | <field> | |
34 | <name>to_account_id</name> | |
35 | <type>int unsigned</type> | |
36 | <comment>FK to financial_account table.</comment> | |
37 | <add>3.2</add> | |
38 | <drop>4.3</drop> | |
39 | </field> | |
40 | <foreignKey> | |
41 | <name>to_account_id</name> | |
42 | <table>civicrm_financial_account</table> | |
43 | <key>id</key> | |
44 | <add>3.2</add> | |
45 | <drop>4.3</drop> | |
46 | </foreignKey> | |
47 | <field> | |
48 | <name>from_financial_account_id</name> | |
49 | <type>int unsigned</type> | |
50 | <comment>FK to financial_account table.</comment> | |
51 | <add>4.3</add> | |
52 | </field> | |
53 | <foreignKey> | |
54 | <name>from_financial_account_id</name> | |
55 | <table>civicrm_financial_account</table> | |
56 | <key>id</key> | |
57 | <add>4.3</add> | |
58 | </foreignKey> | |
59 | <field> | |
60 | <name>to_financial_account_id</name> | |
61 | <type>int unsigned</type> | |
62 | <comment>FK to financial_financial_account table.</comment> | |
63 | <add>4.3</add> | |
64 | </field> | |
65 | <foreignKey> | |
66 | <name>to_financial_account_id</name> | |
67 | <table>civicrm_financial_account</table> | |
68 | <key>id</key> | |
69 | <add>4.3</add> | |
70 | </foreignKey> | |
71 | <field> | |
72 | <name>trxn_date</name> | |
73 | <type>datetime</type> | |
74 | <default>NULL</default> | |
75 | <comment>date transaction occurred</comment> | |
76 | <add>1.3</add> | |
77 | </field> | |
78 | <field> | |
79 | <name>trxn_type</name> | |
80 | <type>enum</type> | |
81 | <values>Debit,Credit</values> | |
82 | <required>true</required> | |
83 | <add>1.3</add> | |
84 | <drop>4.3</drop> | |
85 | </field> | |
86 | <field> | |
87 | <name>total_amount</name> | |
88 | <type>decimal</type> | |
89 | <required>true</required> | |
90 | <comment>amount of transaction</comment> | |
91 | <add>1.3</add> | |
92 | </field> | |
93 | <field> | |
94 | <name>fee_amount</name> | |
95 | <type>decimal</type> | |
96 | <comment>actual processor fee if known - may be 0.</comment> | |
97 | <add>1.3</add> | |
98 | </field> | |
99 | <field> | |
100 | <name>net_amount</name> | |
101 | <type>decimal</type> | |
102 | <comment>actual funds transfer amount. total less fees. if processor does not report actual fee during transaction, this is set to total_amount.</comment> | |
103 | <add>1.3</add> | |
104 | </field> | |
105 | <field> | |
106 | <name>currency</name> | |
107 | <type>varchar</type> | |
108 | <length>3</length> | |
109 | <default>NULL</default> | |
110 | <import>true</import> | |
111 | <headerPattern>/cur(rency)?/i</headerPattern> | |
112 | <dataPattern>/^[A-Z]{3}$/</dataPattern> | |
113 | <comment>3 character string, value from config setting or input via user.</comment> | |
114 | <add>1.3</add> | |
115 | </field> | |
116 | <field> | |
117 | <name>payment_processor</name> | |
118 | <type>varchar</type> | |
119 | <length>64</length> | |
120 | <required>true</required> | |
121 | <comment>derived from Processor setting in civicrm.settings.php.</comment> | |
122 | <add>1.3</add> | |
123 | <drop>4.3</drop> | |
124 | </field> | |
125 | <field> | |
126 | <name>trxn_id</name> | |
127 | <type>varchar</type> | |
128 | <length>255</length> | |
129 | <comment>user-specified unique processor transaction id, bank id + trans id,... depending on payment_method</comment> | |
130 | <add>1.3</add> | |
131 | </field> | |
132 | <field> | |
133 | <name>trxn_result_code</name> | |
134 | <type>varchar</type> | |
135 | <length>255</length> | |
136 | <comment>processor result code</comment> | |
137 | <add>1.3</add> | |
138 | </field> | |
139 | <field> | |
140 | <name>status_id</name> | |
141 | <title>Financial Transaction Status Id</title> | |
142 | <type>int unsigned</type> | |
143 | <import>true</import> | |
144 | <export>true</export> | |
145 | <comment>pseudo FK to civicrm_option_value of financial_item status option_group</comment> | |
146 | <headerPattern>/status/i</headerPattern> | |
147 | <add>4.3</add> | |
148 | </field> | |
149 | <field> | |
150 | <name>payment_processor_id</name> | |
151 | <type>int unsigned</type> | |
152 | <comment>Payment Processor for this financial transaction</comment> | |
153 | <add>4.3</add> | |
154 | </field> | |
155 | <foreignKey> | |
156 | <name>payment_processor_id</name> | |
157 | <table>civicrm_payment_processor</table> | |
158 | <key>id</key> | |
159 | <onDelete>SET NULL</onDelete> | |
160 | <add>4.3</add> | |
161 | </foreignKey> | |
162 | <field> | |
163 | <name>payment_instrument_id</name> | |
164 | <uniqueName>financial_trxn_payment_instrument_id</uniqueName> | |
165 | <title>Payment Instrument</title> | |
166 | <type>int unsigned</type> | |
167 | <comment>FK to payment_instrument option group values</comment> | |
168 | <pseudoconstant> | |
169 | <name>paymentInstrument</name> | |
170 | <optionGroupName>paymentInstrument</optionGroupName> | |
171 | <class>CRM_Contribute_PseudoConstant</class> | |
172 | </pseudoconstant> | |
173 | <add>4.3</add> | |
174 | </field> | |
175 | <index> | |
176 | <name>UI_ftrxn_payment_instrument_id</name> | |
177 | <fieldName>payment_instrument_id</fieldName> | |
178 | <add>4.3</add> | |
179 | </index> | |
180 | <field> | |
181 | <name>check_number</name> | |
182 | <uniqueName>financial_trxn_check_number</uniqueName> | |
183 | <title>Check Number</title> | |
184 | <comment>Check number</comment> | |
185 | <type>varchar</type> | |
186 | <length>255</length> | |
187 | <size>SIX</size> | |
188 | <add>4.3</add> | |
189 | </field> | |
190 | <index> | |
191 | <name>UI_ftrxn_check_number</name> | |
192 | <fieldName>check_number</fieldName> | |
193 | <add>4.3</add> | |
194 | </index> | |
195 | </table> | |
196 |