Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.6
-
Fix Version/s: 4.7
-
Component/s: None
-
Labels:None
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
From UI Financial type is required when adding price field options for Price set. But one can also add this options using PriceFieldValue api. Through api Financial Type is not mandatory. But for accounting purpose its mandatory to have Financial type for Price Field Value.
By making financial type required in PriceFieldValue api would be a simple and easy fix
diff --git a/api/v3/PriceFieldValue.php b/api/v3/PriceFieldValue.php
index 3cf393d..4c9a803 100644
— a/api/v3/PriceFieldValue.php
+++ b/api/v3/PriceFieldValue.php
@@ -71,6 +71,7 @@ function _civicrm_api3_price_field_value_create_spec(&$params)
Not sure if its a good idea. Other way is to use default financial type from civicrm/admin/financial/financialType?reset=1 or using Financial type used for price set if $params['financial'_type_id'] is empty in create mode.
We might also need to update the civicrm_price_field_value.financial_type_id with one of the above approach for civicrm_price_field_value.financial_type_id IS NULL
Attachments
Issue Links
- supplements
-
CRM-16526 ACLs for Financial Types
- Done/Fixed