Skip to content

Commit

Permalink
Merge pull request civicrm#1 from dpradeep/VAT-88-New
Browse files Browse the repository at this point in the history
VAT-88 Associate the tax to be charged to the financial type + Add new c...
  • Loading branch information
kurund committed May 22, 2014
2 parents a25baa5 + 4d6769a commit a02f377
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions CRM/Financial/Page/AJAX.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ static function jqFinancial($config) {
'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);
Expand Down
10 changes: 10 additions & 0 deletions CRM/Upgrade/Incremental/sql/4.5.alpha1.mysql.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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';
1 change: 1 addition & 0 deletions xml/templates/civicrm_data.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit a02f377

Please sign in to comment.