VAT-88 Associate the tax to be charged to the financial type + Add new column tax_amo...
authordpradeep <pradeep.dorugade@webaccess.co.in>
Thu, 22 May 2014 04:18:41 +0000 (09:48 +0530)
committerdpradeep <pradeep.dorugade@webaccess.co.in>
Thu, 22 May 2014 04:18:41 +0000 (09:48 +0530)
CRM/Financial/Page/AJAX.php
CRM/Upgrade/Incremental/sql/4.5.alpha1.mysql.tpl
xml/templates/civicrm_data.tpl

index 4b12cf42d1d8a466f3c0c2dcfc6a6ea1b1c97ee2..c1777b80de24a769a55eb2e92427d07ef3a20b13 100644 (file)
@@ -61,6 +61,7 @@ class CRM_Financial_Page_AJAX {
         '7' => 4, //cost of sales
         '8' => 1, //premium inventory
         '9' => 3, //discount account is
+        '10' => 2, //sales tax liability
       );
       $financialAccountType = CRM_Utils_Array::value($_GET['_value'], $financialAccountType);
       $result = CRM_Contribute_PseudoConstant::financialAccount(NULL, $financialAccountType);
index c824797427f251879d5ba1a2cb984e0da370579e..5e2f6e321981600c27f5cd172dfbc068ca53f1c6 100644 (file)
@@ -519,3 +519,13 @@ WHERE co.id IS NULL;
     WHERE v.name = 'Awaiting Information';
 {/if}
 
+-- Financial account relationship
+SELECT @option_group_id_arel           := max(id) from civicrm_option_group where name = 'account_relationship';
+INSERT INTO
+   `civicrm_option_value` (`option_group_id`, {localize field='label'}label{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, {localize field='description'}`description`{/localize}, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`)
+VALUES
+(@option_group_id_arel, {localize}'{ts escape="sql"}Sales Tax Account is{/ts}'{/localize}, 10, 'Sales Tax Account is', NULL, 0, 0, 10, {localize}'Sales Tax Account is'{/localize}, 0, 1, 1, 2, NULL);
+
+-- Add new column tax_amount in contribution and lineitem table
+ALTER TABLE `civicrm_contribution` ADD `tax_amount` DECIMAL( 20, 2 ) NOT NULL DEFAULT '0.00' COMMENT 'Total tax amount of this contribution.';
+ALTER TABLE `civicrm_line_item` ADD `tax_amount` DECIMAL( 20, 2 ) NOT NULL DEFAULT '0.00' COMMENT 'tax of each item';
index 1e35fd9bde78750fd714ad8358197add30bdd7e4..0d2c57dec0d9b3721f658f8c1e4a019ce9b0195f 100644 (file)
@@ -857,6 +857,7 @@ VALUES
      (@option_group_id_arel, '{ts escape="sql"}Cost of Sales Account is{/ts}', 7, 'Cost of Sales Account is', NULL, 0, 0, 7, 'Cost of Sales Account is', 0, 1, 1, 2, NULL),
      (@option_group_id_arel, '{ts escape="sql"}Premiums Inventory Account is{/ts}', 8, 'Premiums Inventory Account is', NULL, 0, 0, 8, 'Premiums Inventory Account is', 0, 1, 1, 2, NULL),
      (@option_group_id_arel, '{ts escape="sql"}Discounts Account is{/ts}', 9, 'Discounts Account is', NULL, 0, 0, 9, 'Discounts Account is', 0, 1, 1, 2, NULL),
+     (@option_group_id_arel, '{ts escape="sql"}Sales Tax Account is{/ts}', 10, 'Sales Tax Account is', NULL, 0, 0, 10, 'Sales Tax Account is', 0, 1, 1, 2, NULL),
 
 -- event_contacts
    (@option_group_id_ere, '{ts escape="sql"}Participant Role{/ts}', 1, 'participant_role', NULL, 0, NULL, 1, NULL, 0, 0, 1, NULL, NULL),