FinanceHelper->isEnabled($task['project_id'])) { return; } $fb = $this->FinanceHelper->get($task['id']); if ($fb['amount'] === '' || (float) $fb['amount'] <= 0) { return; } $credit = $fb['direction'] === 'credit'; $sign = $credit ? '+' : '-'; $total = $fb['installment_total']; $current = $fb['installment_current']; // Installments: "p2/10" when a total is set; "p2" (open-ended) when only the current is set; // nothing when neither is set. Default the current to 1 if only a total was entered. $show_installments = $current !== '' || $total !== ''; $current_display = $current !== '' ? $current : '1'; ?>