Skip to content

Commit

Permalink
Merge pull request #12482 from mattwire/nfc_cc_premium_financial
Browse files Browse the repository at this point in the history
NFC cleanup to financial classes
  • Loading branch information
eileenmcnaughton authored Jul 17, 2018
2 parents d727eac + a2fb468 commit d77cfac
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CRM/Contribute/BAO/Contribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -4852,7 +4852,7 @@ public function loadRelatedMembershipObjects($ids = []) {
*
* @param array $params
*
* @return object
* @return CRM_Financial_DAO_FinancialTrxn
*/
public static function recordPartialPayment($contribution, $params) {
$contributionStatuses = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'name');
Expand Down
4 changes: 1 addition & 3 deletions CRM/Core/BAO/FinancialTrxn.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@ public static function createPremiumTrxn($params) {
$contributionStatuses = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'name');
$toFinancialAccountType = !empty($params['isDeleted']) ? 'Premiums Inventory Account is' : 'Cost of Sales Account is';
$fromFinancialAccountType = !empty($params['isDeleted']) ? 'Cost of Sales Account is' : 'Premiums Inventory Account is';
$accountRelationship = array_flip($accountRelationship);
$financialtrxn = array(
'to_financial_account_id' => CRM_Contribute_PseudoConstant::getRelationalFinancialAccount($params['financial_type_id'], $toFinancialAccountType),
'from_financial_account_id' => CRM_Contribute_PseudoConstant::getRelationalFinancialAccount($params['financial_type_id'], $fromFinancialAccountType),
Expand Down Expand Up @@ -387,7 +386,7 @@ public static function createPremiumTrxn($params) {
* @param array $params
* To create trxn entries.
*
* @return bool
* @return bool|void
*/
public static function recordFees($params) {
$domainId = CRM_Core_Config::domainID();
Expand Down Expand Up @@ -482,7 +481,6 @@ public static function getPartialPaymentWithType($entityId, $entityName = 'parti
";

$ftTotalAmt = CRM_Core_DAO::singleValueQuery($sqlFtTotalAmt);
$value = 0;
if (!$ftTotalAmt) {
$ftTotalAmt = 0;
}
Expand Down
5 changes: 0 additions & 5 deletions CRM/Financial/BAO/FinancialAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@
*/
class CRM_Financial_BAO_FinancialAccount extends CRM_Financial_DAO_FinancialAccount {

/**
* Static holder for the default LT.
*/
static $_defaultContributionType = NULL;

/**
* Class constructor.
*/
Expand Down
2 changes: 1 addition & 1 deletion CRM/Financial/BAO/FinancialItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public static function retrieveEntityFinancialTrxn($params, $maxId = FALSE) {
* @param array $error
* Error to display.
*
* @return array
* @return array|bool
*/
public static function checkContactPresent($contactIds, &$error) {
if (empty($contactIds)) {
Expand Down

0 comments on commit d77cfac

Please sign in to comment.