Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
d5729cdd
Unverified
Commit
d5729cdd
authored
4 years ago
by
mattwire
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #18242 from eileenmcnaughton/dep
Remove 2019 deprecated function
parents
d2fadae5
10de5405
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Contribute/BAO/Contribution.php
+0
-34
0 additions, 34 deletions
CRM/Contribute/BAO/Contribution.php
with
0 additions
and
34 deletions
CRM/Contribute/BAO/Contribution.php
+
0
−
34
View file @
d5729cdd
...
...
@@ -4713,40 +4713,6 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac
return
$ids
;
}
/**
* This function is used to record partial payments for contribution
*
* @param array $contribution
*
* @param array $params
*
* @return CRM_Financial_DAO_FinancialTrxn
*/
public
static
function
recordPartialPayment
(
$contribution
,
$params
)
{
CRM_Core_Error
::
deprecatedFunctionWarning
(
'use payment create api'
);
$balanceTrxnParams
[
'to_financial_account_id'
]
=
self
::
getToFinancialAccount
(
$contribution
,
$params
);
$balanceTrxnParams
[
'from_financial_account_id'
]
=
CRM_Financial_BAO_FinancialAccount
::
getFinancialAccountForFinancialTypeByRelationship
(
$contribution
[
'financial_type_id'
],
'Accounts Receivable Account is'
);
$balanceTrxnParams
[
'total_amount'
]
=
$params
[
'total_amount'
];
$balanceTrxnParams
[
'contribution_id'
]
=
$params
[
'contribution_id'
];
$balanceTrxnParams
[
'trxn_date'
]
=
CRM_Utils_Array
::
value
(
'trxn_date'
,
$params
,
CRM_Utils_Array
::
value
(
'contribution_receive_date'
,
$params
,
date
(
'YmdHis'
)));
$balanceTrxnParams
[
'fee_amount'
]
=
$params
[
'fee_amount'
]
??
NULL
;
$balanceTrxnParams
[
'net_amount'
]
=
$params
[
'total_amount'
]
??
NULL
;
$balanceTrxnParams
[
'currency'
]
=
$contribution
[
'currency'
];
$balanceTrxnParams
[
'trxn_id'
]
=
$params
[
'contribution_trxn_id'
]
??
NULL
;
$balanceTrxnParams
[
'status_id'
]
=
CRM_Core_PseudoConstant
::
getKey
(
'CRM_Core_BAO_FinancialTrxn'
,
'status_id'
,
'Completed'
);
$balanceTrxnParams
[
'payment_instrument_id'
]
=
CRM_Utils_Array
::
value
(
'payment_instrument_id'
,
$params
,
$contribution
[
'payment_instrument_id'
]);
$balanceTrxnParams
[
'check_number'
]
=
$params
[
'check_number'
]
??
NULL
;
$balanceTrxnParams
[
'is_payment'
]
=
1
;
if
(
!
empty
(
$params
[
'payment_processor'
]))
{
// I can't find evidence this is passed in - I was gonna just remove it but decided to deprecate as I see self::getToFinancialAccount
// also anticipates it.
CRM_Core_Error
::
deprecatedFunctionWarning
(
'passing payment_processor is deprecated - use payment_processor_id'
);
$balanceTrxnParams
[
'payment_processor_id'
]
=
$params
[
'payment_processor'
];
}
return
CRM_Core_BAO_FinancialTrxn
::
create
(
$balanceTrxnParams
);
}
/**
* Get the description (source field) for the recurring contribution.
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment