File manager - Edit - /home/autoph/public_html/tasks/PRF_CANVASSFORREVIEW.php.tar
Back
home/autoph/public_html/connect/PRF_CANVASSFORREVIEW.php 0000644 00000036714 15025030233 0016542 0 ustar 00 <?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'>📝 CANVASS FOR REVIEW</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:5%'>REC. NO</th> <th style='width:8%'>PRF NUMBER</th> <th style='width:10%'>COMPANY</th> <th style='width:10%'>DEALER</th> <th style='width:32%'>ITEM DESCRIPTION</th> <th style='width:14%'>PURPOSE</th> <th style='width:5%'>QUANTITY</th> <th style='width:8%'>UOM</th> <th style='width:8%;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.purpose_of_request, prf_request_hdr.request_by, prf_request_detl.header_ref_code, prf_request_detl.item_description, prf_request_detl.uom, prf_request_detl.approved_canvass, prf_request_detl.item_status, 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_detl.deleted=0 AND prf_request_detl.`user_canvass_approval`=1 AND prf_request_detl.`user_approval_ts`='' AND prf_request_detl.`create_canvass_sheet`= 0 AND prf_request_detl.approved_canvass = 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:5%'>".$row['id']."</td>"; echo "<td style='width:8%'>".strtoupper($row['reference_code'])."</td>"; echo "<td style='width:10%'>"; $compActiveID = $row['comp_id']; $dealActiveID = $row['deal_id']; $compName = mysql_result(mysql_query("SELECT `comp_code` FROM `vts_company` WHERE `comp_id`='$compActiveID'"),0); $dealName = mysql_result(mysql_query("SELECT `deal_code` FROM `vts_dealerships` WHERE `deal_id`='$dealActiveID'"),0); echo strtoupper($compName); echo"</td>"; echo "<td style='width:10%'>"; echo strtoupper($dealName); echo"</td>"; echo "<td style='width:32%'>".strtoupper($row['item_description'])."</td>"; echo "<td style='width:14%;text-align:left'>".$row['purpose_of_request']."</td>"; echo "<td style='width:5%;text-align:center'>".$row['quantity']."</td>"; echo "<td style='width:8%;text-align:center'>".strtoupper($row['uom'])."</td>"; echo "<td style='width:8%;text-align:right'>".$row['date_needed']."</td>"; echo "</tr>"; } ?> </table> <input type='hidden' id='selectedRecordID' class='TableBottomLabel'> </div> </div> </div> <!--########################## POPUP FOR ENDORSING CANVASS TO GENERATE CANVASS SHEET ############################################--> <!--###################################################################################################################################--> <div id="usrApprovalAction" class="usrCanvassApprovalForm" style='height:515px'> <div class='PopUpWindowTitle'> 🪧 CANVASS INFORMATION: <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 id='itemDesc' style='width:100%;padding:3px;border:1px solid red'> </textarea></div> <div style='float:left;width:35%;margin-top:5px; background:white;margin-right:5px;'> COMPNAY:<br><input disabled type='text' id='txtCompanyName' style='margin-right:10px;text-align:left'> </div> <div style='float:left;width:30%;margin-top:5px;margin-left:5px;background:white'> DEALER:<br><input disabled type='text' id='txtDealerName' style='margin-right:10px;text-align:left'> </div> <div style='float:left;width:15%;margin-top:5px;background:white;margin-left:5px;'> QTY:<br><input disabled type='text' id='ENitemQTY' style='margin-right:10px;text-align:left'> </div> <div style='float:left;width:15%;margin-top:5px;margin-left:5px;background:white'> DATE NEEDED:<br><input type='text' id='ENDateNeeded' disabled style='margin-right:10px;text-align:left'> </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:25%;float:right;margin-right:10px'>✔ APPROVE</button> <button id='ReturnForRecanvass' class='PopUpLowerButtonR' style='width:25%;float:right;margin-right:5px'>✔ Re-CANVASS</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_LOADCanvassForReview.php", type: "POST", async: true, data: { "selectedRecordID": selectedRecordID, "done": 1 }, success: function(d){ ShowUploadBar(); $("#activeCanvassView").html(d); } }) }); //====================================================================================================== $("#ReturnForRecanvass").click(function(){ var selectedRecordID = $("#selectedRecordID").val(); showUserAction(); //alert(selectedRecordID); if(selectedRecordID ==''){ alert('Please type the Quantity to continue...'); exit; } if(confirm("CONFIRM ACTION: \n\n ARE YOU SURE YOU WANT TO RETURN THIS ITEM TO PROCUREMENT FOR RE-CANVASS?")){ ShowUploadBar(); $.ajax({ url: "prf_canvassReviewDisapproved.php", type: "POST", async: true, data: { "selectedRecordID": selectedRecordID, "done": 1 }, success: function(d){ ShowUploadBar(); hideUserAction(); Swal.fire({ position: 'top-start', icon: 'success', title: 'Requested item has been returned to procurement for RE-CANVASS', showConfirmButton: false, timer: 2000 }) $("#LoadActiveCanvassForUserApproval").html(d); userApproval_Click(); } }) } }); //====================================================================================================== $("#ReturnToProcurementForExecomApproval").click(function(){ var selectedRecordID = $("#selectedRecordID").val(); //alert(selectedRecordID); //exit; ShowUploadBar(); $.ajax({ url: "PRF_ApprovedReviewedCanvass.php", type: "POST", async: true, data: { "selectedRecordID": selectedRecordID, "done": 1 }, success: function(d){ $("#LoadActiveCanvassForUserApproval").html(d); updateUserCanvassForApproval(); canvassReview_Click(); hideUserAction(); ShowUploadBar(); } }) }); //====================================================================================================== function updateUserApproval(){ $.ajax({ url: "PRF_Update_USERCANVASSAPPROVAL.php", type: "POST", async: true, data: { "trans":2 }, success: function(d){ $("#userApprovalCanvassCount").html(d); } }) } //====================================================================================================== //====================================================================================================== function userApproval_Click(){ $.ajax({ url: "userApprovalClick.php", type: "POST", async: true, data: { "trans":2 }, success: function(d){ $("#canvassForUserApprovalCount").html(d); } }) } //====================================================================================================== function updateUserCanvassForApproval(){ $.ajax({ url: "PRF_Update_USERCANVASSFORAPPROVAL.php", type: "POST", async: true, data: { "trans":2 }, success: function(d){ $("#canvassForUserApprovalCount").html(d); } }) } //====================================================================================================== function refreshMainTable(){ $.ajax({ url: "PRF_MainTableHeaderDisplay.php", type: "POST", async: true, data: { }, success: function(d){ //invShowAssignMsg(); $("#mainTableCV").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[4].innerHTML; document.getElementById("txtDealerName").value = x[3].innerHTML; document.getElementById("txtCompanyName").value = x[2].innerHTML; document.getElementById("ENDateNeeded").value = x[8].innerHTML; document.getElementById("ENitemQTY").value = x[6].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