}
$paymentBalance = CRM_Core_BAO_FinancialTrxn::getPartialPaymentWithType($id, $entity, FALSE, $total);
+ $contributionIsPayLater = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_Contribution', $contributionId, 'is_pay_later');
+ if ($paymentBalance == 0 && $contributionIsPayLater) {
+ $paymentBalance = $total;
+ }
+
$info['total'] = $total;
$info['paid'] = $total - $paymentBalance;
$info['balance'] = $paymentBalance;
$info['id'] = $id;
$info['component'] = $component;
+ $info['payLater'] = $contributionIsPayLater;
$rows = array();
if ($getTrxnInfo && $baseTrxnId) {
$sql = "