Unverified Commit 035a3305 authored by Seamus Lee's avatar Seamus Lee Committed by GitHub
Browse files

Merge pull request #52 from JMAConsulting/AOF-37

AOF-37 Fix in line-item editor to avoid exception error
parents 522ab097 365ac768
......@@ -296,6 +296,7 @@ function lineitemedit_civicrm_pre($op, $entity, $entityID, &$params) {
$taxAmount,
TRUE, TRUE
);
$entityID = (string) $entityID;
Civi::cache('lineitemEditor')->set($entityID, $contriParams);
// record financial item on addition of lineitem
......@@ -315,6 +316,7 @@ function lineitemedit_civicrm_pre($op, $entity, $entityID, &$params) {
function lineitemedit_civicrm_post($op, $entity, $entityID, &$obj) {
if ($entity == 'Contribution' && $op == 'edit') {
$entityID = (string) $entityID;
$contriParams = Civi::cache('lineitemEditor')->get($entityID);
if (!empty($contriParams)) {
$obj->copyValues($contriParams);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment