File manager - Edit - /home/autoph/public_html/connect/PRF_CANVASSFORUSRAPPROVAL.php
Back
<?php include 'core/init.php'; protected_page(); $uniqueRefID = $user_data['u_id']; //echo $uniqueRefID; $prfDate = date_create() ->format("Y-m-d"); $prtTime =Explode(":", date('H:i:s')); $txDate = explode("-",$prfDate); $refYear = $txDate[0]; $refMonth = $txDate[1]; $refMinute = $prtTime[1]; $refSecond = $prtTime[2]; $NewRefCode = $refMonth.''.$refMinute.''.$refSecond; ?> <!DOCTYPE html> <html lang="en"> <head> <link rel="stylesheet" type="text/css" href="css/bootstrap.css"/> <link rel="stylesheet" type="text/css" href="css/jquery-ui.css"/> <meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1"/> </head> <body> <div class='NewPRFHeader'> <p class='PRFBodyTitle'>📝 USER CANVASS APPROVAL</p> </div> <!--########################## MAIN TABLE WINDOW ############################################--> <!--########################################################################################################--> <div class='NewPRFBody'> <!--<div class='NewPRFBodyMenu'> <div class='searchDIVA'> <b class='BodyTopMenu' id='LoadNewPRFForm' onclick='showActionSlipForm()'>➕ New Purchase </b> <b class='BodyTopMenu'>📠 Print </b> <b class='BodyTopMenu'>💾 Export</b> </div> <div class='searchDIVB'> <input type='text' id='searchText' placeholder='Search Record.' class='textSearch' style='width:70%;margin:0px;border:1px solid lightgray;'> <button id='searchNewPRF' class='searchButton' style='width:25%'> 🔍 Search</button> </div> </div>--> <div id='mainTableCV' class='PRFTableBody'> <div style='width:100%;height:30px;background:white'> <table> <thead> <th style='width:10%'>REC. NO</th> <th style='width:65%'>ITEM DESCRIPTION</th> <th style='width:10%'>QUANTITY</th> <th style='width:5%'>UOM</th> <th style='width:10%;text-align:right'>DATE NEEDED</th> </thead> </table> </div> <div class='PRFTableItems' style='padding:0px;background:white'> <table id='LoadActiveCanvassForUserApproval' > <?php $getItemInfo = mysql_query(" SELECT prf_request_detl.id, prf_request_hdr.reference_code, prf_request_hdr.`comp_id`, prf_request_hdr.`deal_id`, prf_request_hdr.category_id, prf_request_hdr.sub_category_id, prf_request_hdr.date_needed, prf_request_hdr.request_by, prf_request_detl.header_ref_code, prf_request_detl.item_description, prf_request_detl.uom, prf_canvass_sheet.item_id, prf_canvass_sheet.canvass_id, prf_uploadedcanvass.`ref_code`, prf_canvass_sheet.quantity, prf_canvass_sheet.amount, prf_canvass_sheet.item_id, prf_uploadedcanvass.`vendor_id`, prf_uploadedcanvass.`vendor_code`, prf_uploadedcanvass.`vendor_name`, prf_uploadedcanvass.`file_code` FROM `prf_request_hdr` JOIN `prf_request_detl` ON prf_request_detl.`header_ref_code` = prf_request_hdr.reference_code JOIN prf_canvass_sheet ON prf_canvass_sheet.item_id = prf_request_detl.id JOIN prf_uploadedcanvass ON prf_uploadedcanvass.`id` = prf_canvass_sheet.`canvass_id` WHERE prf_request_hdr.request_by='$uniqueRefID' AND `user_canvass_approval`=1 AND `user_approval_ts`='' AND `create_canvass_sheet`= 0 GROUP BY prf_canvass_sheet.item_id ORDER BY prf_request_detl.item_description ASC "); while($row=mysql_fetch_array($getItemInfo)){ $cvFileCode = $row['file_code']; ?><tr onclick="javascript:getUserActionInfo(this);" ><?php echo "<td style='width:10%'>".$row['id']."</td>"; echo "<td style='width:65%'>".strtoupper($row['item_description'])."</td>"; echo "<td style='width:10%;text-align:center'>".$row['quantity']."</td>"; echo "<td style='width:5%;text-align:center'>".strtoupper($row['uom'])."</td>"; echo "<td style='width:10%;text-align:right'>".$row['date_needed']."</td>"; echo "</tr>"; } ?> <tr><td colspan='9' ><hr style='padding:0px;background:transparent;border:0px;border-bottom:1px solid gray'></td> <tr> <td colspan='9' style='background:white;font-family:Yu Gothic; font-size:13px;color: #f97d43 ;height:20px;font-weight:bold'> <input type='hidden' id='selectedRecordID' class='TableBottomLabel'> <p style='float:left;width:auto;padding-right:10px'>Selected Record:</p> <p style='float:left:width:70%;font-family:Yu Gothic Light;color:gray' id='selectedPRFHeaderIDLabel'></p> </td> </tr> </table> </div> </div> </div> <!--########################## POPUP FOR ENDORSING CANVASS TO GENERATE CANVASS SHEET ############################################--> <!--###################################################################################################################################--> <div id="usrApprovalAction" class="usrCanvassApprovalForm" style='height:515px'> <div class='PopUpWindowTitle'> 🪧 USER CONFIRMATION: <div class='PopUpWindowClose'> <b onclick="javascript:hideUserAction(this);" style='font-weight:bold'> ✕ </b> </div> </div> <table> <tr> <td style='padding:10px;width:100%;background:white;font-family:Yu Gothic; font-size:12px;color: #161615 ;height:130px;font-weight:normal;text-align:left'> <div style='float:left;width:99%;margin-top:5px;font-weight:bold'>ITEM DESCRIPTION:<br> <textarea disabled rows='2' id='itemDesc' style='width:100%;padding:3px;border:1px solid red'><?php echo $itemDesc;?></textarea></div> <div style='float:left;width:10%;margin-top:5px;padding-top:10px'>QTY</div> <div style='float:left;width:20%;margin-top:5px;'><input type='text' id='ENitemQTY' value='<?php echo $itemQTY;?>' style='margin-right:5px;text-align:center'></div> <div style='float:right;width:39%;margin-top:5px;margin-right:10px'> <input type='text' id='ENDateNeeded' disabled style='margin-right:5px;text-align:center'> </div> <div style='float:right;width:15%;margin-top:5px;margin-left:50px;;padding-top:10px'> DATE NEEDED: </div> <div style='background:#dad6d4;float:left;width:99%;margin-top:5px;height:262px;padding:5px;font-family:Yu Gothic Light;font-weight:bold'>🛒 ACTIVE PROPOSALS:<br> <div id='activeCanvassView' style='float:left;width:100%;padding:2px;background:white;height:232px;overflow:auto'> </div> </div> </td> </tr> <tr> <td colspan='1' style='padding:5px;width:250px;background:white;border-top:1px solid #161615 ;text-align:center;padding-top:0px'> <div style='width:100%;float:right;height:50px;padding:5px;background:white'> <button id='ReturnToProcurementForExecomApproval' class='PopUpLowerButtonR' style='width:60%;float:right'>✔ CONFIRM, Send recommendation to procurement</button> <!--<button id='RejectEndorsedCanvass' class='DelPopUpLowerButtonL' style='width:30%;float:right'>❌ REJECT</button>--> </div> </td> </tr> </table> </div> </body> </html> <!--- LOCALIZED COPY OF JAVASCRIPT --> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript"> $(document).ready(function(){ //====================================================================================================== $("#LoadActiveCanvassForUserApproval").click(function(){ var selectedRecordID = $("#selectedRecordID").val(); showUserAction(); //alert(selectedRecordID); if(selectedRecordID ==''){ alert('Please type the Quantity to continue...'); exit; } ShowUploadBar(); $.ajax({ url: "PRF_LOADCanvassListForUserApproval.php", type: "POST", async: false, data: { "selectedRecordID": selectedRecordID, "done": 1 }, success: function(d){ ShowUploadBar(); $("#activeCanvassView").html(d); } }) }); //====================================================================================================== $("#ReturnToProcurementForExecomApproval").click(function(){ var selectedRecordID = $("#selectedRecordID").val(); //alert(selectedRecordID); //exit; ShowUploadBar(); $.ajax({ url: "PRF_SaveUserEndorsedProposal.php", type: "POST", async: false, data: { "selectedRecordID": selectedRecordID, "done": 1 }, success: function(d){ $("#mainTableCV").html(d); updateUserCanvassForApproval(); updateUserApproval(); hideUserAction(); ShowUploadBar(); } }) }); //====================================================================================================== function updateUserApproval(){ $.ajax({ url: "PRF_Update_USERCANVASSAPPROVAL.php", type: "POST", async: false, data: { "trans":2 }, success: function(d){ $("#userApprovalCanvassCount").html(d); } }) } //====================================================================================================== //====================================================================================================== function updateUserCanvassForApproval(){ $.ajax({ url: "PRF_Update_USERCANVASSFORAPPROVAL.php", type: "POST", async: false, data: { "trans":2 }, success: function(d){ $("#canvassForUserApprovalCount").html(d); } }) } //====================================================================================================== function refreshMainTable(){ $.ajax({ url: "PRF_MainTableHeaderDisplay.php", type: "POST", async: false, data: { }, success: function(d){ //invShowAssignMsg(); $("#mainTable").html(d); //invHideAssignMsg(); //$('#searchText').val(''); } }) } }); </script> <!--- LOCALIZED COPY OF JAVASCRIPT --> <script type="text/javascript"> function hideUserAction(){ $("#usrApprovalAction").fadeOut(500); }; function showUserAction(){ $("#usrApprovalAction").fadeIn(500); }; function hideActionViewDelete(){ $("#showActionViewDelete").fadeOut(500); }; function showActionViewDelete(){ $("#showActionViewDelete").fadeIn(500); }; function hideUpdatePRFForm(){ $("#PRFUPDATENewRequest").fadeOut(500); }; function showUpdatePRFForm(){ $("#PRFUPDATENewRequest").fadeIn(500); $("#showActionViewDelete").fadeOut(500); }; function getUserActionInfo(row) { var x=row.cells; document.getElementById("selectedRecordID").value = x[0].innerHTML; document.getElementById("itemDesc").value = x[1].innerHTML; document.getElementById("ENDateNeeded").value = x[4].innerHTML; document.getElementById("ENitemQTY").value = x[2].innerHTML; document.getElementById("selectedPRFHeaderIDLabel").innerHTML = x[1].innerHTML; } //LOAD DEALER BASED ON SELECTED COMPANY function showDealership(str) { //alert(str); if (str == "") { document.getElementById("myDealerList").innerHTML = ""; return; } else { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("myDealerList").innerHTML = xmlhttp.responseText; } } xmlhttp.open("GET","PRF_LOAD_DealerBySelectedCompany.php?q="+str,true); xmlhttp.send(); } } //LOAD DEALER BASED ON SELECTED COMPANY function showCategoryItems(str) { //alert(str); if (str == "") { document.getElementById("CategorySubItem").innerHTML = ""; return; } else { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("CategorySubItem").innerHTML = xmlhttp.responseText; } } xmlhttp.open("GET","PRF_LOAD_ExpenseCategoryItems.php?q="+str,true); xmlhttp.send(); } } </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings