Skip to content

Commit

Permalink
Merge pull request #18 from compucorp/CIVIPLMMSR-302-fix-credit-contrib
Browse files Browse the repository at this point in the history
CIVIPLMMSR-302: Avoid passing NULL to reference parameters
  • Loading branch information
olayiwola-compucorp authored Nov 28, 2024
2 parents 0fd852d + c3e99c1 commit 9ce77eb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lineitemedit.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ function lineitemedit_civicrm_pre($op, $entity, $entityID, &$params) {
$taxEnabled = (bool) Civi::settings()->get('invoicing');

if (!isset($params['item_label'])) {
$params['item_label'] = CRM_Utils_Request::retrieve('item_label', 'String', NULL, FALSE, NULL, 'POST');
$params['item_financial_type_id'] = CRM_Utils_Request::retrieve('item_financial_type_id', 'String', NULL, FALSE, NULL, 'POST');
$params['item_qty'] = CRM_Utils_Request::retrieve('item_qty', 'String', NULL, FALSE, NULL, 'POST');
$params['item_unit_price'] = CRM_Utils_Request::retrieve('item_unit_price', 'String', NULL, FALSE, NULL, 'POST');
$params['item_line_total'] = CRM_Utils_Request::retrieve('item_line_total', 'String', NULL, FALSE, NULL, 'POST');
$params['item_price_field_value_id'] = CRM_Utils_Request::retrieve('item_price_field_value_id', 'String', NULL, FALSE, NULL, 'POST');
$params['item_tax_amount'] = CRM_Utils_Request::retrieve('item_tax_amount', 'String', NULL, FALSE, NULL, 'POST');
$params['item_label'] = CRM_Utils_Request::retrieve('item_label', 'String');
$params['item_financial_type_id'] = CRM_Utils_Request::retrieve('item_financial_type_id', 'String');
$params['item_qty'] = CRM_Utils_Request::retrieve('item_qty', 'String');
$params['item_unit_price'] = CRM_Utils_Request::retrieve('item_unit_price', 'String');
$params['item_line_total'] = CRM_Utils_Request::retrieve('item_line_total', 'String');
$params['item_price_field_value_id'] = CRM_Utils_Request::retrieve('item_price_field_value_id', 'String');
$params['item_tax_amount'] = CRM_Utils_Request::retrieve('item_tax_amount', 'String');
$params['tax_amount'] = 0; // previous tax can be removed since it will be recalculated below
}

Expand Down

0 comments on commit 9ce77eb

Please sign in to comment.