public function getQuotationByProjectId($projectId = null) { try { $loggedInUserId = AppUtil::getLoggerInUserId(); if ($loggedInUserId != null) { if ($projectId != null) { $Quotation = Quotation::loadAllQuotationByProjId($projectId); //echo json_encode($Quotation); if ($Quotation !== null) { echo AppUtil::getReturnStatus("Successful", $Quotation); } else { echo AppUtil::getReturnStatus("Unsuccessful", "Database Error Occurred"); } } else { echo AppUtil::getReturnStatus("Unsuccessful", "Data not found"); } } } catch (Exception $e) { echo AppUtil::getReturnStatus("Unsuccessful", $e->getMessage()); } }