File manager - Edit - /home/autoph/public_html/connect/home/PRF_SETUP_byers.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 = $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'>📝 SETUP BUYERS</p> </div> <input type='hidden' id='selBuyerID'> <!--########################## MAIN TABLE WINDOW ############################################--> <!--########################################################################################################--> <div class='NewPRFBody' style='height:700px;'> <div id='mainTable' class='PRFTableBody' style='height:683px;'> <div style='width:60%;height:33px;background:white'> <table> <thead> <th style='width:12%'>REC. ID</th> <th style='width:20%'>NAME</th> <th style='width:35%'>COMPANY</th> </thead> </table> </div> <div id='buyerList' class='PRFTableItems' style='width:60%;height:350px;border:1px solid gray;overflow:auto'> <?php echo "<table>"; $getExecomList = mysql_query("SELECT * FROM `vts_users` WHERE `buyer`=1 ORDER BY `u_lname` ASC"); while($row=mysql_fetch_array($getExecomList)){ $companyName=mysql_result(mysql_query("SELECT comp_name FROM vts_company WHERE comp_id='".$row['company']."'"),0); ?> <tr onclick="javascript:getBuyerID(this);"><!-- getCategoryIDonDblclick="javascript:showActionViewDelete(this);" >--> <?php echo "<td style='width:12%'>".$row['u_id']."</td> <td style='width:20%'>".strtoupper($row['u_lname']).", ".strtoupper($row['u_fname'])."</td> <td style='width:35%'>".strtoupper($companyName)."</td>"; echo "</tr>"; } echo "</table>"; ?> </div> <div id='execomListX' class='PRFTableItems' style='width:60%;height:300px;'> <p style='font-family:Yu Gothic;font-size:14px;color:black;margin-bottom:2px;padding-bottom:2px'>SELECT EMPLOYEE:</p> <div style='float:left;width:70%;margin:0px;background:white;padding:2px'> EMPLOYEE NAME:<br> <select id='getBuyers' style='margin:0px;padding:0px;height:30px;' > <option value='0'>-- Select -- </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 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> </div> <div style='float:left;width:20%;margin:0px;background:white;padding:2px'> <br> <button id='addBuyer' style='margin:0px;width:100%;height:30px;'>Add Buyer</button> </div> <div style='float:left;width:90%;margin:2px;padding:10px;background:white;border:0px solid gray;color:gray'> <u style='font-family:Yu Gothic;font-weight:bold;color:Black'>BUYERS:</u> <br> <br> Only employees assigned as buyer can be seen in the buyer setup and buyer assignment module. If employee doesn't exist in the list, you need to add that employee here to include them in the buyers selection.<br> </div> </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(){ //====================================================================================================== $("#buyerList").dblclick(function(){ //getAuthority getExecom addExecom var selBuyerID = $("#selBuyerID").val(); //alert(selBuyerID); //return false; if(confirm("CONFIRM DELETION: \n\N Are you sure you want to delete this record? Press OK to continue...")){ //========================= ShowUploadBar(); $.ajax({ url: "PRF_RemoveBuyer.php", type: "POST", async: false, data: { "selBuyerID": selBuyerID, "done": 1 }, success: function(d){ ShowUploadBar(); $("#buyerList").html(d); hideActionViewDelete(); Swal.fire( 'Deleted!', 'Buyer has been removed', 'success' ) } }) //========================= } }); $("#addBuyer").click(function(){ // var getBuyers = $("#getBuyers").val(); //alert(getBuyers); if(getBuyers==0){ alert("Please select name"); return false; } //if(confirm("CONFIRM DELETE ACTION: \n\nAre you sure you want to ADD ? \n\n Press 'OK' button to proceed...")){ ShowUploadBar(); $.ajax({ url: "PRF_AddBuyers.php", type: "POST", async: false, data: { "getBuyers": getBuyers, "done": 1 }, success: function(d){ ShowUploadBar(); $("#buyerList").html(d); //hideActionViewDelete(); //$('#searchText').val(''); 015334295-1005 Swal.fire( 'Saved', 'New buyer has been added.', 'success' ) } }) //} }); //====================================================================================================== function updateCREATENEWPRF(){ $.ajax({ url: "PRF_Update_CREATE_NEW_PRF.php", type: "POST", async: false, data: { "trans":1 }, success: function(d){ updatePostedPRF(); $("#unPostedPRFRequestCount").html(d); } }) } //====================================================================================================== function updatePostedPRF(){ $.ajax({ url: "PRF_Update_POSTEDPRF.php", type: "POST", async: false, data: { "trans":2 }, success: function(d){ $("#PostedPRFRequestCount").html(d); } }) } //====================================================================================================== function updateApprovalPRF(){ $.ajax({ url: "PRF_procIncomingInfo.php", type: "POST", async: false, data: { "trans":2 }, success: function(d){ $("#forMyApprovalCount").html(d); } }) } //====================================================================================================== function refreshMainTable(){ $.ajax({ url: "PRF_MainTableHeaderDisplay.php", type: "POST", async: false, data: { }, success: function(d){ //invShowAssignMsg(); $("#mainTable").html(d); //invHideAssignMsg(); //$('#searchText').val(''); } }) } }); </script> <!--- LOCALIZED COPY OF JAVASCRIPT --> <script type="text/javascript"> function getBuyerID(row) { var x=row.cells; document.getElementById("selBuyerID").value = x[0].innerHTML; } </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings