From a4e6f69728affc5ddfca471d6932f30596cdefe5 Mon Sep 17 00:00:00 2001 From: DevSoftTech Server Date: Wed, 10 Jun 2026 13:14:27 +0530 Subject: [PATCH] Fix IpdModel method call in toggleStatus endpoint - Change getById() to find() - IpdBillingModel doesn't have getById method - Use ipdEditModel (IpdModel extends Model) which has standard find() method - Fixes 500 error: Call to undefined method IpdBillingModel::getById --- app/Controllers/Billing/Ipd.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Controllers/Billing/Ipd.php b/app/Controllers/Billing/Ipd.php index 5330ac9..ff4f1e7 100644 --- a/app/Controllers/Billing/Ipd.php +++ b/app/Controllers/Billing/Ipd.php @@ -909,7 +909,7 @@ class Ipd extends BaseController } // Get current status - $currentIpd = $this->ipdModel->getById($ipdId); + $currentIpd = $this->ipdEditModel->find($ipdId); if (! $currentIpd) { return $this->response->setStatusCode(404)->setJSON(['update' => 0, 'message' => 'IPD not found']); }