File manager - Edit - /home/autoph/public_html/connect/home/prf_CANCELPOItemsOnly.php
Back
<?php include 'core/init.php'; //$connect_error = 'Sorry, we\'re experiencing connection problem. Please try again later... Thank you!'; //mysql_connect('localhost','root','aee1024') or die ($connect_error); //mysql_select_db('db_vts') or die($connect_error); //error_reporting(1); 193 * 1067 * 215 $prfDate = date_create() ->format("Y-m-d"); $prfTime = date('H:i:s'); $myDate = date_create() ->format("Y-m-d"); $activeID=$user_data['u_id']; if(isset($_POST['done'])){ $MyActivePO = mysql_escape_string($_POST['MyActivePO']); $activeItem = mysql_escape_string($_POST['activeItem']); $getPRFNumber = mysql_result(mysql_query("SELECT `header_ref_code` FROM `prf_request_detl` WHERE `id`='$activeItem'"),0); $chkIfWdPO = mysql_result(mysql_query("SELECT COUNT(1) FROM `prf_purchase_order` WHERE `po_status`> 4 AND `po_number`='$MyActivePO'"),0); if($chkIfWdPO > 0){ echo '<script>alert("ERROR: Unable to proceed with your request. The selected PO has been tagged as DELIVERED. If this is wrong, please contact your system administrator for assistance. Thank you!")</script>'; }else{ mysql_query("INSERT INTO prf_changes_logs(id,action_taken,user_id,old_info,new_info, ref_number,item_id) VALUES('','Cancelled PO','{$activeID}','{$getPRFNumber}','{$activeItem}','{$MyActivePO}','{$activeItem}')"); mysql_query("UPDATE `prf_request_detl` SET `item_status`='7', `po_code`='',`po_code_posted`=0 WHERE `po_code`='$MyActivePO' AND `deleted`=0 AND `id`='$activeItem'"); echo '<script>alert("TRANSACTION COMPLETE:\n The selected item has been cancelled")</script>'; } echo "<table style='width:100%;border-collapse:collapse'>"; $getItems = mysql_query("SELECT * FROM `prf_request_detl` WHERE `po_code`='$MyActivePO'"); $poAmount = mysql_result(mysql_query("SELECT SUM(`approved_amount`) FROM `prf_request_detl` WHERE `po_code`='$MyActivePO' AND `deleted`= 0"),0); while($row=mysql_fetch_array($getItems)){ $counter = $counter + 1; ?><tr onclick="javascript:getInfoX(this);" ><?php echo "<td style='width:5%;border:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:11px;font-weight:normal;text-align:center;'>".$row['id']."</td>"; echo "<td style='width:12%;border:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:11px;font-weight:normal;text-align:center;'>".$row['header_ref_code']."</td>"; echo "<td style='width:60%;border:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:11px;font-weight:normal;text-align:left;'>".$row['item_description']."</td>"; echo "<td style='width:8%;border:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:11px;font-weight:normal;text-align:center;'>".$row['approved_qty']."</td>"; echo "<td style='width:8%;border:0px solid gray;padding:1px;font-family:Yu Gothic Light;font-size:11px;font-weight:normal;text-align:center;'>".$row['approved_amount']."</td>"; echo "</tr>"; } echo "<tr> <td colspan='5' style='padding:10px;padding-right:20px;width:5%;border:0px solid gray; font-family:Yu Gothic Light;font-size:12px;font-weight:bold;text-align:right;'>AMOUNT: ".$poAmount."</td> </tr>"; echo "</table>"; exit; } ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings