File manager - Edit - /home/autoph/public_html/connect/home/PRF/PRF_ACTIVE_SUPPLIERS_PO.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; ?> <!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> <style> .aprbutton{ float:right; width:100%; border-radius:5px; font-family:Yu Gothic Light; font-size:14px; color: #ffffff; font-weight:normal; margin:3px; cursor:pointer; background:#ef4901; padding:5px; border:2px solid white; margin-bottom:5px; } .aprbutton:hover{ float:right; width:100%; border-radius:5px; font-family:Yu Gothic Light; font-size:14px; color:#ffffff; font-weight:bold; margin:3px; margin-bottom:5px; cursor:pointer; background:#ef2901; padding:5px; border:2px solid white; } .popup { position: fixed; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); height:200px; padding:10px; border-radius:10px; width:350px; background:#fff; border:1px solid red; display:none; } .buttonOTP{ padding:10px; border-radius:5px;border:1px solid #f11806;background:#f0670e;color:white;width:80%;margin-left:30px;margin-right:30px;font-size:14px } .buttonOTP:hover{ padding:10px; border-radius:5px;border:1px solid #f11806;background:#f11806;color:white;font-weight:bold;width:80%;margin-left:30px;margin-right:30px;font-size:14px; } .buttonOTPX{ float:left;padding:5px;border-radius:5px;border:1px solid #f11806;background:#fff;color:white;margin-top:6px } .buttonOTPX:hover{ float:left;padding:5px;border-radius:5px;border:1px solid #f11806;background:#fff;color:white;font-weight:bold } </style> <body> <div id='topMessage' style='border-radius:5px;z-index:9999999999999;position:absolute; top:10px;left:10px;width:400px;height:60px;background:yellow;border:solid 2px #efdd01 ;display:none;padding:15px;font-family:Yu Gothic Light;font-size:1vw;color:black'> Record has been saved. </div> <div id='confirmStockReceiving' style='border-radius:5px;z-index:9999999999999;position:absolute; top:105px;left:130px;width:400px;height:500px;background: #fff ;border:solid 1px #000 ;display:none;padding:5px;font-family:Yu Gothic Light;font-size:1vw;color:black'> <div style='width:100%;height:10%;float:left;padding:5px;padding-top:0px;background:black'> <button class='buttonOTPX' style='width:80%;font-family:Yu Gothic Light;font-size:20px;font-weight:bold;color:white;text-align:left;border:0px;background:transparent'>STOCK RECEIVING</button> <button id='sendOTPXXX' onclick="javascript:hideConfirmationBox();" class='buttonOTPX' style='width:10%;float:right'>❌</button> </div> <div style='float:left;width:100%;background:white;padding:10px;height:90%;border:1px solid lightgray'> <div style='padding:5px;float:left;width:50%;height:70px;font-family:Yu Gothic Light;font-size:12px;color:black;font-weight:normal;border:0px solid gray;background:transparent'> <p style='font-family:Yu Gothic Light;font-size:12px;color:black;;font-weight:normal;width:100%;float:left;margin-bottom:0px;padding:0px'>DR #:</p> <input type='text' id='drNo' style='padding:5px;width:100%;margin:0px;text-align:center;font-family:Yu Gothic Light;font-size:14px;'> </div> <div style='padding:5px;float:left;width:50%;height:70px;font-family:Yu Gothic Light;font-size:12px;color:black;font-weight:normal;border:0px solid gray;background:transparent'> <p style='font-family:Yu Gothic Light;font-size:12px;color:black;;font-weight:normal;width:100%;float:left;margin-bottom:0px;padding:0px'>INVOICE #:</p> <input type='text' id='invoiceNo' style='padding:5px;width:100%;margin:0px;text-align:center;font-family:Yu Gothic Light;font-size:14px;'> </div> <p style='font-family:Yu Gothic Light;font-size:12px;color:black;;font-weight:normal;width:100%;float:left;margin-bottom:0px'>ITEM DESCRIPTION:</p> <div id='itemDesc' style='padding:5px;float:left;width:100%;height:50px;font-family:Yu Gothic Light;font-size:12px;color:black;font-weight:bold;border:1px solid gray;background: #e4dddb ;overflow:auto'>Aasfasfsaf asfa sfas dsaf asdf fsad asdfsadfasfdasfasdffasd asdfasfsadf </div> <p style='font-family:Yu Gothic Light;font-size:12px;color:black;;font-weight:normal;width:100%;float:left;margin-bottom:0px'>NAME OF SUPPLIER:</p> <div id='supplierName' style='padding:5px;float:left;width:100%;height:40px;font-family:Yu Gothic Light;font-size:12px;color:black;font-weight:bold;border:1px solid gray;background: #e4dddb '> </div> <div style='padding:5px;float:left;width:30%;height:70px;font-family:Yu Gothic Light;font-size:12px;color:black;font-weight:normal;border:0px solid gray;background:transparent'> <p style='font-family:Yu Gothic Light;font-size:12px;color:black;;font-weight:normal;width:100%;float:left;margin-bottom:0px;padding:0px'>ORDERED QTY:</p> <input type='text' id='orderedQTY' disabled style='background:#e4dddb;padding:5px;width:100%;margin:0px;text-align:center;font-family:Yu Gothic Light;font-size:14px;font-weight:bold'> </div> <div style='padding:5px;float:left;width:30%;height:70px;font-family:Yu Gothic Light;font-size:12px;color:black;font-weight:normal;border:0px solid gray;background:transparent'> <p style='font-family:Yu Gothic Light;font-size:12px;color:black;;font-weight:normal;width:100%;float:left;margin-bottom:0px;padding:0px'>RECEIVED QTY:</p> <input type='text' id='receivedQTY' style='padding:5px;width:100%;margin:0px;text-align:center;font-family:Yu Gothic Light;font-size:14px;font-weight:bold'> </div> <div style='padding:5px;float:left;width:40%;height:70px;font-family:Yu Gothic Light;font-size:12px;color:black;font-weight:normal;border:0px solid gray;background:transparent'> <p style='font-family:Yu Gothic Light;font-size:12px;color:black;;font-weight:normal;width:100%;float:left;margin-bottom:0px;padding:0px'>UNIT PRICE:</p> <input type='text' id='unitPrice' style='padding:5px;width:100%;margin:0px;text-align:right;paddding-right:20px;font-family:Yu Gothic Light;font-size:14px;font-weight:bold'> </div> <div style='padding:30px;float:left;width:100%;height:130px;font-family:Yu Gothic Light;font-size:12px;color:black;font-weight:normal;border:0px solid gray;background:transparent;padding-top:50px'> <button onclick="javascript:hideConfirmationBox();" class='PopUpLowerButtonR' style='width:40%;text-align:center'>📩 CLOSE</button> <button id='confirmDelivery' class='PopUpLowerButtonR' style='width:60%;text-align:center;border-right:1px solid #706d6c'>📩 CONFIRM</button> </div> </div> </div> <div class='NewPRFHeader'> <p class='PRFBodyTitle'>📝 LIST OF ACTIVE PURCHASE ORDER (Waiting for Supplier's Updates)</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' onclick="javascript:showPOForm();">📑 Create New PO </b> <b class='BodyTopMenu'>📠 Print </b> <b class='BodyTopMenu' onclick="javascript:getInfoCode(this);">⬇ Export</b> --> </div> <div class='searchDIVB'> <input type='hidden' id='userActiveID' value='<?php echo $uniqueRefID;?>'> <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:33px;background:white'> <table> <thead> <th style='width:5%'>REC.#</th> <th style='width:10%'>PO NUMBER</th> <th style='width:8%'>DATE POSTED</th> <th style='width:10%'>COMPANY</th> <th style='width:10%'>DEALER</th> <th style='width:21%'>VENDOR</th> <th style='width:5%'>TERMS</th> <th style='width:10%'>STATUS</th> <th style='width:15%'>REMARKS</th> <th style='width:3%'>STAT</th> <th style='width:3%'>...</th> </thead> </table> </div> <div class='PRFTableItems' id='mainTableSub' style='background:white'> <table> <?php //######################################PAGINATION####################################################### //######################################PAGINATION####################################################### //$totalRows = mysql_result(mysql_query("SELECT COUNT(id) FROM `prf_purchase_order` WHERE `po_status`=4"),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."'>"; //####################################################################################################### //####################################################################################################### //SELECT COUNT(id) FROM `prf_purchase_order` WHERE `po_status`= 1 //$getItemHdr = mysql_query("SELECT * FROM `prf_purchase_order` WHERE `po_status`= 4 ORDER BY `id` DESC LIMIT $offSet, $noOfRecordPerPage "); $getItemHdr = mysql_query("SELECT * FROM `prf_purchase_order` WHERE `po_status`= 4 ORDER BY `id` DESC "); while($row=mysql_fetch_array($getItemHdr)){ $vendorID = $row['vendor_id']; $vendorName = mysql_result(mysql_query("SELECT `sup_name` FROM `prf_suppliers` WHERE `id`='$vendorID'"),0); $reqCompID=$row['comp_id']; $reqDealID=$row['dealer_id']; $reqCompName = mysql_result(mysql_query("SELECT `comp_code` FROM vts_company WHERE comp_id='$reqCompID'"),0); $reqDealName = mysql_result(mysql_query("SELECT `deal_code` FROM vts_dealerships WHERE deal_id='$reqDealID'"),0); $myTokenID = $row['token']; $poNote = $row['delivery_note']; if($poNote ==='Full Delivery'){ $deliverNote = "<b style='font-family:Yu Gothic Light;font-weight:bold;color:blue'>FD</b>"; $pdColor ='#ddfc9f'; }else{ $deliverNote = "<b style='font-family:Yu Gothic Light;font-weight:bold;color:blue'>PD</b>"; $pdColor ='#fccaba'; } ?><tr onDblClick="javasctipt:showPOActionaForm();" onclick="javasctipt:getInfo(this);" id='LoadUserApprovedCanvassItem' ><?php echo "<td style='width:5%'>".$row['id']."</td>"; echo "<td style='width:10%'>".$row['po_number']."</td>"; echo "<td style='width:8%'>".$row['date_posted']."</td>"; echo "<td style='width:10%'>".$reqCompName."</td>"; echo "<td style='width:10%'>".$reqDealName."</td>"; echo "<td style='width:21%'>".$vendorName."</td>"; echo "<td style='width:5%'>".$row['terms']." Days</td>"; echo "<td style='width:10%'>"; $poStat = mysql_result(mysql_query("SELECT `po_status` FROM `prf_po_status` WHERE `po_code`='".$row['po_status']."'"),0); echo $poStat; echo"</td>"; echo "<td style='width:15%'>".$row['remarks']."</td>"; echo "<td style='width:3%;background:$pdColor;text-align:center;'>"; echo $deliverNote; echo"</td>"; echo "<td style='width:3%;background:transaparent;text-align:center;'> <a href='poapr.php?id=".$row['po_number']."&uid=".$uniqueRefID."&token=".$myTokenID."' target='_Blank' styl='font-family:Yu Gothic Light;font-size:14px;font-weight:normal;color:red;'>📑</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> <!--########################## POPUP ACTION WINDOW FOR DELETE AND VIEW DETAILS ############################################--> <!--########################################################################################################--> <div id="showPOPostingConfirmationForm" class="PopUpActionWindow"> <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="POActionaForm" class="purchaseOrderForm" style='background:white'> <div class='PopUpWindowTitle'> 🪧 ACTIVE PURCHASE ORDER (Undelivered Orders) <div class='PopUpWindowClose'> <b onclick="javascript:hidePOActionaForm(this);" style='font-weight:bold'> ✕ </b> </div> </div> <div style='float:left;width:99%;height:60px;background:lightgray;padding:0px;margin:5px'> <div style='background:transparent;float:left;width:100%;margin:1px;text-align:center;padding:2px;border:0px solid gray;border-radius:10px'> <div style='float:left;width:20%;padding:0px;margin:0px;padding-right:10px'> <b style='float:left;color:black;padding-top:1px'>PO NUMBER</b><br> <input type='text' id='myPONumber' disabled style='width:100%;margin-left:0px;'> </div> <div style='float:left;width:20%;padding:0px;margin:0px;padding-right:10px'> <b style='float:left;color:black;padding-top:1px'>DATE POSTED:</b><br> <input type='text' id='myPOPosted' disabled style='width:100%;margin-left:0px;'> </div> <div style='float:left;width:15%;padding:0px;margin:0px;padding-right:10px'> <b style='float:left;color:black;padding-top:1px'>TERMS:</b><br> <input type='text' id='myPOTerms' disabled style='width:100%;margin-left:0px;'> </div> <div style='float:left;width:20%;padding:0px;margin:0px;padding-right:10px'> <b style='float:left;color:black;padding-top:1px'>STATUS:</b><br> <input type='text' id='myPOStatus' disabled style='width:100%;margin-left:0px;'> </div> </div> </div> <input type='hidden' id='SeletedPRFItemID' class='TableBottomLabel' style='border:0px;text-align:left' disabled> <!--###################################################################################################################################--> <div id='poInformationX' style='padding:2px;width:100%;height:90px;background:w;float:left'> <div style='background:WHITE;float:left;width:100%;padding:5px;padding-top:0px;font-family:Yu Gothic Light;color:gray;font-size:14px;color:blue' id='userItemDesc'> <div id='poInformation' style='padding:0px;width:100%;height:110px;background:white'> <div style='border:0px solid lightgray;float:left;width:15%;padding:2px'> <b style='padding:1px;font-family:Yu Gothic Light;font-size:1vw'>Company Code:</b> <input type='text' disabled id='poByCompany' style='margin-bottom:5px;margin-top:0px'> <label for="notifyReq" style="font-family:Yu Gothic Light;font-size:11px;font-weight:normal;padding-top:10px"> <input type="checkbox" disabled 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:15%;padding:2px'> <b style='padding:1px;font-family:Yu Gothic Light;font-size:1vw'>Dealer Code:</b> <input type='text' disabled id='poByDealer' style='margin-bottom:5px;margin-top:0px'> <label for="notifyReq" style="font-family:Yu Gothic Light;font-size:11px;font-weight:normal;padding-top:10px"> </label> </div> <div style='border:0px solid lightgray;float:left;width:30%;padding:2px'> <b style='padding:3px;font-family:Yu Gothic Light;font-size:1vw'>Supplier / Vendor:</b> <input type='text' disabled id='poToVendor' style='margin-bottom:5px;margin-top:0px;'> <label for="notifyVendor" style="font-family:Yu Gothic Light;font-size:11px;font-weight:normal;padding-top:10px"> <input type="checkbox" disabled checked 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 style='border:0px solid lightgray;float:left;width:40%;padding:2px'> <b style='padding:3px;font-family:Yu Gothic Light;font-size:1vw'>Instructions:</b> <textarea rows='2' id='myInstructions' disabled style='width:100%'></textarea> </div> </div> </div> </div> <!--###################################################################################################################################--> <div id='activeItemListX' style='padding:2px;width:100%;height:190px;background:white;'> <div style='background:lightgray;float:left;width:100%;padding:3px;font-family:Yu Gothic Light;color:blue;font-size:14px;color:blue;border:1px solid gray' id='userItemDesc'> <b style='font-family:Yu Gothic Light;font-size:1vw;font-weight:normal;color: #2d2d2c ;padding:1px;'> 📖 Ordered Items:</b> <div style='background:white;padding:2px;width:100%;height:30px;margin-bottom:0px'> <table> <thead> <th style='width:5%;padding:3px'>REC.#</th> <th style='width:8%;padding:3px'>PRF #</th> <th style='width:35%;padding:3px'>ITEM DESCRIPTION</th> <th style='width:5%;padding:3px'>UOM</th> <th style='width:9%;padding:3px'>UNIT COST</th> <th style='width:9%;padding:3px'>P.O QTY</th> <th style='width:9%;padding:3px'>P.O AMOUNT</th> <th style='width:11%;padding:3px;background:#e5f573;border:1px solid gray'>INV. QTY</th> <th style='width:9%;padding:3px;background:#e5f573;border:1px solid gray'>INV. AMNT</th> </thead> </table> </div> <div id='activeItemList' style='background: #ffffff ;padding:1px;width:100%;height:360px;margin-top:0px;overflow:auto'> </div> </div> </div> <input type='hidden' id='itemID'> <input type='hidden' id='itemRefCode'> </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(){ <!--###################################################################################################################################--> <!--######################################################################PRF_POST_PO.php#############################################################--> $("#goSearchCanvass").click(function(){ var SearchCanvass = $("#SearchCanvass").val(); //alert(myPONumber); //exit; if(SearchCanvass==''){ alert('ERROR: Invalid entry.'); exit; } ShowUploadBar(); $.ajax({ url: "prf_searchSupplierPO.php", type: "POST", async: false, data: { "SearchCanvass": SearchCanvass, "done": 1 }, success: function(d){ $("#mainTable").html(d); ShowUploadBar(); } }) }); //============================================================================================================================= //============================================================================================================================= $("#LoadUserApprovedCanvassItem").click(function(){ var myPONumber = $("#myPONumber").val(); //alert(myPONumber); //exit; if(myPONumber==''){ alert('ERROR: PO Number is missing.'); exit; } ShowUploadBar(); $.ajax({ url: "PRF_LoadPOItemsForReceiving.php", type: "POST", async: false, data: { "myPONumber": myPONumber, "done": 1 }, success: function(d){ $("#activeItemList").html(d); ShowUploadBar(); } }) }); //============================================================================================================================= //============================================================================================================================= $("#confirmDelivery").click(function(){ var unitPrice = $("#unitPrice").val(); var receivedQTY = $("#receivedQTY").val(); var itemID = $("#itemID").val(); var itemRefCode = $("#itemRefCode").val(); var myPONumber = $("#myPONumber").val(); var invoiceNo = $("#invoiceNo").val(); var drNo = $("#drNo").val(); if(drNo==''){ alert('ERROR: Please type the DR number to continute'); exit; } if(invoiceNo==''){ alert('ERROR: Please type the INVOICE number to continute'); exit; } if(unitPrice==''){ alert('ERROR: Invoice amount is missing.'); exit; } if(receivedQTY==''){ alert('ERROR: Invalid received quantity.'); exit; } if(itemID==''){ alert('ERROR: Item ID is missing.'); exit; } if(itemRefCode==''){ alert('ERROR: Reference Code is missing.'); } ShowUploadBar(); $.ajax({ url: "prf_update_stock_reciving_per_item.php", type: "POST", async: false, data: { "itemID": itemID, "unitPrice": unitPrice, "receivedQTY": receivedQTY, "myPONumber": myPONumber, "itemRefCode": itemRefCode, "invoiceNo": invoiceNo, "drNo": drNo, "done": 1 }, success: function(d){ hideConfirmationBox(); ShowUploadBar(); showtopMessage(); $("#activeItemList").html(d); updateSupplierPOCount(); updateForPaymentCount(); } }) }); //============================================================================================================================= //============================================================================================================================= $("#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: false, data: { "AwardItemID": AwardItemID, "canvassID": canvassID, "AwardItemAmount": AwardItemAmount, "AwardItemQty": AwardItemQty, "done": 1 }, success: function(d){ $("#mainTableSub").html(d); hideConfirmedItem(); ShowUploadBar(); UpdateExecomForApprovalCount(); } }) }); //============================================================================================================================= //============================================================================================================================= }); </script> <!--- LOCALIZED COPY OF JAVASCRIPT --> <script type="text/javascript"> //============================================================================================================================= //============================================================================================================================= function showActiveVendors(){ var poByCompany = $("#poByCompany").val(); //alert(poByCompany); //exit; ShowUploadBar(); $.ajax({ url: "PRF_LoadActiveVendorslBasedOnSelectedCompany.php", type: "POST", async: false, data: { "poByCompany": poByCompany, "done": 1 }, success: function(d){ $("#poToVendor").html(d); ShowUploadBar(); } }) } //============================================================================================================================= //==================================.php=========================================================================================== function reloadItemForPO(){ ShowUploadBar(); $.ajax({ url: "PRF_ReLoadForPOItems.php", type: "POST", async: false, data: { "done": 1 }, success: function(d){ $("#mainTableSub").html(d); ShowUploadBar(); } }) } //============================================================================================================================= //==================================.php=========================================================================================== function showActiveProposal(){ var poByCompany = $("#poByCompany").val(); var loadActiveProposal = $("#poToVendor").val(); //alert(loadActiveProposal); //exit; ShowUploadBar(); $.ajax({ url: "PRF_LoadProposalBasedOnSelectedCompany.php", type: "POST", async: false, data: { "poByCompany": poByCompany, "loadActiveProposal": loadActiveProposal, "done": 1 }, success: function(d){ $("#activeItemList").html(d); showPOedItemPerSelectedVendorAndCompany(); ShowUploadBar(); reloadItemForPO(); } }) } //============================================================================================================================= //============================================================================================================================= function showPOedItemPerSelectedVendorAndCompany(){ var poByCompany = $("#poByCompany").val(); var poToVendorID = $("#poToVendor").val(); var myPONumber = $("#myPONumber").val(); //alert(poCode); //exit; ShowUploadBar(); $.ajax({ url: "PRF_LoadPOedItemByVendor.php", type: "POST", async: false, data: { "poByCompany": poByCompany, "myPONumber": myPONumber, "poToVendorID": poToVendorID, "done": 1 }, success: function(d){ $("#SelectedItemList").html(d); ShowUploadBar(); } }) } function hideConfirmationBox(){ $("#confirmStockReceiving").fadeOut(200); } function showConfirmationBox(){ $("#confirmStockReceiving").fadeIn(200); } function hidetopMessage(){ $("#topMessage").fadeOut(20800); } function showtopMessage(){ $("#topMessage").fadeIn(100); hidetopMessage(); } function hidePOConfirmForm(){ $("#showPOPostingConfirmationForm").fadeOut(500); } function showPOConfirmForm(){ $("#showPOPostingConfirmationForm").fadeIn(500); } function hidePOActionaForm(){ updatePOList(); $("#POActionaForm").fadeOut(500); } function showPOActionaForm(){ $("#POActionaForm").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 = ''; document.getElementById("disabled").disabled = false; hideActionForm(); }; 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("myPONumber").value = x[1].innerHTML; document.getElementById("myPOPosted").value = x[2].innerHTML; document.getElementById("poByCompany").value = x[3].innerHTML; document.getElementById("poByDealer").value = x[4].innerHTML; document.getElementById("poToVendor").value = x[5].innerHTML; document.getElementById("supplierName").innerHTML = x[5].innerHTML; document.getElementById("myPOTerms").value = x[6].innerHTML + " Days"; document.getElementById("myInstructions").value = x[8].innerHTML; document.getElementById("myPOStatus").value = x[7].innerHTML; } function getInformationData(row) { var x=row.cells; document.getElementById("itemRefCode").value = x[1].innerHTML; document.getElementById("itemID").value = x[0].innerHTML; document.getElementById("itemDesc").innerHTML = x[2].innerHTML; document.getElementById("orderedQTY").value = x[5].innerHTML; document.getElementById("receivedQTY").value = x[5].innerHTML; //document.getElementById("unitPrice").value = x[6].innerHTML; } //=================================================================================receivedQTY orderedQTY supplierName itemDesc //================================================================================= $("#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_POSubmittedActive.php", type: "POST", async: false, 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_POSubmittedActive.php", type: "POST", async: false, data: { "MyPageCount": MyPageCount, "myOffSet": myOffSet, "MyRowCount": MyRowCount, "CurrentpageCount": CurrentpageCount, "recordPerPage": recordPerPage, "done": 1 }, success: function(d){ ShowUploadBar(); $("#mainTableSub").html(d); } }) //================================================================================= //================================================================================= }); //====================================================================================================== function updateSupplierPOCount(){ $.ajax({ url: "PRF_UpdateSupplierPOCount.php", type: "POST", async: false, data: { "trans":2 }, success: function(d){ $("#POSupplierCount").html(d); } }) } //=======updatePOList=============================================================================================== function updateForPaymentCount(){ $.ajax({ url: "PRF_updateForPaymentCount.php", type: "POST", async: false, data: { "trans":2 }, success: function(d){ $("#POForPayment").html(d); } }) } //=======updatePOList=============================================================================================== function updatePOList(){ $.ajax({ url: "PRF_UpdatePOList.php", type: "POST", async: false, data: { "trans":2 }, success: function(d){ $("#mainTableSub").html(d); } }) } </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings