ESH/save_app_indent_level1.php
2024-10-23 18:28:06 +05:30

24 lines
824 B
PHP

<?php
include('includes/config/config.php');
include('includes/functions.php');
$indent_id = $_POST['indent_id'];
$status = $_POST['status'];
$remarks = $_POST['app_remarks'];
$app_date = $_POST['approval_date'];
$rolecode = $_SESSION['RoleCode'];
begin();
$sql = "update indent_master set status='" . $status . "',approval_date2=STR_TO_DATE('" . $app_date . "','%d/%m/%Y'),approving_doc_id2='" . $_SESSION['user_id'] . "',approval_remarks2='" . $remarks . "' where indent_id='" . $indent_id . "'";
error_log("sql " . $sql);
if (!$result = @mysqli_query($conn, $sql)) {
error_log ("Exception saving update indent_master level1 save_app_indent_level1:".mysqli_error($conn)." failing query:".$sql);
rollback();
exit(mysqli_error($conn));
} else {
$data = "success";
}
commit();
echo json_encode($data);