function removeSIR() { $return = manage_salary_item_report::Remove($_POST["sid"]); Response::createObjectiveResponse($return, !$return ? ExceptionHandler::popExceptionDescription() : ""); die; }
function confirmation() { $keys = array_keys($_POST); $WhereCost = ""; $arr = ""; //...................... مراکز هزینه ................ for ($i = 0; $i < count($_POST); $i++) { if (strpos($keys[$i], "chkcostID_") !== false) { $arr = preg_split('/_/', $keys[$i]); if (isset($arr[1])) { $WhereCost .= $WhereCost != "" ? "," . $arr[1] : $arr[1]; } } } if ($_POST["ItemType"] == "salary") { $obj = new manage_payments(); PdoDataAccess::FillObjectByArray($obj, $_POST); $obj->_CostCenter = $WhereCost; $return = $obj->change_payment_state($_POST["PersonType"]); } else { if ($_POST["ItemType"] == "reportSub") { $obj = new manage_salary_item_report(); $obj->PayYear = $_POST["pay_year"]; $obj->PayMonth = $_POST["pay_month"]; $obj->PersonType = $_POST["PersonType"]; $obj->state = $_POST["state"]; $return = $obj->change_state(); } } if ($return) { echo Response::createResponse(true, $obj->state); } else { echo Response::createResponse(false, ExceptionHandler::ConvertExceptionsToJsObject()); } die; }