Merge pull request #11993 from jaapjansma/issue_66
[civicrm-core.git] / api / v3 / LineItem.php
index 7b80f6bf35a6853ab454f841c92e6c603f0f8490..bb1ab79762f0fa65dc55b6c9af01dad3084200fc 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.7                                                |
+ | CiviCRM version 5                                                  |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2017                                |
  +--------------------------------------------------------------------+
  *   api result array
  */
 function civicrm_api3_line_item_create($params) {
+  // @todo the following line is not really appropriate for the api. The BAO should
+  // do the work, and it should be in a tighter function. The below function is  not really
+  // readable because it is handling contribution and line item together.
   $params = CRM_Contribute_BAO_Contribution::checkTaxAmount($params, TRUE);
-  return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
+  return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params, 'LineItem');
 }
 
 /**