| 1 | <?xml version="1.0" encoding="iso-8859-1" ?> |
| 2 | |
| 3 | <table> |
| 4 | <base>CRM/Financial</base> |
| 5 | <class>FinancialAccount</class> |
| 6 | <name>civicrm_financial_account</name> |
| 7 | <add>3.2</add> |
| 8 | <log>true</log> |
| 9 | <field> |
| 10 | <name>id</name> |
| 11 | <title>Financial Account ID</title> |
| 12 | <type>int unsigned</type> |
| 13 | <required>true</required> |
| 14 | <comment>ID</comment> |
| 15 | <add>3.2</add> |
| 16 | </field> |
| 17 | <primaryKey> |
| 18 | <name>id</name> |
| 19 | <autoincrement>true</autoincrement> |
| 20 | </primaryKey> |
| 21 | <field> |
| 22 | <name>name</name> |
| 23 | <title>Financial Account Name</title> |
| 24 | <type>varchar</type> |
| 25 | <length>255</length> |
| 26 | <required>true</required> |
| 27 | <comment>Financial Account Name.</comment> |
| 28 | <add>3.2</add> |
| 29 | </field> |
| 30 | <field> |
| 31 | <name>contact_id</name> |
| 32 | <uniqueName>financial_account_contact_id</uniqueName> |
| 33 | <title>Contact ID</title> |
| 34 | <type>int unsigned</type> |
| 35 | <comment>FK to Contact ID that is responsible for the funds in this account</comment> |
| 36 | <add>4.3</add> |
| 37 | </field> |
| 38 | <foreignKey> |
| 39 | <name>contact_id</name> |
| 40 | <table>civicrm_contact</table> |
| 41 | <key>id</key> |
| 42 | <add>4.3</add> |
| 43 | <onDelete>SET NULL</onDelete> |
| 44 | </foreignKey> |
| 45 | <field> |
| 46 | <name>account_type_id</name> |
| 47 | <type>int unsigned</type> |
| 48 | <required>true</required> |
| 49 | <add>3.2</add> |
| 50 | <drop>4.3</drop> |
| 51 | </field> |
| 52 | <field> |
| 53 | <name>financial_account_type_id</name> |
| 54 | <type>int unsigned</type> |
| 55 | <title>Financial Account Type</title> |
| 56 | <required>true</required> |
| 57 | <default>3</default> |
| 58 | <add>4.3</add> |
| 59 | <comment>pseudo FK into civicrm_option_value.</comment> |
| 60 | <pseudoconstant> |
| 61 | <optionGroupName>financial_account_type</optionGroupName> |
| 62 | </pseudoconstant> |
| 63 | <html> |
| 64 | <type>Select</type> |
| 65 | </html> |
| 66 | </field> |
| 67 | <field> |
| 68 | <name>accounting_code</name> |
| 69 | <title>Accounting Code</title> |
| 70 | <type>varchar</type> |
| 71 | <length>64</length> |
| 72 | <export>true</export> |
| 73 | <comment>Optional value for mapping monies owed and received to accounting system codes.</comment> |
| 74 | <add>4.3</add> |
| 75 | </field> |
| 76 | <field> |
| 77 | <name>account_type_code</name> |
| 78 | <title>Account Type Code</title> |
| 79 | <type>varchar</type> |
| 80 | <length>64</length> |
| 81 | <export>true</export> |
| 82 | <comment>Optional value for mapping account types to accounting system account categories (QuickBooks Account Type Codes for example).</comment> |
| 83 | <add>4.3</add> |
| 84 | </field> |
| 85 | <field> |
| 86 | <name>description</name> |
| 87 | <type>varchar</type> |
| 88 | <title>Financial Account Description</title> |
| 89 | <length>255</length> |
| 90 | <comment>Financial Type Description.</comment> |
| 91 | <add>4.3</add> |
| 92 | </field> |
| 93 | <field> |
| 94 | <name>parent_id</name> |
| 95 | <type>int unsigned</type> |
| 96 | <title>Financial Account Parent</title> |
| 97 | <comment>Parent ID in account hierarchy</comment> |
| 98 | <add>4.3</add> |
| 99 | </field> |
| 100 | <foreignKey> |
| 101 | <name>parent_id</name> |
| 102 | <table>civicrm_financial_account</table> |
| 103 | <key>id</key> |
| 104 | <add>4.3</add> |
| 105 | </foreignKey> |
| 106 | <field> |
| 107 | <name>is_header_account</name> |
| 108 | <type>boolean</type> |
| 109 | <title>Header Financial Account?</title> |
| 110 | <default>0</default> |
| 111 | <comment>Is this a header account which does not allow transactions to be posted against it directly, but only to its sub-accounts?</comment> |
| 112 | <add>4.3</add> |
| 113 | </field> |
| 114 | <field> |
| 115 | <name>is_deductible</name> |
| 116 | <type>boolean</type> |
| 117 | <title>Deductible Financial Account?</title> |
| 118 | <default>1</default> |
| 119 | <comment>Is this account tax-deductible?</comment> |
| 120 | <add>4.3</add> |
| 121 | </field> |
| 122 | <field> |
| 123 | <name>is_tax</name> |
| 124 | <type>boolean</type> |
| 125 | <title>Tax Financial Account?</title> |
| 126 | <default>0</default> |
| 127 | <comment>Is this account for taxes?</comment> |
| 128 | <add>4.3</add> |
| 129 | </field> |
| 130 | <field> |
| 131 | <name>tax_rate</name> |
| 132 | <type>decimal</type> |
| 133 | <title>Financial Account Tax Rate</title> |
| 134 | <length>10,8</length> |
| 135 | <comment>The percentage of the total_amount that is due for this tax.</comment> |
| 136 | <add>4.3</add> |
| 137 | </field> |
| 138 | <field> |
| 139 | <name>is_reserved</name> |
| 140 | <type>boolean</type> |
| 141 | <title>Reserved Financial Account?</title> |
| 142 | <comment>Is this a predefined system object?</comment> |
| 143 | <add>4.3</add> |
| 144 | </field> |
| 145 | <field> |
| 146 | <name>is_active</name> |
| 147 | <type>boolean</type> |
| 148 | <title>Financial Account is Active</title> |
| 149 | <comment>Is this property active?</comment> |
| 150 | <add>4.3</add> |
| 151 | </field> |
| 152 | <field> |
| 153 | <name>is_default</name> |
| 154 | <type>boolean</type> |
| 155 | <title>Default Financial Account</title> |
| 156 | <comment>Is this account the default one (or default tax one) for its financial_account_type?</comment> |
| 157 | <add>4.3</add> |
| 158 | </field> |
| 159 | <index> |
| 160 | <name>UI_name</name> |
| 161 | <fieldName>name</fieldName> |
| 162 | <unique>true</unique> |
| 163 | <add>4.3</add> |
| 164 | </index> |
| 165 | </table> |