File manager - Edit - /home/autoph/public_html/connect/home/PRF_ReadyForPO.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 = $refYear.''.$refMonth.''.$refMinute.''.$refSecond.''.$uniqueRefID; $POCRE = $user_data['POCRE']; //PO Creation if($POCRE==0){ ?> <script type="text/javascript"> Swal.fire('Access Denied. You are not allowed to access this page.') exit; </script> <?php exit; } ?> <!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 id='topMessage' style='border-radius:5px;z-index:9999999999999;position:absolute; top:10px;left:10px;width:400px;height:80px;background:yellow;border:solid 2px #efdd01 ;display:none;padding:20px;font-family:Yu Gothic Light;font-size:1.2vw;color:black'> Your request has been processed... </div> <div class='NewPRFHeader'> <p class='PRFBodyTitle'>📝 READY FOR PO CREATION</p> </div> <!--########################## MAIN TABLE WINDOW ############################################--> <!--########################################################################################################--> <div class='NewPRFBody'> <input type='hidden' id='userActiveID' value='<?php echo $uniqueRefID;?>'> <div class='NewPRFBodyMenu'> <div class='searchDIVA'> <b class='BodyTopMenu' onclick="javascript:showPOForm();">📑 Create New PO </b> <!--<b class='BodyTopMenu' id='LoadNewPRFForm' onclick='showActionSlipForm()'>➕ New Purchase </b> <b class='BodyTopMenu'>📠 Print </b> <b class='BodyTopMenu' onclick="javascript:getInfoCode(this);">⬇ Export</b>--> </div> <!--<div class='searchDIVB'> <input type='text' id='SearchCanvass' placeholder='Search Record.' class='textSearch' style='width:70%;margin:0px;border:1px solid lightgray;'> <button id='goSearchCanvass' class='searchButton' style='width:25%'> 🔍 Search</button> </div> --> </div> <div id='mainTable' class='PRFTableBody'> <div style='width:100%;height:auto;background:white'> <table> <thead> <th style='width:5%'>REC.#</th> <th style='width:10%'>PRF #</th> <th style='width:15%'>COMPANY</th> <th style='width:20%'>VENDOR</th> <th style='width:20%'>ITEM DESCRIPTION</th> <th style='width:5%'>QTY</th> <th style='width:10%'>UNIT AMOUNT</th> <th style='width:10%'>TOTAL AMOUNT</th> <th style='width:5%'>VIEW</th> </thead> </table> </div> <div style='width:100%;height:240px'> <table> <?php //######################################PAGINATION####################################################### //######################################PAGINATION####################################################### ////$totalRows = mysql_result(mysql_query("SELECT COUNT(id) FROM `prf_suppliers` WHERE `deleted`=0 "),0); //$noOfRecordPerPage = mysql_result(mysql_query("SELECT `page_count` FROM `asa_versioning_db` WHERE 1"),0); //$myPageCount = ceil($totalRows / $noOfRecordPerPage); //$offSet = 0;//($myPageCount-1) * $noOfRecordPerPage; //echo "<input type='hidden' id='MyPageCount' value='".$myPageCount."'>"; //echo "<input type='hidden' id='MyRowCount' value='".$totalRows."'>"; //echo "<input type='hidden' id='myOffSet' value='".$offSet."'>"; //echo "<input type='hidden' id='recordPerPage' value='".$noOfRecordPerPage."'>"; //####################################################################################################### //####################################################################################################### //$getItemHdr = mysql_query("SELECT * FROM `prf_request_detl` WHERE `awarded`= 1 AND `deleted`=0 AND `execom_approval_ts`!= '' AND `for_execom_canvass_approval`=1 AND `po_code`='' ORDER BY `execom_approval_ts` DESC LIMIT $offSet, $noOfRecordPerPage "); $getItemHdr = mysql_query("SELECT * FROM `prf_request_detl` WHERE `awarded`= 1 AND `deleted`=0 AND `execom_approval_ts`!= '' AND `for_execom_canvass_approval`=1 AND `po_code`='' ORDER BY `execom_approval_ts` DESC"); while($row=mysql_fetch_array($getItemHdr)){ $regHDRcode=$row['header_ref_code']; $regCat=$row['category_id']; $vendorID = $row['award_to_vendor_id']; $vendorName = mysql_result(mysql_query("SELECT `sup_name` FROM `prf_suppliers` WHERE `id`='$vendorID'"),0); $regCatName =mysql_result(mysql_query("SELECT `description` FROM `prf_expensecategory` WHERE `id`='$regCat'"),0); $reqByID = mysql_result(mysql_query("SELECT `request_by` FROM `prf_request_hdr` WHERE `reference_code`='$regHDRcode'"),0); $reqCompID=$row['comp_id']; $dateNeeded = mysql_result(mysql_query("SELECT `date_needed` FROM `prf_request_hdr` WHERE `reference_code`='$regHDRcode'"),0); $reqCompName = mysql_result(mysql_query("SELECT `comp_name` FROM vts_company WHERE comp_id='$reqCompID'"),0); $reqByFName = mysql_result(mysql_query("SELECT u_fname FROM vts_users WHERE u_id='$reqByID'"),0); $reqByLName = mysql_result(mysql_query("SELECT u_lname FROM vts_users WHERE u_id='$reqByID'"),0); $fileCode = mysql_result(mysql_query("SELECT `file_code` FROM `prf_uploadedcanvass` WHERE `id`='".$row['approved_proposal_code']."'"),0); ?><tr onclick="javascript:getInfo(this);" id='LoadUserApprovedCanvassItem' ><?php echo "<td style='width:5%'>".$row['id']."</td>"; echo "<td style='width:10%'>".$row['header_ref_code']."</td>"; echo "<td style='width:15%'>".$reqCompName."</td>"; echo "<td style='width:20%'>".$vendorName."</td>"; echo "<td style='width:20%'>".$row['item_description']."</td>"; echo "<td style='width:5%'>".$row['approved_qty']."</td>"; echo "<td style='width:10%'>".$row['approved_amount']."</td>"; echo "<td style='width:10%;padding:3px'>"; $tAmountX = $row['approved_amount'] * $row['approved_qty']; echo number_format($tAmountX,2,'.',','); echo"</td>"; echo "<td style='width:5%;text-align:center'><a href='https://www.autohub.ph/connect/home/FILES/canvass/".$fileCode."' target='_blank'>📋</a></td>"; echo "</tr>"; } ?> </table> </div> <!--######################################## PAGINATION ############################################--> <!--######################################## PAGINATION ############################################ <div style='margin-top:50px;background:white;width:100%;padding:0px;float:left;height:70px;padding:30px'> <center> <button onclick="javascript:pageLess();" id='pageCountViewBack' class='paginationBack'>◀ Back</button> <input type='text' disabled id='pageCountView' value ="Page 1 of <?php echo $myPageCount;?>" class='paginationBox' style='width:200px;margin-left:0px'> <input type='hidden' id='pageCount' value='1' class='paginationBox'> <button onclick="javascript:pageAdd();" id='pageCountViewNext' class='paginationNext'>Next ▶ </button> </center> </div> --> </div> <!--######################################## PAGINATION ############################################--> <!--######################################## PAGINATION ############################################--> </div> </div> <!--########################## POPUP ACTION WINDOW FOR DELETE AND VIEW DETAILS ############################################--> <!--########################################################################################################--> <div id="showPOPostingConfirmationForm" class="PopUpActionWindow" style='position:fixed;'> <div class='PopUpWindowTitle'> 🪧 CONFIRM POST ACTION <div class='PopUpWindowClose'> <b onclick="javascript:hidePOConfirmForm(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'> Are you sure you want to POST this Purchase Order? </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' >📑 View Details</button> <button onclick="javascript:showUpdatePRFForm(this);" id='LoadCanvassSheet' class='PopUpLowerButtonL' >🗒 Canvass Sheet</button> </div> </td> </tr> </table> </div> <!--###################################################################################################################################--> <!--###################################################################################################################################--> <div id="showGenCanvassForm" class="purchaseOrderForm" style='position:fixed;background:white'> <div class='PopUpWindowTitle'> 🪧 NEW PURCHASE ORDER <div class='PopUpWindowClose'> <b onclick="javascript:hidePOForm(this);" style='font-weight:bold'> ✕ </b> </div> </div> <div style='float:left;width:99%;height:50px;background:lightgray;padding:0px;margin:5px'> <button id='PostNewPO' class='DelPopUpLowerButtonL' style='width:30%;float:right;padding-left:0px;margin:10px'>📩 POST PURCHASE ORDER</button> <div style='background:transparent;float:left;width:400px;margin:2px;text-align:center;padding:3px;border:0px solid gray;border-radius:10px'> <b style='float:left;width:30%;color:black;padding-top:15px'>PO NUMBER</b> <input type='text' id='myPONumber' disabled style='width:60%;margin-left:0px;'> <abbr title="Get PO Number"><button id='getPONumber' style='padding:3px;float:right;margin-top:8px;'>🔃</button></abbr> </div> </div> <input type='hidden' id='SeletedPRFItemID' class='TableBottomLabel' style='border:0px;text-align:left' disabled> <!--###################################################################################################################################aee--> <div id='poInformationX' style='padding:2px;width:100%;height:90px;background:white;'> <div style='background:WHITE;float:left;width:100%;padding:5px;font-family:Yu Gothic Light;color:gray;font-size:14px;color:blue' id='userItemDesc'> <div id='poInformation' style='padding:0px;width:100%;height:103px;background:white'> <div style='border:0px solid lightgray;float:left;width:29%;padding:2px'> <b style='padding:3px;font-family:Yu Gothic Light;font-size:14px'>Select Company:</b> <select id='poByCompany' style='margin-bottom:12px;' onchange="showItemByCompany();"> <option value='0'>-- Select Company --</option> <?php $getCompanyList = mysql_query("SELECT * FROM `vts_company` WHERE `comp_status`=1 ORDER BY `comp_name` ASC"); while($row=mysql_fetch_array($getCompanyList)){ echo "<option value='".$row['comp_id']."'>".strtoupper($row['comp_name']."-".$row['comp_code'])."</option>"; } ?> </select> <label for="notifyReq" style="font-family:Yu Gothic Light;font-size:11px;font-weight:normal;padding-top:10px"> <input type="checkbox" checked id="notifyReq" name="notifyReq" value="Yes" style='font-size:10px'> Notify the requesting part </label> </div> <div style='border:0px solid lightgray;float:left;width:29%;padding:2px'> <b style='padding:3px;font-family:Yu Gothic Light;font-size:14px'>Select Vendor:</b> <select id='poToVendor' onchange="showActiveProposal();" style='margin-bottom:12px;'> <option value='0'>-- Select Vendor --</option> </select> <label for="notifyVendor" style="font-family:Yu Gothic Light;font-size:11px;font-weight:normal;padding-top:10px"> <input type="checkbox" id="notifyVendor" name="notifyVendor" value="No" style='font-family:Yu Gothic Light;font-size:11px'> If PO is approve, notify the vendor </label> </div> <div class='PRFdropItemSelection' style='width:14%;background:transparent;padding-bottom:0px;padding-top:0px'> <b style='padding:3px;font-family:Yu Gothic Light;font-size:14px'>Terms:</b> <select id='termsOfPayment' style='margin-bottom:12px;margin-top:2px'> <?php echo "<option value='0'>-Default-</option>"; $getCompanyAccess = mysql_query("SELECT * FROM `prf_termsofpayment` WHERE `deleted`=0 ORDER BY id ASC"); while($row=mysql_fetch_array($getCompanyAccess)){ echo "<option value='".$row['terms']."'>".$row['terms']." ".$row['sched']."</option>"; } ?> </select> </div> <div style='border:0px solid lightgray;float:left;width:28%;padding:2px'> <b style='padding:3px;font-family:Yu Gothic Light;font-size:14px'>Instructions:</b> <textarea rows='2' id='myInstructions' style='width:100%'></textarea> </div> </div> </div> </div> <!--###################################################################################################################################--> <div id='activeItemListX' style='padding:2px;width:100%;height:190px;background:white;'> <div style='background:white;float:left;width:100%;padding:3px;font-family:Yu Gothic Light;color:blue;font-size:14px;color:blue' id='userItemDesc'> <b style='float:left;font-family:Yu Gothic Light;font-size:14px;font-weight:normal;color: #2d2d2c ;padding:1px;'> 📖 Active Items (Filtered base on selected company and vendor)</b> <input type='date' id='deliveryDate' style='float:right;width:150px;padding:3px;margin-left:0px;margin-right:5px;margin-bottom:3px'> <b style='float:right;font-family:Yu Gothic Light;font-size:14px;font-weight:normal;color: #2d2d2c ;padding:1px;background:yellow;padding-left:50px;padding-right:25px;margin-right:0px'>Delivery Date: </b> <div style='float:left;background:white;padding:2px;width:100%;height:50px;margin-top:5px'> <table> <thead> <th style='width:5%;padding:3px'>REC.#</th> <th style='width:10%;padding:3px'>PRF #</th> <th style='width:15%;padding:3px'>COMPANY</th> <th style='width:20%;padding:3px'>VENDOR</th> <th style='width:20%;padding:3px'>ITEM DESCRIPTION</th> <th style='width:5%;padding:3px'>QTY</th> <th style='width:10%;padding:3px'>UNIT AMOUNT</th> <th style='width:10%;padding:3px'>TOTAL AMOUNT</th> <th style='width:5%;padding:3px'>VIEW</th> </thead> </table> </div> <div id='activeItemList' style='background: #ebebe6 ;padding:2px;width:100%;height:150px;margin-top:5px;overflow:auto'> </div> <!--###################################################################################################################################--> <!--###################################################################################################################################--> <div id="myActionForm" class="DelPopUpActionWindow" style='background:white;height:340px'> <div class='PopUpWindowTitle'> 🪧 Create Purchase Order <div class='PopUpWindowClose'> <b onclick="javascript:hideActionForm();" style='font-weight:bold'> ✕ </b> </div> </div> <div style='background:white;padding:10px;width:100%;margin-top:2px;text-align:center;padding-bottom:5px;padding-top:0px;height:220px'> <p style='font-family:Yu Gothic Light;font-size:.8vw;color: #32322f ;text-align:left'>The system will create an open PO after insert an item. Click POST PO to proceed with the PO approval. <div style='padding:3px;width:100%;text-align:left;font-family:Yu Gothic Light;font-size:12px;color:red;height:140px;background:#ffffff;border:0px solid #b8b4b3;margin-top:0px;overflow:auto;'> <b style='margin:0px;padding:0px;font-family:Yu Gothic Light;color:blue;font-size:12px;'>ITEM DESCRIPTION:</b> <input type='text' id='selectedItem' style='width:100%;padding:5px;font-family:Yu Gothic Light;font-size:12px;height:50px;word-wrap: break-word'> </div> </p> </div> <div style='padding:20px;width:100%;margin-top:0px;padding-top:5px;'> <button id='addToPORequest' class='DelPopUpLowerButtonR' style='padding:3px;font-family:Yu Gothic Light;width:100%;'>INSERT ITEM TO P.O</button> </div> </div> <!--###################################################################################################################################--> <!--###################################################################################################################################--> <div id="myActionFormDelPOed" class="DelPopUpActionWindow" style='background:white;height:340px'> <div class='PopUpWindowTitle'> 🪧 Update Purchase Order <div class='PopUpWindowClose'> <b onclick="javascript:hideDelPOedItem();" style='font-weight:bold'> ✕ </b> </div> </div> <div style='background:white;padding:10px;width:100%;margin-top:2px;text-align:center;padding-bottom:5px;padding-top:0px;height:230px'> <p style='font-family:Yu Gothic Light;font-size:1vw;color: #32322f ;text-align:left'>Selected Item will be removed from the PO.<br><br>Selected Item:<br> <b style='width:100%;text-align:center;font-family:Yu Gothic Light;font-size:12px;' id='selectedItemDel'>adfas</b></p> </div> <div style='padding:20px;width:100%;margin-top:0px;padding-top:5px;'> <button id='addToPORequestDelete' style='padding:5px;font-family:Yu Gothic Light;font-size:1vw;width:100%;margin-left:0%'>Remove Item</button> </div> </div> </div> </div> <input type='hidden' id='itemID'> <input type='hidden' id='itemRefCode'> <!--###################################################################################################################################--> <div id='SelectedItemListX' style='padding:2px;width:100%;background:white;height:220px'> <div style='height:20px;background:white;float:left;width:100%;padding:2px;font-family:Yu Gothic Light;color:gray;font-size:14px;color:blue' id='userItemDesc'> <b style='font-family:Yu Gothic Light;font-size:1vw;font-weight:normal;color: #2d2d2c ;padding:2px;'>📃 Selected Item/s: <div style='width:100%;height:50px;background:white'> <table> <thead> <th style='width:5%;padding:3px'>REC.#</th> <th style='width:10%;padding:3px'>PRF #</th> <th style='width:15%;padding:3px'>COMPANY</th> <th style='width:20%;padding:3px'>VENDOR</th> <th style='width:20%;padding:3px'>ITEM DESCRIPTION</th> <th style='width:5%;padding:3px'>QTY</th> <th style='width:10%;padding:3px'>UNIT AMOUNT</th> <th style='width:10%;padding:3px'>TOTAL AMOUNT</th> <th style='width:5%;padding:3px'>VIEW</th> </thead> </table> </div> <div id='SelectedItemList' style='padding:0px;width:100%;height:150px;background: #ebebe6 ;overflow:auto'> </div> </div> </div> <!--###################################################################################################################################--> </div> <!--###################################################################################################################################--> <!--###################################################################################################################################--> </body> </html> <!--<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>--> <!--<script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.js"></script> --> <!-- add jquery https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> <script type="text/javascript" src="https://code.jquery.com/jquery-3.6.0.js"></script> <script language="javascript" type="text/javascript"> $(document).ready(function(){ $("#getPONumber").click(function(){ ShowUploadBar(); $.ajax({ url: "prf_getPONumber.php", type: "POST", async: true, data: { "done": 1 }, success: function(d){ $("#myPONumber").val(d); document.getElementById("getPONumber").disabled = true; ShowUploadBar(); } }) }); <!--###################################################################################################################################--> <!--######################################################################PRF_POST_PO.php#############################################################--> $("#PostNewPO").click(function(){ var itemRefCode = $("#itemRefCode").val(); var myPONumber = $("#myPONumber").val(); //alert(myPONumber); //exit(); ShowUploadBar(); $.ajax({ url: "PRF_POST_PO.php", type: "POST", async: true, data: { "itemRefCode": itemRefCode, "myPONumber": myPONumber, "done": 1 }, success: function(d){ showtopMessage(); updateForPOCreation(); ShowUploadBar(); hidePOForm(); $("#mainTableSub").html(d); } }) }); <!--###################################################################################################################################--> <!--######################################################################PRF_POST_PO.php#############################################################--> $("#addToPORequest").click(function(){ var itemID = $("#itemID").val(); var itemRefCode = $("#itemRefCode").val(); var termsOfPayment = $("#termsOfPayment").val(); var myInstructions = $("#myInstructions").val(); var notifyReq = $("#notifyReq").val(); var notifyVendor = $("#notifyVendor").val(); var poToVendor = $("#poToVendor").val(); var poByCompany = $("#poByCompany").val(); var myPONumber = $("#myPONumber").val(); var deliveryDate = $("#deliveryDate").val(); var selectedItem = $("#selectedItem").val(); //alert(myPONumber); //exit; if(myInstructions==''){ alert('ERROR: Please don\'t forget to type instructions or notes to the vendor.'); exit; } if(deliveryDate==''){ alert('ERROR: Delivery Date is required'); exit; } if(poToVendor==''){ alert('ERROR: No vendor is selected.'); exit; } if(myPONumber==''){ alert('ERROR: PO Number is missing.'); exit; } ShowUploadBar(); $.ajax({ url: "PRF_POInsertItemToOpenPO.php", type: "POST", async: true, data: { "itemID": itemID, "termsOfPayment": termsOfPayment, "itemRefCode": itemRefCode, "selectedItem": selectedItem, "deliveryDate": deliveryDate, "notifyReq": notifyReq, "notifyVendor": notifyVendor, "poToVendor": poToVendor, "poByCompany": poByCompany, "myPONumber": myPONumber, "myInstructions": myInstructions, "done": 1 }, success: function(d){ //$('#selectedItem').val(''); showActiveProposal(); showPoedItems(); ShowUploadBar(); document.getElementById("getPONumber").disabled = true; document.getElementById("poByCompany").disabled = true; document.getElementById("poToVendor").disabled = true; document.getElementById("myInstructions").disabled = true; $("#activeItemList").html(d); } }) }); //============================================================================================================================= //============================================================================================================================= $("#addToPORequestDelete").click(function(){ var itemID = $("#itemID").val(); var itemRefCode = $("#itemRefCode").val(); var myPONumber = $("#myPONumber").val(); //alert(itemID); //exit; if(myPONumber==''){ alert('ERROR: PO Number is missing.'); exit; } ShowUploadBar(); $.ajax({ url: "PRF_PODeleteToOpenPO.php", type: "POST", async: true, data: { "itemID": itemID, "myPONumber": myPONumber, "itemRefCode": itemRefCode, "done": 1 }, success: function(d){ //$('#selectedItem').val(''); $("#activeItemList").html(d); showActiveProposal(); ShowUploadBar(); hideDelPOedItem(); reloadItemForPO(); showActiveProposal(); showPoedItems(); } }) }); //============================================================================================================================= //============================================================================================================================= $("#createPurchaseOrderForApproval").click(function(){ var notifyReq = $("#notifyReq").val(); var notifyVendor = $("#notifyVendor").val(); var poToVendor = $("#poToVendor").val(); var poByCompany = $("#poByCompany").val(); var myPONumber = $("#myPONumber").val(); //alert(canvassID); //exit; if(AwardItemID==''){ alert('ERROR: No item was selected'); exit; } if(canvassID==''){ alert('ERROR: Please select proposal to continue...'); exit; } if(AwardItemQty==''){ alert('ERROR: Invalid Quantity'); exit; } if(AwardItemAmount==''){ alert('ERROR: Invalid Amount'); exit; } ShowUploadBar(); $.ajax({ url: "PRF_EXECOM_AwardToVendor.php", type: "POST", async: true, data: { "AwardItemID": AwardItemID, "canvassID": canvassID, "AwardItemAmount": AwardItemAmount, "AwardItemQty": AwardItemQty, "done": 1 }, success: function(d){ $("#mainTableSub").html(d); hideConfirmedItem(); ShowUploadBar(); UpdateExecomForApprovalCount(); } }) }); //============================================================================================================================= //============================================================================================================================= }); //============================================================================================================================= //============================================================================================================================= function showActiveVendors(){ var poByCompany = $("#poByCompany").val(); //alert(poByCompany); //exit; ShowUploadBar(); $.ajax({ url: "PRF_LoadActiveVendorslBasedOnSelectedCompany.php", type: "POST", async: true, data: { "poByCompany": poByCompany, "done": 1 }, success: function(d){ $("#poToVendor").html(d); ShowUploadBar(); } }) } //============================================================================================================================= //==================================.php=========================================================================================== function reloadItemForPO(){ ShowUploadBar(); $.ajax({ url: "PRF_ReLoadForPOItems.php", type: "POST", async: true, data: { "done": 1 }, success: function(d){ $("#mainTableSub").html(d); ShowUploadBar(); } }) } //============================================================================================================================= function showItemByCompany(){ var poByCompany = $("#poByCompany").val(); //alert(poByCompany); //exit; ShowUploadBar(); $.ajax({ url: "PRF_LoadApprovedItemByCompanyForPO.php", type: "POST", async: true, data: { "poByCompany": poByCompany, "done": 1 }, success: function(d){ showActiveVendors(); $("#activeItemList").html(d); ShowUploadBar(); } }) } //==================================.php=========================================================================================== function showActiveProposal(){ var poByCompany = $("#poByCompany").val(); var loadActiveProposal = $("#poToVendor").val(); //alert(poByCompany); //alert(loadActiveProposal); //exit; ShowUploadBar(); $.ajax({ url: "PRF_LoadProposalBasedOnSelectedCompany.php", type: "POST", async: true, data: { "poByCompany": poByCompany, "loadActiveProposal": loadActiveProposal, "done": 1 }, success: function(d){ ShowUploadBar(); $("#activeItemList").html(d); //showPOedItemPerSelectedVendorAndCompany(); reloadItemForPO(); } }) } //============================================================================================================================= function showPoedItems(){ var poByCompany = $("#poByCompany").val(); var poToVendorID = $("#poToVendor").val(); var myPONumber = $("#myPONumber").val(); //alert(poByCompany); //alert(poToVendorID); //alert(myPONumber); //exit; ShowUploadBar(); $.ajax({ url: "PRF_LoadPOedItemByVendor.php", type: "POST", async: true, data: { "poByCompany": poByCompany, "myPONumber": myPONumber, "poToVendorID": poToVendorID, "done": 1 }, success: function(d){ //alert('Pass 1'); $("#SelectedItemList").html(d); ShowUploadBar(); hideActionForm(); //alert('Pass 2'); } }) } //============================================================================================================================= function hidetopMessage(){ $("#topMessage").fadeOut(5000); } function showtopMessage(){ $("#topMessage").fadeIn(100); hidetopMessage(); } function hidePOConfirmForm(){ $("#showPOPostingConfirmationForm").fadeOut(500); } function showPOConfirmForm(){ $("#showPOPostingConfirmationForm").fadeIn(500); } function hidePOForm(){ $("#showGenCanvassForm").fadeOut(500); document.getElementById("poByCompany").disabled = false; document.getElementById("poToVendor").disabled = false; document.getElementById("myInstructions").disabled = false; document.getElementById("myInstructions").value = ''; document.getElementById("myPONumber").value = ''; }; function showPOForm(){ document.getElementById("poByCompany").disabled = false; document.getElementById("poToVendor").disabled = false; document.getElementById("myInstructions").disabled = false; document.getElementById("myInstructions").value = ''; document.getElementById("poByCompany").value = ''; document.getElementById("poToVendor").value = ''; document.getElementById("myInstructions").value = ''; //document.getElementById("myPONumber").value = ''; $("#showGenCanvassForm").fadeIn(500); } function getInfo(row) { var x=row.cells; document.getElementById("AwardItemID").value = x[0].innerHTML; document.getElementById("SeletedPRFItemID").value = x[0].innerHTML; document.getElementById("AwardItemDesc").value = x[3].innerHTML; } //================================================================================= //================================================================================= $("#pageCountViewNext").click(function(){ var MyPageCount = $("#MyPageCount").val(); var MyRowCount = $("#MyRowCount").val(); var myOffSet = $("#myOffSet").val(); var CurrentpageCount = $("#pageCount").val(); var recordPerPage = $("#recordPerPage").val(); //alert(CurrentpageCount); //exit; ShowUploadBar(); $.ajax({ url: "prf_loadForPOItems.php", type: "POST", async: true, data: { "MyPageCount": MyPageCount, "myOffSet": myOffSet, "MyRowCount": MyRowCount, "CurrentpageCount": CurrentpageCount, "recordPerPage": recordPerPage, "done": 1 }, success: function(d){ ShowUploadBar(); $("#mainTableSub").html(d); } }) }); //================================================================================= //================================================================================= $("#pageCountViewBack").click(function(){ var MyPageCount = $("#MyPageCount").val(); var MyRowCount = $("#MyRowCount").val(); var myOffSet = $("#myOffSet").val(); var CurrentpageCount = $("#pageCount").val(); var recordPerPage = $("#recordPerPage").val(); //alert(CurrentpageCount); //exit; ShowUploadBar(); $.ajax({ url: "prf_loadForPOItems.php", type: "POST", async: true, data: { "MyPageCount": MyPageCount, "myOffSet": myOffSet, "MyRowCount": MyRowCount, "CurrentpageCount": CurrentpageCount, "recordPerPage": recordPerPage, "done": 1 }, success: function(d){ ShowUploadBar(); $("#mainTableSub").html(d); } }) //================================================================================= //================================================================================= }); //====================================================================================================== function updateForPOCreation(){ $.ajax({ url: "PRF_UpdateForPOCreation.php", type: "POST", async: true, data: { "done":1 }, success: function(d){ $("#forPOCreation").html(d); } }) } </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings