File manager - Edit - /home/autoph/public_html/connect/home/prf_searchSupplierPO.php
Back
<?php include 'core/init.php'; //$connect_error = 'Sorry, we\'re experiencing connection problem. Please try again later... Thank you!'; //mysql_connect('localhost','root','aee1024') or die ($connect_error); //mysql_select_db('db_vts') or die($connect_error); //error_reporting(1); 193 * 1067 * 215 $prfDate = date_create() ->format("Y-m-d"); $prfTime = date('H:i:s'); $myDate = date_create() ->format("Y-m-d"); $myUID = $user_data['u_id']; if(isset($_POST['done'])){ $SearchCanvass = mysql_escape_string($_POST['SearchCanvass']); ?> <?php } ?> <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 AND `po_number`='$SearchCanvass'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='https://www.autohub.ph/connect/home/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> <!--- 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#############################################################--> //============================================================================================================================= //============================================================================================================================= $("#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(); } }) }); }); </script> <!--- LOCALIZED COPY OF JAVASCRIPT --> <script type="text/javascript"> 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; } </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings