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
This commit is contained in:
DevSoftTech Server 2026-06-10 13:14:27 +05:30
parent 54d120e2bb
commit a4e6f69728

View File

@ -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']);
}