- foreach ($lineItems as $key => $value) {
- if ($value['qty'] == 0) {
- continue;
- }
- $paid = $value['line_total'] * ($trxnAmount / $contribution->total_amount);
- // Record Entity Financial Trxn
- $params['amount'] = round($paid, 2);
- $params['entity_id'] = $ftIds[$value['price_field_value_id']];
-
- civicrm_api3('EntityFinancialTrxn', 'create', $params);
- }