public static function reviseQuotation($qid, $data) { try { $loggedInUserId = AppUtil::getLoggerInUserId(); if ($loggedInUserId != null) { if ($data != null && $qid != null) { $Quotation = $Quotation = Quotation::reviseQuotation($qid, $data); // possible user loading method; if ($Quotation == 1) { echo AppUtil::getReturnStatus("Successful", "Quotation Revised successfully"); } else { if ($Quotation == 0) { echo AppUtil::getReturnStatus("Unsuccessful", "Database Error Occurred"); } else { if ($Quotation == 2) { echo AppUtil::getReturnStatus("Unsuccessful", "Quotation reference number is already present"); } else { if ($Quotation == 3) { echo AppUtil::getReturnStatus("Unsuccessful", "Quotation Title already used for another quotaion"); } } } } } else { echo AppUtil::getReturnStatus("Unsuccessful", "Data value is empty"); } } } catch (Exception $e) { echo AppUtil::getReturnStatus("Unsuccessful", $e->getMessage()); } }