Annotate generated files with the source filename
[civicrm-core.git] / xml / schema / Financial / OfficialReceipt.xml
CommitLineData
6a488035
TO
1<?xml version="1.0" encoding="iso-8859-1" ?>
2
3<table>
4 <base>CRM/Financial</base>
5 <class>OfficialReceipt</class>
6 <name>civicrm_official_receipt</name>
7 <add>4.1</add>
8 <log>true</log>
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>
22 <uniqueName>receipt_contact_id</uniqueName>
23 <title>Contact ID</title>
24 <type>int unsigned</type>
25 <required>true</required>
26 <import>true</import>
27 <headerPattern>/contact(.?id)?/i</headerPattern>
28 <dataPattern>/^\d+$/</dataPattern>
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>
40 <type>text</type>
41 <htmlType>textarea</htmlType>
42 <rows>4</rows>
43 <cols>80</cols>
44 <comment>Serialized array of contact info of payor at time receipt is created</comment>
45 <add>4.1</add>
46 <writeOnce>true</writeOnce>
47 </field>
48 <field>
49 <name>issued_date</name>
50 <type>datetime</type>
51 <required>true</required>
52 <add>4.1</add>
53 </field>
54 <index>
55 <name>UI_issued_date</name>
56 <fieldName>issued_date</fieldName>
57 <add>4.1</add>
58 </index>
59 <field>
60 <name>start_date</name>
61 <type>datetime</type>
62 <required>true</required>
63 <add>4.1</add>
64 </field>
65 <index>
66 <name>UI_start_date</name>
67 <fieldName>start_date</fieldName>
68 <add>4.1</add>
69 </index>
70 <field>
71 <name>end_date</name>
72 <type>datetime</type>
73 <required>true</required>
74 <add>4.1</add>
75 </field>
76 <index>
77 <name>UI_end_date</name>
78 <fieldName>end_date</fieldName>
79 <add>4.1</add>
80 </index>
81 <field>
82 <name>receipt_status_id</name>
83 <type>int unsigned</type>
84 <required>true</required>
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>
93 <field>
94 <name>receipt_type_id</name>
95 <type>int unsigned</type>
96 <required>true</required>
97 <add>4.1</add>
98 <comment>pseudo FK to civicrm_option_value</comment>
99 </field>
100 <index>
101 <name>UI_receipt_type_id</name>
102 <fieldName>receipt_type_id</fieldName>
103 <add>4.1</add>
104 </index>
105 <field>
106 <name>total_amount</name>
107 <type>decimal</type>
108 <required>true</required>
109 <comment>Total amount for this receipt.</comment>
110 <add>4.1</add>
111 </field>
112 <field>
113 <name>non_deductible_amount</name>
114 <type>decimal</type>
115 <comment>Portion of total amount which is NOT tax deductible. Equal to total_amount for non-deductible financial types.</comment>
116 <add>4.1</add>
117 </field>
118 <field>
119 <name>currency</name>
120 <type>varchar</type>
121 <length>3</length>
122 <default>NULL</default>
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>
128 </field>
129 <field>
130 <name>msg_template_id</name>
131 <type>int unsigned</type>
132 <comment>template used to generate receipt</comment>
133 <add>4.1</add>
134 </field>
135 <foreignKey>
136 <name>msg_template_id</name>
137 <table>civicrm_msg_template</table>
138 <key>id</key>
139 <add>4.1</add>
140 <onDelete>Set Null</onDelete>
141 </foreignKey>
142
143</table>
144