File manager - Edit - /home/autoph/public_html/connect/home/PRF_FORCanvassASS.php
Back
<?php include 'core/init.php'; protected_page(); $uniqueRefID = $user_data['u_id']; $POVAL = $user_data['POVAL']; //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' style='float:left;width:30%'>📝 FOR CANVASS/SOURCING</p> <div class='searchDIVB' style='float:left;width:60%;margin-top:8px'> <button id='searchNewPRF' class='searchButton' style='float:right;width:25%;height:35px;'> 🔍 SEARCH PRFx</button> <input type='text' id='searchText' placeholder='SEARCH PRF#' class='textSearch' style='float:right;text-align:center;width:30%;margin:0px;border:1px solid lightgray;'> <?php if($POVAL ==1){?> <select id='filterBuyerIDAss' style='float:right;width:40%;margin:0px;padding:0px;height:35px;margin-right:3px' > <option value='0'>-- VIEW ALL -- </option> <?php $getBuyerMember = mysql_query("SELECT vts_users.u_id,vts_users.u_fname,vts_users.u_lname,vts_users.company FROM vts_users WHERE u_status=1 AND buyer=1 ORDER BY u_lname ASC"); while($uRow=mysql_fetch_array($getBuyerMember)){ echo "<option value='".$uRow['u_id']."'>".strtoupper($uRow['u_lname']).", ".strtoupper($uRow['u_fname'])."</option>"; } ?> </select> <?php }else{?> <select id='filterBuyerIDAss' style='float:right;width:40%;margin:0px;padding:0px;height:35px;margin-right:3px' > <option value=''>--Filter Buyer-- </option> </select> <?php } ?> </div> </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>--> <div id='mainTable' class='PRFTableBody' style='overflow:auto'> <div style='width:120%;height:33px;background:white'> <table <thead> <th style='width:5%'>REC. NO</th> <th style='width:7%'>PRF NUMBER</th> <th style='width:8%'>RECEIVED DATE</th> <th style='width:7%'>COMPANY</th> <th style='width:40%'>ITEM DESC</th> <th style='width:5%'>QTY</th> <th style='width:8%'>REQUEST BY</th> <th style='width:8%'>PICKED BY</th> <th style='width:12%'>CATEGORY</th> <th style='width:5%'>DOC</th> </thead> </table> </div> <div class='PRFTableItems' id='reloadCanvassItem' style='width:120%'> <table style='width:100%'> <?php $getItemHdr = mysql_query("SELECT * FROM `prf_request_detl` WHERE `deleted`=0 AND `served`='0' AND `awarded` = 0 AND `for_canvass` = 1 AND `award_to_vendor_id` = 0 AND `user_canvass_approval`=0 AND `ahg_admin_date`!='' AND `canvass_by`='$uniqueRefID' ORDER BY `ahg_admin_date` ASC"); while($row=mysql_fetch_array($getItemHdr)){ $itemRefCode=$row['header_ref_code']; $attDoc =mysql_result(mysql_query("SELECT `attachment` FROM `prf_request_hdr` WHERE `reference_code`='$itemRefCode'"),0); $Cat = $row['category_id']; $SubCat = $row['sub_category_id']; $CatName = mysql_result(mysql_query("SELECT description FROM prf_expensecategory WHERE id='$Cat'"),0); $SubCatName = mysql_result(mysql_query("SELECT description FROM prf_expenseitems WHERE id='$SubCat'"),0); $compCode = mysql_result(mysql_query("SELECT comp_code FROM vts_company WHERE comp_id='".$row['comp_id']."'"),0); $dealCode = mysql_result(mysql_query("SELECT deal_code FROM vts_dealerships WHERE deal_id='".$row['dealer_id']."'"),0); $reqBy = mysql_result(mysql_query("SELECT request_by FROM prf_request_hdr WHERE reference_code='$itemRefCode'"),0); $canBy = $row['canvass_by']; $reqByFName = mysql_result(mysql_query("SELECT u_fname FROM vts_users WHERE u_id='$reqBy'"),0); $reqByLName = mysql_result(mysql_query("SELECT u_lname FROM vts_users WHERE u_id='$reqBy'"),0); $picTS = $row['date_time_pick']; $canByFName = mysql_result(mysql_query("SELECT u_fname FROM vts_users WHERE u_id='$canBy'"),0); $canByLName = mysql_result(mysql_query("SELECT u_lname FROM vts_users WHERE u_id='$canBy'"),0); $getPRFApprovalCode = mysql_result(mysql_query("SELECT current_status FROM prf_request_hdr WHERE reference_code='$itemRefCode' "),0); //if($getPRFApprovalCode == 4){ //onDblclick="javascript:showActionViewDelete(this);" ?><tr onclick="javascript:showPRFheaderForDeletion(this);" ><?php echo "<td style='width:5%'>".$row['id']."</td>"; echo "<td style='width:7%'>".strtoupper($row['header_ref_code'])."</td>"; echo "<td style='width:8%'>".strtoupper($row['ahg_admin_date'])."</td>"; echo "<td style='width:7%'>".strtoupper($dealCode)."</td>"; echo "<td style='width:40%;text-align:left'>".strtoupper($row['item_description'])."</td>"; echo "<td style='width:5%;text-align:center'>".strtoupper($row['quantity'])."</td>"; echo "<td style='width:8%'>".strtoupper($reqByLName).", ".strtoupper($reqByFName)."</td>"; echo "<td style='width:8%'>".strtoupper($canByLName).", ".strtoupper($canByFName)."<br>".$picTS."</td>"; echo "<td style='width:12%'>".strtoupper($CatName)."</td>"; echo "<td style='width:5%;text-align:center;font-size:14px;padding:3px'>"; $chkAttachment = mysql_result(mysql_query("SELECT COUNT(1) FROM `prf_attachment` WHERE `prf_number` = '".$row['header_ref_code']."'"),0); $withMail ='📝'; $attFilename = mysql_result(mysql_query("SELECT `document_name` FROM `prf_attachment` WHERE `prf_number` = '".$row['header_ref_code']."'"),0); $noMail = '-'; if($chkAttachment > 0){ echo "<a href='FILES/prfdoc/".$attFilename."' target='_Blank'><abbr title='View Attached document'>📑</abbr></a>"; }else{ echo $noMail; } echo"</td>"; echo "</tr>"; //} } ?> <tr><td colspan='9' ><hr style='padding:0px;background:transparent;border:0px;border-bottom:1px solid gray'></td> <tr> <td colspan='3' style='background:white;font-family:Yu Gothic; font-size:13px;color: #f97d43 ;height:20px;font-weight:normal'>Selected Record:</td> <td colspan='6' style='background:white;'> <input type='hidden' id='selectedPRFHeaderID' class='TableBottomLabel'> <input disabled type='hidden' id='selectedPRFHeaderIDLabel' style='background:white;border:0px;font-family:Yu Gothic;font-size:14px;color: #f97d43 ;font-weight:normal'> </td> </tr> </table> </div> </div> </div> <!--########################## POPUP ACTION WINDOW FOR DELETE AND VIEW DETAILS ############################################--> <!--########################################################################################################--> <div id="showActionViewDelete" class="PopUpActionWindow"> <div class='PopUpWindowTitle'> 🪧 Confirm Action <div class='PopUpWindowClose'> <b onclick="javascript:hideActionViewDelete(this);" style='font-weight:bold'> ✕ </b> </div> </div> <table> <tr> <td style='padding:10px;padding-left:20px;width:100%;background:white;font-family:Yu Gothic; font-size:16px;color:red ;height:10px;font-weight:normal;text-align:left'>Selected Record:<br> <input disabled type='hidden' id='ActionReferenceID' style='text-align:center;margin-top:10px;background:lightgray;border:0px;font-family:Yu Gothic;font-size:18px;color: red ;font-weight:bold;margin-bottom:3px;padding-bottom:2px'> <input disabled type='text' id='ActionReferenceIDDesc' style='text-align:center;margin-top:10px;background:lightgray;border:0px;font-family:Yu Gothic;font-size:18px;color: red ;font-weight:bold;margin-bottom:3px;padding-bottom:2px'> <br><br> </td> </tr> <tr> <td colspan='1' style='padding:10px;width:250px;background:white;border-top:1px solid gray;text-align:center;padding-top:5px'> <div style='width:100%;float:right;height:50px;padding:10px;background:white'> <button onclick="javascript:showUpdatePRFForm(this);" id='viewPRFItems' class='PopUpLowerButtonR' style='width:100px'>📑 DETAILS</button> <button onclick="javascript:showUpdatePRFForm(this);" id='LoadCanvassSheet' class='PopUpLowerButtonR' style='width:150px'>🗒 CREATE CANVASS</button> <?php if($POVAL ==1){?> <button id='uNgrabItem' class='PopUpLowerButtonR' style='width:100px'>📍 RE-ASSIGN</button> <?php }else{?> </select> <?php } ?> </div> </td> </tr> </table> </div> <!--########################## ADD NEW PURCHASE REQEUST ############################################--> <!--########################################################################################################--> <div id="PRFCreateNewRequest" class="PopUpWindowPRF"> <div class='PopUpWindowTitle'> 🗒 New Purchase Request <div class='PopUpWindowClose'> <b id='XCloseButton' style='font-weight:bold'> ✕ </b> </div> </div> <!--BODY--> <div class='PopUpWindowBodyContainer'> <input type='hidden' id='PRFReferenceNumber'> <label class='PRFRefID' id='uReferenceID'>:</label> <label class='PRFRefID'>Reference Number.</label> <div id="PRFNewContentInfo" class="PopUpWindowBody"> <div class='PRFdropItemSelectionContainer'> <div class='PRFdropItemSelection'> <p class='buttonTitle'>Select Company:</p> <select id='prfCompanySelected' class='DropDownButton' onchange="showDealership(this.value)"> <option value='0'>-- Select Company --</option> <?php $getCompanyAccess = mysql_query(" SELECT brand_access.user_id, brand_access.comp_id,brand_access.dealer_id,vts_company.comp_id,vts_company.comp_code,vts_company.comp_name FROM brand_access JOIN vts_company ON brand_access.comp_id = vts_company.comp_id WHERE brand_access.user_id=$uniqueRefID GROUP BY brand_access.comp_id ORDER BY vts_company.comp_name ASC "); while($row=mysql_fetch_array($getCompanyAccess)){ echo "<option value='".$row['comp_id']."'>".strToupper($row['comp_name'])."</option>"; } ?> </select> </div> <div class='PRFdropItemSelection'> <p class='buttonTitle'>Select Dealer:</p> <select id='myDealerList' class='DropDownButton' > </select> </div> <div class='PRFdropItemSelection'> <p class='buttonTitle'>Select Expense Category:</p> <select id='prfCategorySelected' class='DropDownButton' onchange="showCategoryItems(this.value)"> <option value='0'>-- Select Category --</option> <?php $getCompanyAccess = mysql_query("SELECT * FROM `prf_expensecategory` WHERE `status` = 1 ORDER BY description ASC "); while($row=mysql_fetch_array($getCompanyAccess)){ echo "<option value='".$row['id']."'>".strToupper($row['description'])."</option>"; } ?> </select> </div> <div class='PRFdropItemSelection'> <p class='buttonTitle'>Expense Type:</p> <select id='CategorySubItem' class='DropDownButton' > </select> </div> </div> <div class='PRFdropItemSelectionContainer'> <div class='PRFdropItemSelection' style='width:50%;background:transparent;padding-bottom:0px;padding-top:0px'> <p class='buttonTitle' style='margin-top:0px;padding-top:0px'>Purpose of Request:</p> <input type='text' id='PurposeOfReqeust' class='DropDownButton' style='margin:0px;'> </div> <div class='PRFdropItemSelection' style='width:25%;background:transparent;padding-bottom:0px;padding-top:0px'> <p class='buttonTitle' style='margin-top:0px;padding-top:0px'>Date Needed:</p> <input type='date' id='DateNeeded' > </div> <div class='PRFdropItemSelection' style='width:25%;background:transparent;padding-bottom:0px;padding-top:0px'> <p class='buttonTitle' style='margin-top:0px;padding-top:0px'>Approving Head:</p> <select id='prfApprovingHead' class='DropDownButton' style='margin:0px;' > <option value='0'>-- Select Category --</option> <?php $getCompanyAccess = mysql_query("SELECT vts_users.u_id,vts_users.u_fname,vts_users.u_lname,cl_approving_officers.cl_emp_id_a FROM cl_approving_officers JOIN vts_users ON cl_approving_officers.cl_emp_id_a = vts_users.u_id WHERE cl_approving_officers.cl_status=1 GROUP by cl_approving_officers.cl_emp_id_a "); while($row=mysql_fetch_array($getCompanyAccess)){ echo "<option value='".$row['u_id']."'>".strToupper($row['u_lname']).", ".strToupper($row['u_fname'])."</option>"; } ?> </select> </div> </div> <div class='PRFAddNewItem'> <div class='PRFdropItemSelection' style='width:50%;background:transparent;padding-bottom:0px;padding-top:0px'> <p class='buttonTitle' style='margin-top:0px;padding-top:0px'>Item Description:</p> <input type='text' id='txtAddItemDesc' class='DropDownButton' style='margin:0px;'> </div> <div class='PRFdropItemSelection' style='width:15%;background:transparent;padding-bottom:0px;padding-top:0px'> <p class='buttonTitle' style='margin-top:0px;padding-top:0px'>Quantity:</p> <input type='number' value='1' id='txtAddItemQty' min="1" class='DropDownButton' style='margin:0px;'> </div> <div class='PRFdropItemSelection' style='width:15%;background:transparent;padding-bottom:0px;padding-top:0px'> <p class='buttonTitle' style='margin-top:0px;padding-top:0px'>UoM:</p> <select id='UnitOfMeasure' class='DropDownButton' style='margin:0px;' > <option value='0'>-- Select --</option> <?php $getCompanyAccess = mysql_query("SELECT * FROM PRF_UoM WHERE status =1 ORDER BY Description ASC "); while($row=mysql_fetch_array($getCompanyAccess)){ echo "<option value='".$row['description']."'>".strToupper($row['description'])."</option>"; } ?> </select> </div> <div class='PRFdropItemSelection' style='width:20%;background:transparent;padding-bottom:0px;padding-top:0px'> <p class='buttonTitle' style='margin-top:0px;padding-top:0px'></p> <button id='btnAddNewItem' class='InsertButton'>➕ Add Item</button> </div> </div> <div class='PRFNewTableBody' id='PRFItemBody'> </div> </div> </div> </div> <!--########################## END OF ADD NEW PURCHASE REQEUST ############################################--> <!--########################## EDIT/UPDATE PURCHASE REQUEST ###############################################--> <div id="PRFUPDATENewRequest" class="PopUpWindowPRF" style='position:fixed'> <div class='PopUpWindowTitle'> 🗒 PRF INFORMATION <div class='PopUpWindowClose'> <b onclick="javascript:hideUpdatePRFForm(this);" style='font-weight:bold'> ✕ </b> </div> </div> <!--BODY--> <div class='PopUpWindowBodyContainer'> <input type='hidden' id='UpdatePRFReferenceNumber'> <input type='hidden' id='ItemRecordID'> <label class='PRFRefID' id='UpdateuReferenceID'>:</label> <input type='hidden' id='myCanvassPRFCode'> <label class='PRFRefID'>Reference Number.</label> <div id="UpdatePRFNewContentInfo" class="PopUpWindowBody" style='height:489px;background:white'> </div> </div> </div> <!--########################## END OF EDIT/UPDATING PURCHASE REQEUST ############################################--> </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(){ //======================================================================================================================================= //======================================================================================================================================= $("#searchNewPRF").click(function(){ var searchText = $("#searchText").val(); var filterBuyerIDAss = $("#filterBuyerIDAss").val(); //alert(searchText); //alert(filterBuyerIDAss); if(searchText=="" && filterBuyerIDAss==''){ Swal.fire('Invalid Entry. Please try again') exit; } hideActionViewDelete(); ShowUploadBar(); $.ajax({ url: "prf_searchForCanvassASS.php", type: "POST", async: true, data: { "searchText": searchText, "filterBuyerIDAss": filterBuyerIDAss, "done": 1 }, success: function(d){ ShowUploadBar(); $("#mainTable").html(d); } }) }); //====================================================================================================== $("#deletePRFHeader").click(function(){ var selectedPRFHeaderID = $("#selectedPRFHeaderID").val(); //alert(selectedPRFHeaderID); //exit; if(confirm("CONFIRM DELETE ACTION: \n\nAre you sure you want to DELETE this record? \n\n Press 'OK' button to proceed...")){ ShowUploadBar(); $.ajax({ url: "PRF_DeletePRF_Header.php", type: "POST", async: true, data: { "selectedPRFHeaderID": selectedPRFHeaderID, "done": 1 }, success: function(d){ ShowUploadBar(); updateCREATENEWPRF(); $("#mainTable").html(d); hideActionViewDelete(); //$('#searchText').val(''); 015334295-1005 } }) } }); //====================================================================================================== $("#LoadNewPRFForm").click(function(){ var uReferenceID = <?php echo $NewRefCode;?> +""+ Math.floor(Math.random() * 888) + <?php echo $uniqueRefID;?>; document.getElementById("PRFReferenceNumber").value= uReferenceID;//<?php echo $NewRefCode;?> +""+ Math.floor(Math.random() * 888) + <?php echo $uniqueRefID;?>; document.getElementById("uReferenceID").innerHTML= uReferenceID; document.getElementById("prfCompanySelected").disabled = false; document.getElementById("myDealerList").disabled = false; document.getElementById("prfCategorySelected").disabled = false; document.getElementById("CategorySubItem").disabled = false; document.getElementById("PurposeOfReqeust").disabled = false; document.getElementById("DateNeeded").disabled = false; document.getElementById("prfApprovingHead").disabled = false; ShowUploadBar(); $.ajax({ url: "PRF_NewResfresh.php", type: "POST", async: true, data: { }, success: function(d){ ShowUploadBar(); updateCREATENEWPRF(); $("#PRFItemBody").html(d); //invHideAssignMsg(); //$('#searchText').val(''); } }) }); //====================================================================================================== $("#XCloseButton").click(function(){ document.getElementById("btnAddNewItem").disabled = false; document.getElementById("btnAddNewItem").style.backgroundColor = ""; document.getElementById("btnAddNewItem").style.color = ""; $("#PRFCreateNewRequest").fadeOut(500); ShowUploadBar(); $.ajax({ url: "PRF_NewResfresh.php", type: "POST", async: true, data: { }, success: function(d){ ShowUploadBar(); updateCREATENEWPRF(); $("#PRFItemBody").html(d); //invHideAssignMsg(); refreshMainTable(); } }) }); //====================================================================================================== $("#btnPostNewPRF").click(function(){ var UpdateReferenceHeaderCode = $("#PRFReferenceNumber").val(); //=alert(UpdateReferenceHeaderCode); //exit; ShowUploadBar(); $.ajax({ url: "PRF_PostNewPRF_FromNew.php", type: "POST", async: true, data: { "UpdateReferenceHeaderCode": UpdateReferenceHeaderCode, "done": 1 }, success: function(d){ updateCREATENEWPRF(); $("#mainTable").html(d); ShowUploadBar(); refreshMainTable(); $("#PRFCreateNewRequest").fadeOut(500); } }) }); //====================================================================================================== $("#btnCloseButton").click(function(){ document.getElementById("btnAddNewItem").disabled = false; document.getElementById("btnAddNewItem").style.backgroundColor = ""; document.getElementById("btnAddNewItem").style.color = ""; $("#PRFCreateNewRequest").fadeOut(500); ShowUploadBar(); $.ajax({ url: "PRF_NewResfresh.php", type: "POST", async: true, data: { }, success: function(d){ $("#PRFItemBody").html(d); updateCREATENEWPRF(); refreshMainTable(); ShowUploadBar(); } }) }); //====================================================================================================== $("#uNgrabItem").click(function(){ var ItemRecordID = $("#ItemRecordID").val(); var UpdatePRFReferenceNumber = $("#UpdatePRFReferenceNumber").val(); var myCanvassPRFCode = $("#myCanvassPRFCode").val(); //alert(myCanvassPRFCode); if(confirm("CONFIRM ACTION: \n\n Are you sure you want to untag this?")){ ShowUploadBar(); $.ajax({ url: "prf_updateuNGrabItem.php", type: "POST", async: true, data: { "UpdatePRFReferenceNumber": UpdatePRFReferenceNumber, "ItemRecordID": ItemRecordID, "myCanvassPRFCode": myCanvassPRFCode, "done": 1 }, success: function(d){ ShowUploadBar(); //updateCREATENEWPRF(); $("#reloadCanvassItem").html(d); //invHideAssignMsg(); //$('#searchText').val(''); hideActionViewDelete(); } }) } }); //====================================================================================================== $("#LoadCanvassSheet").click(function(){ var ItemRecordID = $("#ItemRecordID").val(); var UpdatePRFReferenceNumber = $("#UpdatePRFReferenceNumber").val(); var myCanvassPRFCode = $("#myCanvassPRFCode").val(); //alert(myCanvassPRFCode); ShowUploadBar(); //alert(UpdatePRFReferenceNumber); $.ajax({ url: "PRF_CreateCanvassSheet.php", type: "POST", async: true, data: { "UpdatePRFReferenceNumber": UpdatePRFReferenceNumber, "ItemRecordID": ItemRecordID, "myCanvassPRFCode": myCanvassPRFCode, "done": 1 }, success: function(d){ ShowUploadBar(); updateCREATENEWPRF(); $("#UpdatePRFNewContentInfo").html(d); //invHideAssignMsg(); //$('#searchText').val(''); } }) }); //====================================================================================================== $("#viewPRFItems").click(function(){ var UpdatePRFReferenceNumber = $("#UpdatePRFReferenceNumber").val(); ShowUploadBar(); //alert(prfCompanySelected); $.ajax({ url: "PRF_ViewContentOnlyCanvassView.php", type: "POST", async: true, data: { "UpdatePRFReferenceNumber": UpdatePRFReferenceNumber, "done": 1 }, success: function(d){ ShowUploadBar(); updateCREATENEWPRF(); $("#UpdatePRFNewContentInfo").html(d); //invHideAssignMsg(); //$('#searchText').val(''); } }) }); //====================================================================================================== $("#btnAddNewItem").click(function(){ var prfCompanySelected = $("#prfCompanySelected").val(); var myDealerList = $("#myDealerList").val(); var prfCategorySelected = $("#prfCategorySelected").val(); var CategorySubItem = $("#CategorySubItem").val(); var PurposeOfReqeust = $("#PurposeOfReqeust").val(); var DateNeeded = $("#DateNeeded").val(); var prfApprovingHead = $("#prfApprovingHead").val(); var txtAddItemDesc = $("#txtAddItemDesc").val(); var txtAddItemQty = $("#txtAddItemQty").val(); var UnitOfMeasure = $("#UnitOfMeasure").val(); var uReferenceID = $("#PRFReferenceNumber").val(); if(prfCompanySelected ==0){ alert("Please select company."); exit; } if(myDealerList ==0){ alert("Please select dealer."); exit; } if(prfCategorySelected ==0){ alert("Please select purchase category."); exit; } if(CategorySubItem ==0){ alert("Please select purchase subcategory."); exit; } if(PurposeOfReqeust ==""){ alert("Please indicate the purpose of your request."); exit; } if(DateNeeded ==""){ alert("Please indicate date needed"); exit; } if(prfApprovingHead ==0){ alert("Please select approving head"); exit; } if(txtAddItemDesc ==""){ alert("Please type something in the item description"); exit; } if(UnitOfMeasure ==""){ alert("Please select unit of measure"); exit; } document.getElementById("prfCompanySelected").disabled = true; document.getElementById("myDealerList").disabled = true; document.getElementById("prfCategorySelected").disabled = true; document.getElementById("CategorySubItem").disabled = true; document.getElementById("PurposeOfReqeust").disabled = true; document.getElementById("DateNeeded").disabled = true; document.getElementById("prfApprovingHead").disabled = true; //document.getElementById("btnAddNewItem").style.backgroundColor = "gray"; //document.getElementById("btnAddNewItem").style.color = "lightgray"; ShowUploadBar(); $.ajax({ url: "PRF_AddNewPRFItemsAndHeaders.php", type: "POST", async: true, data: { "uReferenceID": uReferenceID, "prfCompanySelected": prfCompanySelected, "myDealerList": myDealerList, "prfCategorySelected": prfCategorySelected, "CategorySubItem": CategorySubItem, "PurposeOfReqeust": PurposeOfReqeust, "DateNeeded": DateNeeded, "txtAddItemDesc": txtAddItemDesc, "prfApprovingHead": prfApprovingHead, "txtAddItemQty": txtAddItemQty, "UnitOfMeasure": UnitOfMeasure, "done": 1 }, success: function(d){ ShowUploadBar(); $("#PRFItemBody").html(d); //invHideAssignMsg(); //$('#searchText').val(''); } }) }); //====================================================================================================== function updateCREATENEWPRF(){ $.ajax({ url: "PRF_Update_CREATE_NEW_PRF.php", type: "POST", async: true, data: { "trans":1 }, success: function(d){ updatePostedPRF(); $("#unPostedPRFRequestCount").html(d); } }) } //====================================================================================================== function updatePostedPRF(){ $.ajax({ url: "PRF_Update_POSTEDPRF.php", type: "POST", async: true, data: { "trans":2 }, success: function(d){ $("#PostedPRFRequestCount").html(d); } }) } //====================================================================================================== function updateApprovalPRF(){ $.ajax({ url: "PRF_procIncomingInfo.php", type: "POST", async: true, data: { "trans":2 }, success: function(d){ $("#forMyApprovalCount").html(d); } }) } //====================================================================================================== function refreshMainTable(){ $.ajax({ url: "PRF_MainTableHeaderDisplay.php", type: "POST", async: true, data: { }, success: function(d){ //invShowAssignMsg(); $("#mainTable").html(d); //invHideAssignMsg(); //$('#searchText').val(''); } }) } }); </script> <!--- LOCALIZED COPY OF JAVASCRIPT --> <script type="text/javascript"> function hideActionSlipForm(){ $("#PRFCreateNewRequest").fadeOut(500); }; function showActionSlipForm(){ $("#PRFCreateNewRequest").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 showPRFheaderForDeletion(row) { var x=row.cells; document.getElementById("selectedPRFHeaderID").value = x[1].innerHTML; //document.getElementById("selectedPRFHeaderIDLabel").value = x[1].innerHTML; document.getElementById("ActionReferenceID").value = x[1].innerHTML; document.getElementById("ActionReferenceIDDesc").value = "PRF.#: " + x[1].innerHTML; document.getElementById("UpdateuReferenceID").innerHTML = x[1].innerHTML; document.getElementById("myCanvassPRFCode").value = x[1].innerHTML; document.getElementById("UpdatePRFReferenceNumber").value = x[1].innerHTML; document.getElementById("ItemRecordID").value = x[0].innerHTML; showActionViewDelete(); } //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