/* Decoded by unphp.net */ echo ' '; include("./includes/header.php"); include("./includes/connection.php"); include("./storeordering_navigation.php"); if(isset($_SESSION['userinfo']['Approval_Orders']) &&strtolower($_SESSION['userinfo']['Approval_Orders']) == 'yes'){ header("Location: ./storesubmittedorders.php?PendingOrders=PendingOrdersThisPage"); } if(isset($_SESSION['userinfo']['Employee_Name'])){ $Employee_Name = $_SESSION['userinfo']['Employee_Name']; }else{ $Employee_Name = 'Unknown Officer'; } if(isset($_SESSION['userinfo']['Employee_ID'])){ $Employee_ID = $_SESSION['userinfo']['Employee_ID']; }else{ $Employee_ID = 0; } if(isset($_SESSION['userinfo']['Branch_ID'])){ $Branch_ID = $_SESSION['userinfo']['Branch_ID']; }else{ $Branch_ID = 0; } if(isset($_SESSION['General_Order_ID'])){ $Store_Order_ID = $_SESSION['General_Order_ID']; }else{ $Store_Order_ID = 0; } if(!isset($_SESSION['userinfo'])){ @session_destroy(); header("Location: ../index.php?InvalidPrivilege=yes"); } if(isset($_SESSION['userinfo'])) { if(isset($_SESSION['userinfo']['Storage_And_Supply_Work'])) { if($_SESSION['userinfo']['Storage_And_Supply_Work'] != 'yes'){ header("Location: ./index.php?InvalidPrivilege=yes"); }else{ @session_start(); if(!isset($_SESSION['Storage_Supervisor'])){ header("Location: ./storagesupervisorauthentication.php?InvalidSupervisorAuthentication=yes"); } } }else{ header("Location: ./index.php?InvalidPrivilege=yes"); } }else{@session_destroy();header("Location: ../index.php?InvalidPrivilege=yes");} if(isset($_GET['status'])){ $Store_Ordering_Status = $_GET['status']; } ;echo '

Store Order
Order Number ';if(isset($_SESSION['General_Order_ID'])){;echo ' ';}else{;echo ' ';};echo ' Order Date ';if(isset($_SESSION['General_Order_ID'])){ $Store_Order_ID = $_SESSION['General_Order_ID']; $get_details = mysqli_query($conn,"select Created_Date_Time from tbl_store_orders where Store_Order_ID = '$Store_Order_ID'") or die(mysqli_error($conn)); $num = mysqli_num_rows($get_details); if($num >0){ while($row = mysqli_fetch_array($get_details)){ $Created_Date_Time = $row['Created_Date_Time']; } }else{ $Created_Date_Time = ''; } ;echo ' ';}else{;echo ' ';};echo ' Prepared By
Store Ordering Order Description ';if(isset($_SESSION['General_Order_ID'])){ $Store_Order_ID = $_SESSION['General_Order_ID']; $get_details = mysqli_query($conn,"select Order_Description from tbl_store_orders where Store_Order_ID = '$Store_Order_ID'") or die(mysqli_error($conn)); $num = mysqli_num_rows($get_details); if($num >0){ while($row = mysqli_fetch_array($get_details)){ $Order_Description = $row['Order_Description']; } }else{ $Order_Description = ''; } ;echo ' ';}else{;echo ' ';};echo '
'; if(isset($_SESSION['General_Order_ID'])){ $Store_Order_ID = $_SESSION['General_Order_ID']; }else{ $Store_Order_ID = 0; } ;echo '
Classification
'; $result = mysqli_query($conn,"SELECT Product_Name, t.Item_ID, t.Unit_Of_Measure, ib.Item_Balance, IFNULL((SELECT Buying_Price FROM tbl_purchase_order_items poi WHERE t.Item_ID = poi.Item_ID AND Grn_Status = 'RECEIVED' ORDER BY Order_Item_ID DESC LIMIT 1), '0') as Last_Buying_Price FROM tbl_items t, tbl_items_balance ib WHERE Classification in ('Pharmaceuticals', 'Dental Materials', 'Disposables', 'Laboratory Materials', 'Radiology Materials', 'Stationaries') AND t.Item_ID = ib.Item_ID AND ib.Sub_Department_ID = '$Sub_Department_ID' ORDER BY Product_Name LIMIT 500") or die(mysqli_error($conn)); echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; while($row = mysqli_fetch_array($result)){ echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } ;echo '
ItemsOUMBalancelast buying price
"; ;echo ' '; echo ""; echo ""; echo "
'; echo '
'; echo ''; $select_Transaction_Items = mysqli_query($conn,"SELECT soi.Order_Item_ID, soi.Last_Buying_Price, soi.Store_Order_ID, itm.Product_Name, soi.Quantity_Required, soi.Item_Remark, soi.Store_Order_ID, soi.Container_Qty, soi.Items_Qty, ib.Item_Balance FROM tbl_store_order_items soi, tbl_items itm, tbl_items_balance ib WHERE itm.Item_ID = soi.Item_ID AND itm.Item_ID = ib.Item_ID AND ib.Sub_Department_ID = '$Sub_Department_ID' AND soi.Store_Order_ID ='$Store_Order_ID'") or die(mysqli_error($conn)); $Temp=1; while($row = mysqli_fetch_array($select_Transaction_Items)){ echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; ;echo ' '; echo ""; $Temp++; } echo '
Sn Item Name Units Items Quantity Store Balance Last Buying Price Remark Remove
'; ;echo '
'; if(isset($_SESSION['General_Order_ID'])){ ;echo ' '; } ;echo '
'; include("./includes/footer.php");