Commit | Line | Data |
---|---|---|
6a488035 | 1 | <?xml version="1.0" encoding="iso-8859-1" ?> |
3c7d2158 | 2 | |
3 | <table> | |
4 | <base>CRM/Financial</base> | |
5 | <class>OfficialReceipt</class> | |
6 | <name>civicrm_official_receipt</name> | |
7 | <add>4.1</add> | |
6a488035 | 8 | <log>true</log> |
3c7d2158 | 9 | <field> |
10 | <name>id</name> | |
11 | <type>int unsigned</type> | |
12 | <required>true</required> | |
13 | <comment>Receipt ID</comment> | |
14 | <add>4.1</add> | |
15 | </field> | |
16 | <primaryKey> | |
17 | <name>id</name> | |
18 | <autoincrement>true</autoincrement> | |
19 | </primaryKey> | |
20 | <field> | |
21 | <name>contact_id</name> | |
6a488035 TO |
22 | <uniqueName>receipt_contact_id</uniqueName> |
23 | <title>Contact ID</title> | |
3c7d2158 | 24 | <type>int unsigned</type> |
25 | <required>true</required> | |
6a488035 TO |
26 | <import>true</import> |
27 | <headerPattern>/contact(.?id)?/i</headerPattern> | |
28 | <dataPattern>/^\d+$/</dataPattern> | |
3c7d2158 | 29 | <comment>FK to Contact ID</comment> |
30 | <add>4.1</add> | |
31 | </field> | |
32 | <foreignKey> | |
33 | <name>contact_id</name> | |
34 | <table>civicrm_contact</table> | |
35 | <key>id</key> | |
36 | <add>4.1</add> | |
37 | </foreignKey> | |
38 | <field> | |
39 | <name>contact_snapshot</name> | |
6a488035 TO |
40 | <type>text</type> |
41 | <htmlType>textarea</htmlType> | |
42 | <rows>4</rows> | |
43 | <cols>80</cols> | |
3c7d2158 | 44 | <comment>Serialized array of contact info of payor at time receipt is created</comment> |
6a488035 TO |
45 | <add>4.1</add> |
46 | <writeOnce>true</writeOnce> | |
47 | </field> | |
3c7d2158 | 48 | <field> |
49 | <name>issued_date</name> | |
50 | <type>datetime</type> | |
51 | <required>true</required> | |
52 | <add>4.1</add> | |
6a488035 TO |
53 | </field> |
54 | <index> | |
55 | <name>UI_issued_date</name> | |
56 | <fieldName>issued_date</fieldName> | |
57 | <add>4.1</add> | |
58 | </index> | |
59 | <field> | |
3c7d2158 | 60 | <name>start_date</name> |
61 | <type>datetime</type> | |
62 | <required>true</required> | |
63 | <add>4.1</add> | |
6a488035 TO |
64 | </field> |
65 | <index> | |
66 | <name>UI_start_date</name> | |
67 | <fieldName>start_date</fieldName> | |
68 | <add>4.1</add> | |
69 | </index> | |
70 | <field> | |
3c7d2158 | 71 | <name>end_date</name> |
72 | <type>datetime</type> | |
73 | <required>true</required> | |
74 | <add>4.1</add> | |
6a488035 TO |
75 | </field> |
76 | <index> | |
77 | <name>UI_end_date</name> | |
78 | <fieldName>end_date</fieldName> | |
79 | <add>4.1</add> | |
80 | </index> | |
3c7d2158 | 81 | <field> |
82 | <name>receipt_status_id</name> | |
83 | <type>int unsigned</type> | |
84 | <required>true</required> | |
6a488035 TO |
85 | <add>4.1</add> |
86 | <comment>pseudo FK to civicrm_option_value</comment> | |
87 | </field> | |
88 | <index> | |
89 | <name>UI_receipt_status_id</name> | |
90 | <fieldName>receipt_status_id</fieldName> | |
91 | <add>4.1</add> | |
92 | </index> | |
3c7d2158 | 93 | <field> |
94 | <name>receipt_type_id</name> | |
95 | <type>int unsigned</type> | |
96 | <required>true</required> | |
6a488035 TO |
97 | <add>4.1</add> |
98 | <comment>pseudo FK to civicrm_option_value</comment> | |
3c7d2158 | 99 | </field> |
6a488035 TO |
100 | <index> |
101 | <name>UI_receipt_type_id</name> | |
102 | <fieldName>receipt_type_id</fieldName> | |
103 | <add>4.1</add> | |
104 | </index> | |
3c7d2158 | 105 | <field> |
106 | <name>total_amount</name> | |
107 | <type>decimal</type> | |
6a488035 TO |
108 | <required>true</required> |
109 | <comment>Total amount for this receipt.</comment> | |
3c7d2158 | 110 | <add>4.1</add> |
111 | </field> | |
112 | <field> | |
113 | <name>non_deductible_amount</name> | |
114 | <type>decimal</type> | |
6a488035 | 115 | <comment>Portion of total amount which is NOT tax deductible. Equal to total_amount for non-deductible financial types.</comment> |
3c7d2158 | 116 | <add>4.1</add> |
6a488035 TO |
117 | </field> |
118 | <field> | |
119 | <name>currency</name> | |
120 | <type>varchar</type> | |
121 | <length>3</length> | |
3c7d2158 | 122 | <default>NULL</default> |
6a488035 TO |
123 | <import>true</import> |
124 | <headerPattern>/cur(rency)?/i</headerPattern> | |
125 | <dataPattern>/^[A-Z]{3}$/</dataPattern> | |
126 | <comment>3 character string, value from config setting or input via user.</comment> | |
127 | <add>4.1</add> | |
bd44e0df AS |
128 | <pseudoconstant> |
129 | <table>civicrm_currency</table> | |
130 | <keyColumn>name</keyColumn> | |
a38a89fc CW |
131 | <labelColumn>full_name</labelColumn> |
132 | <nameColumn>numeric_code</nameColumn> | |
bd44e0df | 133 | </pseudoconstant> |
6a488035 | 134 | </field> |
3c7d2158 | 135 | <field> |
136 | <name>msg_template_id</name> | |
6a488035 | 137 | <type>int unsigned</type> |
3c7d2158 | 138 | <comment>template used to generate receipt</comment> |
6a488035 TO |
139 | <add>4.1</add> |
140 | </field> | |
3c7d2158 | 141 | <foreignKey> |
142 | <name>msg_template_id</name> | |
143 | <table>civicrm_msg_template</table> | |
6a488035 TO |
144 | <key>id</key> |
145 | <add>4.1</add> | |
146 | <onDelete>Set Null</onDelete> | |
3c7d2158 | 147 | </foreignKey> |
6a488035 TO |
148 | |
149 | </table> | |
150 |