/**
* Takes an associative array and creates a financial transaction object
*
- * @param array $params (reference ) an assoc array of name/value pairs
+ * @param array $params
+ * (reference ) an assoc array of name/value pairs.
*
- * @param string $trxnEntityTable entity_table
+ * @param string $trxnEntityTable
+ * Entity_table.
*
* @return CRM_Core_BAO_FinancialTrxn object
* @static
*/
- public static function create(&$params, $trxnEntityTable = null ) {
+ public static function create(&$params, $trxnEntityTable = null) {
$trxn = new CRM_Financial_DAO_FinancialTrxn();
$trxn->copyValues($params);
$fids = array();
$balanceAmtDAO = CRM_Core_DAO::executeQuery($q, $p);
$ret = array();
- while($balanceAmtDAO->fetch()) {
+ while ($balanceAmtDAO->fetch()) {
$ret['trxn_id'] = $balanceAmtDAO->id;
$ret['total_amount'] = $balanceAmtDAO->total_amount;
}
/**
* Fetch object based on array of properties
*
- * @param array $params (reference ) an assoc array of name/value pairs
- * @param array $defaults (reference ) an assoc array to hold the flattened values
+ * @param array $params
+ * (reference ) an assoc array of name/value pairs.
+ * @param array $defaults
+ * (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Contribute_BAO_ContributionType object
* @static
*/
- public static function retrieve( &$params, &$defaults ) {
- $financialItem = new CRM_Financial_DAO_FinancialTrxn( );
+ public static function retrieve(&$params, &$defaults) {
+ $financialItem = new CRM_Financial_DAO_FinancialTrxn();
$financialItem->copyValues($params);
if ($financialItem->find(true)) {
- CRM_Core_DAO::storeValues( $financialItem, $defaults );
+ CRM_Core_DAO::storeValues($financialItem, $defaults);
return $financialItem;
}
return null;
* Given an entity_id and entity_table, check for corresponding entity_financial_trxn and financial_trxn record.
* NOTE: This should be moved to separate BAO for EntityFinancialTrxn when we start adding more code for that object.
*
- * @param $entity_id id of the entity usually the contactID.
- * @param string $orderBy to get single trxn id for a entity table i.e last or first.
+ * @param $entity_id
+ * Id of the entity usually the contactID.
+ * @param string $orderBy
+ * To get single trxn id for a entity table i.e last or first.
* @param bool $newTrxn
*
* @return array $tag array of category id's the contact belongs to.
* Given an entity_id and entity_table, check for corresponding entity_financial_trxn and financial_trxn record.
* @todo This should be moved to separate BAO for EntityFinancialTrxn when we start adding more code for that object.
*
- * @param int $entity_id id of the entity usually the contactID.
+ * @param int $entity_id
+ * Id of the entity usually the contactID.
*
* @return array $tag array of catagory id's the contact belongs to.
*
/**
* Given an financial_trxn_id check for previous entity_financial_trxn.
*
- * @param $financial_trxn_id id of the latest payment.
+ * @param $financial_trxn_id
+ * Id of the latest payment.
*
*
* @return array $payment array of previous payments
* Given an entity_id and entity_table, check for corresponding entity_financial_trxn and financial_trxn record.
* NOTE: This should be moved to separate BAO for EntityFinancialTrxn when we start adding more code for that object.
*
- * @param $entity_id id of the entity usually the contactID.
- * @param string $entity_table name of the entity table usually 'civicrm_contact'
+ * @param $entity_id
+ * Id of the entity usually the contactID.
+ * @param string $entity_table
+ * Name of the entity table usually 'civicrm_contact'.
*
* @return array $tag array of catagory id's the contact belongs to.
*
$sqlParams = array(1 => array($entity_id, 'Integer'), 2 => array($entity_table, 'String'));
$dao = CRM_Core_DAO::executeQuery($query, $sqlParams);
- while($dao->fetch()){
+ while ($dao->fetch()) {
$result[$dao->financial_trxn_id][$dao->id] = $dao->amount;
}
if (!empty($result)) {
/**
* Create financial trxn and items when fee is charged
*
- * @param array $params to create trxn entries
+ * @param array $params
+ * To create trxn entries.
*
* @static
*/