File manager - Edit - /home/autoph/public_html/connect/home/PRF_SetupItemClass.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> <input type='hidden' id='selectedItemID'> <div class='NewPRFHeader'> <p class='PRFBodyTitle' style='float:left'>📝 ITEM MASTERFILE SETUP</p> <input type='text' disabled class='PRFBodyTitle' id='mapLink' style='text-align:right;font-size:12px;text-decoration:underl;float:right;background:black;width:50%;border:0px;color:white;padding:10px;'> </div> <div id='mainTable' class='PRFTableBody' style='width:100%;float:left;background:yellow;height:350px;overflow:auto'> <div style='width:100%;height:33px;background:white'> <table style='width:100%'> <thead> <th style='width:32%;background:black;color:white;border:0px'>EXPENSE CATEGORY</th> <th style='width:32%;background:black;color:white;border:0px'>ITEM CLASSIFICATION</th> <th style='width:36%;background:black;color:white;border:0px'>ITEM TYPE</th> </thead> </table> </div> <div style='float:left;margin:0px;padding:0px;background:white;float:left;width:32%;height:317px;border:0px solid gray;border-right:0px solid lightgray'> <input type='hidden' id='expenseID'> <div style='width:100%;height:33px;background:white'> <table style='width:100%'> <thead> <th style='width:10%;border-right:0px solid lightgray;'>ID</th> <th style='width:80%;border-right:0px solid lightgray;'>DESCRIPTION</th> <th style='width:10%;border-right:0px solid lightgray;border-left:0px solid lightgray;color:red;text-align:center;font-size:14px;font-weight:bold;'><b id='addExpenseType' onclick='javascript:showAddExpenseType(this);'>📝</b></th> </thead> </table> </div> <div id='expenseDataView' class='PRFTableItems' style='width:100%;height:300px;border:0px solid gray;border-right:1px solid lightgray;overflow:auto'> <?php $getMatrixData = mysql_query("SELECT * FROM `prf_expensecategory` WHERE `status`=1 ORDER BY `description` ASC"); echo "<table id='loadExpenseType' style='width:100%'>"; while($row=mysql_fetch_array($getMatrixData)){ ?><tr onclick="javascript:getMatrixInfo(this);"><?php echo "<td style='width:10%;text-align:center;font-family:Yu Gothic Light;font-size:12px'>".strtoupper($row['id'])."</td>"; echo "<td colspan='2' style='width:90%;text-align:left;font-family:Yu Gothic Light;font-size:12px'>".strtoupper($row['description'])."</td>"; echo "</tr>"; } echo "</table>"; ?> </div> </div> <div style='float:left;margin:0px;padding:0px;background:white;float:left;width:32%;height:317px;border:0px solid gray;border-right:0px solid lightgray'> <input type='hidden' id='itemClassID'> <div style='width:100%;height:33px;background:white'> <table style='width:100%'> <thead> <th style='width:10%;border-right:0px solid lightgray'>ID</th> <th style='width:80%;border-right:0px solid lightgray'>DESCRIPTION</th> <th style='width:10%;border-right:0px solid lightgray;border-left:0px solid lightgray;color:red;text-align:center;font-size:14px;font-weight:bold;'><b id='addItemCat' onclick="javascript:showAddExpenseCategory(this);">📝</b></th> </thead> </table> </div> <div id='itemCategoryView' class='PRFTableItems' style='width:100%;height:300px;border:0px solid gray;border-right:1px solid lightgray;overflow:auto'> </div> </div> <div style='float:left;margin:0px;padding:0px;background:white;height:600px;float:left;width:36%;height:317px;border:0px solid gray;border-right:0px solid lightgray'> <input type='hidden' id='itemTypeID'> <input type='hidden' id='itemTypeName'> <div style='width:100%;height:33px;background:white'> <table style='width:100%'> <thead> <th style='width:10%;border-right:0px solid lightgray'>ID</th> <th style='width:80%;border-right:0px solid lightgray'>DESCRIPTION</th> <th style='width:10%;border-right:0px solid lightgray;border-left:0px solid lightgray;color:red;text-align:center;font-size:14px;font-weight:bold;'><b id='addItemClass' onclick="javascript:showAddItemClass(this);">📝</b></th> </thead> </table> </div> <div id='itemClassView' class='PRFTableItems' style='width:100%;height:300px;border:0px solid gray;border-right:1px solid lightgray;overflow:auto'> </div> </div> </div> <div id='mainTableB' class='PRFTableBody' style='width:100%;float:left;background:white;height:383px;border-top:1px solid lightgray'> <div id='addItemForm' style='display:block;float:left;width:59%;background:white;padding:20px;height:58px;padding-left:1px'> <b id='hideCatSet' onclick="javascript:toggleCategoryFormView(this);" style='font-family:Calibri;font-size:16px;color:black;margin:5px;cursor:pointer;font-size:16px;'> ↔ FULL VIEW</b> <b id='viewCatSet' onclick="javascript:toggleCategoryFormHide(this);" style='display:none;font-family:Calibri;font-size:16px;color:black;margin:5px;cursor:pointer;font-size:16px;'> ↕ VIEW ITEM CLASS</b> <b id='addItemMaster' onclick="javascript:showAddItemMaster(this);" style='font-family:Calibri;font-size:16px;color:black;margin:5px;cursor:pointer;font-size:16px;'>➕ ADD NEW</b> </div> <div style='display:block;float:left;width:40%;background:white;padding:5px'> <input type='text' id='searchItem' style='text-align:center:padding:5px;font-family:Calibri;font-size:14px;color:black;float:left;width:70%;border-radius:5px 0px 0px 5px;height:33px;margin-top:7px'> <button id='searchItemButton' class='PopUpLowerButtonR' style='font-size:14px;float:left;width:29%;border-radius:0px 5px 5px 0px;padding:5px;height:35px;margin-top:5px'>SEARCH... 🔎 </button> </div> <div style='width:100%;height:33px;background:white;float:left'> <table style='width:100%'> <thead> <th style='width:5%'>NO.</th> <th style='width:10%'>EXPENSE TYPE</th> <th style='width:10%'>ITEM CATEGORY</th> <th style='width:15%'>ITEM TYPE</th> <th style='width:55%'>ITEM DESCRIPTION</th> <th style='width:5%;border-right:0px solid gray'>UOM</th> </thead> </table> </div> <div id='itemMasterFileView' class='PRFTableItems' style='float:left;width:100%;height:550px;border:0px solid gray;border-right:0px solid lightgray;overflow:auto'> </div> </div> <!--########################## POPUP FOR ENDORSING CANVASS TO GENERATE CANVASS SHEET ############################################--> <!--###################################################################################################################################--> <div id="AddExpenseTypeForm" class="PopUpActionWindow" style='position:fixed;height:220px'> <div class='DelPopUpWindowTitle'> 🪧 ADD NEW EXPENSE TYPE <div class='PopUpWindowClose'> <b onclick="javascript:hideAddExpenseType(this);" style='font-weight:bold'> ✕ </b> </div> </div> <div style='padding:20px;width:100%;height:60%'> <label>Expense Type:</label> <input type='text' id='NewExpenseType' style='width:100%;font-family:Calibri;font-size:16px;font-weight:bold;padding:15px;margin-bottom:20px'> <button id='saveNewExpenseType' class='PopUpLowerButtonR'>SAVE</button> </div> </div> <!--########################## POPUP FOR ENDORSING CANVASS TO GENERATE CANVASS SHEET ############################################--> <!--###################################################################################################################################--> <!--########################## POPUP FOR ENDORSING CANVASS TO GENERATE CANVASS SHEET ############################################--> <!--###################################################################################################################################--> <div id="AddExpenseCategoryForm" class="PopUpActionWindow" style='position:fixed;height:320px'> <div class='DelPopUpWindowTitle'> 🪧 ADD NEW ITEM CATEGORY <div class='PopUpWindowClose'> <b onclick="javascript:hideAddExpenseCategory(this);" style='font-weight:bold'> ✕ </b> </div> </div> <div style='padding:20px;width:100%;height:60%'> <label>Expense Type:</label> <input disabled type='text' id='selectedExpenseType' style='width:100%;font-family:Calibri;font-size:16px;font-weight:bold;padding:15px;margin-bottom:20px'> <label>Item Category:</label> <input type='text' id='NewItemCategory' style='width:100%;font-family:Calibri;font-size:16px;font-weight:bold;padding:15px;margin-bottom:20px'> <button id='saveNewItemCategory' class='PopUpLowerButtonR'>SAVE</button> </div> </div> <!--########################## POPUP FOR ENDORSING CANVASS TO GENERATE CANVASS SHEET ############################################--> <!--###################################################################################################################################--> <!--########################## POPUP FOR ENDORSING CANVASS TO GENERATE CANVASS SHEET ############################################--> <!--###################################################################################################################################--> <div id="AddItemClassForm" class="PopUpActionWindow" style='position:fixed;height:320px'> <div class='DelPopUpWindowTitle'> 🪧 ADD NEW ITEM CATEGORY <div class='PopUpWindowClose'> <b onclick="javascript:hideAddItemClass(this);" style='font-weight:bold'> ✕ </b> </div> </div> <div style='padding:20px;width:100%;height:60%'> <label>Expense Type:</label> <input disabled type='text' id='selectedItemCatengory' style='width:100%;font-family:Calibri;font-size:16px;font-weight:bold;padding:15px;margin-bottom:20px'> <label>Item Category:</label> <input type='text' id='NewItemClass' style='width:100%;font-family:Calibri;font-size:16px;font-weight:bold;padding:15px;margin-bottom:20px'> <button id='saveNewItemClass' class='PopUpLowerButtonR'>SAVE</button> </div> </div> <!--###################################################################################################################################--> <!--###################################################################################################################################--> <div id="AddItemMasterForm" class="PopUpActionWindow" style='position:fixed;top:100px;left:100px;width:800px;height:400px'> <div class='DelPopUpWindowTitle'> 🪧 ADD NEW ITEM <div class='PopUpWindowClose'> <b onclick="javascript:hideAddItemMaster(this);" style='font-weight:bold'> ✕ </b> </div> </div> <div style='padding:20px;width:100%;height:60%'> <div style='float:left;width:30%;padding:5px;margin-right:5px'> <label style='font-family:Calibri;color:black'>EXPENSE TYPE:</label> <input disabled type='text' id='myNewItemExpense' style='width:100%;font-family:Calibri;font-size:16px;font-weight:bold;padding:5px;margin-bottom:20px'> </div> <div style='float:left;width:30%;padding:5px;margin-right:5px'> <label style='font-family:Calibri;color:black'>ITEM CATEGORY:</label> <input disabled type='text' id='myNewItemCategory' style='width:100%;font-family:Calibri;font-size:16px;font-weight:bold;padding:5px;margin-bottom:20px'> </div> <div style='float:left;width:30%;padding:5px;margin-right:5px'> <label style='font-family:Calibri;color:black'>ITEM CLASS/TYPE:</label> <input disabled type='text' id='myNewItemClass' style='width:100%;font-family:Calibri;font-size:16px;font-weight:bold;padding:5px;margin-bottom:20px'> </div> <div style='float:left;width:100%;padding:5px;margin-right:5px'> <label style='font-family:Calibri;color:black'>ITEM DESCRIPTION:</label> <input type='text' id='NewItemDescription' style='width:100%;font-family:Calibri;font-size:16px;font-weight:bold;padding:10px;margin-bottom:20px'> </div> <div style='float:left;width:20%;padding:5px;margin-right:5px'> <label style='font-family:Calibri;color:black'>UNIT OF MEASURE:</label> <select id='myNewItemUOM' style='margin-top:9px;width:100%;font-family:Calibri;font-size:16px;font-weight:bold;padding:1px;margin-bottom:20px'> <?php $getType = mysql_query("SELECT * FROM `prf_uom` WHERE `status`=1 ORDER BY `description` ASC"); while($uom = mysql_fetch_array($getType)){ echo "<option value='".$uom['description']."'>".$uom['description']."</option>"; } ?> </select> </div> <div style='float:left;width:20%;padding:5px;margin-right:5px'> <label style='font-family:Calibri;color:black'>MIN. ORDER QTY.:</label> <input type='text' id='myNewItemMin' style='width:100%;font-family:Calibri;font-size:16px;font-weight:bold;padding:5px;margin-bottom:20px'> </div> <div style='float:left;width:20%;padding:5px;margin-right:5px'> <label style='font-family:Calibri;color:black'>MAX ORDER QTY:</label> <input type='text' id='myNewItemMax' style='width:100%;font-family:Calibri;font-size:16px;font-weight:bold;padding:5px;margin-bottom:20px'> </div> <div style='float:left;width:100%;padding:5px;margin-right:5px'> <button id='saveNewItemDescription' class='PopUpLowerButtonR' style='width:200px'>SAVE</button> </div> </div> </div> <!--###################################################################################################################################--> <!--###################################################################################################################################--> <!--###################################################################################################################################--> <!--###################################################################################################################################--> <div id="EditItemMasterForm" class="PopUpActionWindow" style='position:fixed;top:100px;left:100px;width:800px;height:400px'> <div class='DelPopUpWindowTitle'> 🪧 EDIT ITEM <div class='PopUpWindowClose'> <b onclick="javascript:hideEditItemForm(this);" style='font-weight:bold'> ✕ </b> </div> </div> <div style='padding:20px;width:100%;height:60%'> <div style='float:left;width:30%;padding:5px;margin-right:5px'> <label style='font-family:Calibri;color:black'>EXPENSE TYPE:</label> <input disabled type='text' id='EditmyNewItemExpense' style='width:100%;font-family:Calibri;font-size:16px;font-weight:bold;padding:5px;margin-bottom:20px'> </div> <div style='float:left;width:30%;padding:5px;margin-right:5px'> <label style='font-family:Calibri;color:black'>ITEM CATEGORY:</label> <input disabled type='text' id='EditmyNewItemCategory' style='width:100%;font-family:Calibri;font-size:16px;font-weight:bold;padding:5px;margin-bottom:20px'> </div> <div style='float:left;width:30%;padding:5px;margin-right:5px'> <label style='font-family:Calibri;color:black'>ITEM CLASS/TYPE:</label> <input disabled type='text' id='EditmyNewItemClass' style='width:100%;font-family:Calibri;font-size:16px;font-weight:bold;padding:5px;margin-bottom:20px'> </div> <div style='float:left;width:100%;padding:5px;margin-right:5px'> <label style='font-family:Calibri;color:black'>ITEM DESCRIPTION:</label> <input type='text' id='EditNewItemDescription' style='width:100%;font-family:Calibri;font-size:16px;font-weight:bold;padding:10px;margin-bottom:20px'> </div> <div style='float:left;width:20%;padding:5px;margin-right:5px'> <label style='font-family:Calibri;color:black'>UNIT OF MEASURE:</label> <select id='EditmyNewItemUOM' style='margin-top:9px;width:100%;font-family:Calibri;font-size:16px;font-weight:bold;padding:1px;margin-bottom:20px'> <?php $getType = mysql_query("SELECT * FROM `prf_uom` WHERE `status`=1 ORDER BY `description` ASC"); while($uom = mysql_fetch_array($getType)){ echo "<option value='".$uom['description']."'>".$uom['description']."</option>"; } ?> </select> </div> <div style='float:left;width:20%;padding:5px;margin-right:5px'> <label style='font-family:Calibri;color:black'>MIN. ORDER QTY.:</label> <input type='text' id='EditmyNewItemMin' style='width:100%;font-family:Calibri;font-size:16px;font-weight:bold;padding:5px;margin-bottom:20px'> </div> <div style='float:left;width:20%;padding:5px;margin-right:5px'> <label style='font-family:Calibri;color:black'>MAX ORDER QTY:</label> <input type='text' id='EditmyNewItemMax' style='width:100%;font-family:Calibri;font-size:16px;font-weight:bold;padding:5px;margin-bottom:20px'> </div> <div style='float:left;width:100%;padding:5px;margin-right:5px'> <button id='EditsaveNewItemDescription' class='PopUpLowerButtonR' style='width:200px'>UPDATE</button> </div> </div> </div> <!--###################################################################################################################################--> <!--###################################################################################################################################--> <!--- LOCALIZED COPY OF JAVASCRIPT --> <!--- LOCALIZED COPY OF JAVASCRIPT --> <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript"> function hideAddExpenseType(){ $("#AddExpenseTypeForm").fadeOut(500); }; function showAddExpenseType(){ $("#AddExpenseTypeForm").fadeIn(500); $("#NewExpenseType").focus(); }; function hideAddExpenseCategory(){ $("#AddExpenseCategoryForm").fadeOut(500); }; function showAddExpenseCategory(){ var selectedExpenseType = $("#selectedExpenseType").val(); if(selectedExpenseType==""){ alert("Please selecft EXPENSE TYPE first."); }else{ $("#AddExpenseCategoryForm").fadeIn(500); $("#NewItemCategory").focus(); } }; function toggleCategoryFormView(){ $("#mainTable").toggle(500); $("#hideCatSet").fadeOut(100); $("#viewCatSet").fadeIn(100); } function toggleCategoryFormHide(){ $("#mainTable").toggle(500); $("#hideCatSet").fadeIn(100); $("#viewCatSet").fadeOut(100); } function hideAddItemClass(){ $("#AddItemClassForm").fadeOut(500); }; function hideAddItemMaster(){ $("#AddItemMasterForm").fadeOut(500); }; function hideEditItemForm(){ $("#EditItemMasterForm").fadeOut(500); }; function showEditItemForm(){ $("#EditItemMasterForm").fadeIn(500); }; function showAddItemMaster(){ //expenseID itemClassID itemTypeID var itemTypeID = $("#itemTypeID").val(); if(itemTypeID==""){ alert("Please selecft ITEM TYPE first."); }else{ $("#AddItemMasterForm").fadeIn(500); $("#NewItemDescription").focus(); } }; function showAddItemClass(){ var selectedItemCatengory = $("#selectedItemCatengory").val(); if(selectedItemCatengory == ""){ alert("Please selecft ITEM CATEGORY first."); }else{ $("#AddItemClassForm").fadeIn(500); $("#NewItemClass").focus(); } }; function getItemID(row) {// var expenseID = $("#expenseID").val(); //var itemClassID = $("#itemClassID").val(); //var itemTypeID = $("#itemTypeID").val(); var x=row.cells; document.getElementById("selectedItemID").value = x[0].innerHTML; document.getElementById("EditmyNewItemUOM").value = x[5].innerHTML; document.getElementById("EditNewItemDescription").value = x[4].innerHTML; document.getElementById("EditmyNewItemClass").value = x[3].innerHTML; document.getElementById("EditmyNewItemCategory").value = x[2].innerHTML; document.getElementById("EditmyNewItemExpense").value = x[1].innerHTML; showEditItemForm(); } function getCategoryID(row) { var x=row.cells; document.getElementById("itemClassID").value = x[0].innerHTML; document.getElementById("selectedItemCatengory").value = x[1].innerHTML; document.getElementById("myNewItemCategory").value = x[1].innerHTML; document.getElementById("mapLink").value = "➤ " + document.getElementById("selectedExpenseType").value + " ➤ " + document.getElementById("selectedItemCatengory").value + " ➤"; } function getClassID(row) { var x=row.cells; document.getElementById("itemTypeID").value = x[0].innerHTML; document.getElementById("itemTypeName").value = x[1].innerHTML; document.getElementById("myNewItemClass").value = x[1].innerHTML; document.getElementById("mapLink").value = "➤ " + document.getElementById("selectedExpenseType").value + " ➤ " + document.getElementById("selectedItemCatengory").value + " ➤ " + x[1].innerHTML; } function getMatrixInfo(row) { var x=row.cells; document.getElementById("expenseID").value = x[0].innerHTML; document.getElementById("selectedExpenseType").value = x[1].innerHTML; document.getElementById("myNewItemExpense").value = x[1].innerHTML; document.getElementById("mapLink").value = "➤ " + document.getElementById("selectedExpenseType").value + " ➤ "; } </script> <script type="text/javascript"> $(document).ready(function(){ //====================================================================================================== $("#EditsaveNewItemDescription").click(function(){ //myNewItemMax myNewItemMin myNewItemUOM NewItemDescription expenseID itemClassID itemTypeID var EditNewItemDescription = $("#EditNewItemDescription").val(); var selectedItemID = $("#selectedItemID").val(); var EditmyNewItemMax = $("#EditmyNewItemMax").val(); var EditmyNewItemMin = $("#EditmyNewItemMin").val(); var EditmyNewItemUOM = $("#EditmyNewItemUOM").val(); //alert(expenseID + " - " + NewItemCategory);NewItemClass selectedItemClass //exit; if(selectedItemID==""){ alert("No record is selected"); exit; } if(EditmyNewItemMax==""){ alert("Invalid Maximum Order Quantity"); exit; } if(EditmyNewItemMin==""){ alert("Invalid Minumum Order Quantity."); exit; } if(EditmyNewItemUOM==""){ alert("Please select Unit of Measure."); exit; } ShowUploadBar(); $.ajax({ url: "PRF_UpdateItemMaster.php", type: "POST", async: false, data: { "EditNewItemDescription": EditNewItemDescription, "selectedItemID": selectedItemID, "EditmyNewItemMax": EditmyNewItemMax, "EditmyNewItemMin": EditmyNewItemMin, "EditmyNewItemUOM": EditmyNewItemUOM, "done": 1 }, success: function(d){ ShowUploadBar(); $("#itemMasterFileView").html(d); hideAddItemMaster(); $('#NewItemDescription').val(''); } }) }); $("#searchItemButton").click(function(){ var searchItem = $("#searchItem").val(); //alert(searchItem); if(searchItem == ""){ alert("Invalid Entry."); exit; } ShowUploadBar(); $.ajax({ url: "PRF_SearchItemMasterfiel.php", type: "POST", async: false, data: { "searchItem": searchItem, "done": 1 }, success: function(d){ ShowUploadBar(); $("#itemMasterFileView").html(d); $('#searchItem').val(''); } }) }); $("#saveNewItemDescription").click(function(){ //myNewItemMax myNewItemMin myNewItemUOM NewItemDescription expenseID itemClassID itemTypeID var NewItemDescription = $("#NewItemDescription").val(); var expenseID = $("#expenseID").val(); var itemClassID = $("#itemClassID").val(); var itemTypeID = $("#itemTypeID").val(); var myNewItemMax = $("#myNewItemMax").val(); var myNewItemMin = $("#myNewItemMin").val(); var myNewItemUOM = $("#myNewItemUOM").val(); var itemTypeName = $("#itemTypeName").val(); //alert(expenseID + " - " + NewItemCategory);NewItemClass selectedItemClass //exit; if(NewItemDescription==""){ alert("Invalid ITEM DESCRIPTION"); exit; } if(myNewItemUOM==""){ alert("Please select Unit of Measure."); exit; } ShowUploadBar(); $.ajax({ url: "PRF_SaveNewItemDescription.php", type: "POST", async: false, data: { "myNewItemUOM": myNewItemUOM, "myNewItemMin": myNewItemMin, "myNewItemMax": myNewItemMax, "itemTypeID": itemTypeID, "itemClassID": itemClassID, "itemTypeName": itemTypeName, "expenseID": expenseID, "NewItemDescription": NewItemDescription, "done": 1 }, success: function(d){ ShowUploadBar(); $("#itemMasterFileView").html(d); hideAddItemMaster(); $('#NewItemDescription').val(''); } }) }); $("#saveNewItemClass").click(function(){ var itemClassID = $("#itemClassID").val(); var NewItemClass = $("#NewItemClass").val(); //alert(expenseID + " - " + NewItemCategory);NewItemClass selectedItemClass //exit; if(NewItemClass==""){ alert("Please select Asset Category first."); exit; } ShowUploadBar(); $.ajax({ url: "PRF_SaveNewItemClass.php", type: "POST", async: false, data: { "itemClassID": itemClassID, "NewItemClass": NewItemClass, "done": 1 }, success: function(d){ ShowUploadBar(); $("#itemClassView").html(d); hideAddItemClass(); $('#selectedItemClass').val(''); $('#NewItemClass').val(''); } }) }); //===================================================================================================== $("#saveNewItemCategory").click(function(){ var expenseID = $("#expenseID").val(); var NewItemCategory = $("#NewItemCategory").val(); if(NewItemCategory==""){ alert("Please select Expense Category first."); exit; } ShowUploadBar(); $.ajax({ url: "PRF_SaveNewItemCategory.php", type: "POST", async: false, data: { "expenseID": expenseID, "NewItemCategory": NewItemCategory, "done": 1 }, success: function(d){ ShowUploadBar(); $("#itemCategoryView").html(d); hideAddExpenseCategory(); $('#selectedExpenseType').val(''); $('#NewItemCategory').val(''); } }) }); $("#saveNewExpenseType").click(function(){ var expenseID = $("#expenseID").val(); var NewExpenseType = $("#NewExpenseType").val(); if(NewExpenseType==""){ alert("Invalid Entry. Blank field is not allowed."); exit; } ShowUploadBar(); $.ajax({ url: "PRF_SaveNewExpenseType.php", type: "POST", async: false, data: { "expenseID": expenseID, "NewExpenseType": NewExpenseType, "done": 1 }, success: function(d){ ShowUploadBar(); $("#expenseDataView").html(d); hideAddExpenseType(); $('#NewExpenseType').val(''); } }) }); $("#expenseDataView").click(function(){ var expenseID = $("#expenseID").val(); ShowUploadBar(); $.ajax({ url: "PRF_loadExpenseType.php", type: "POST", async: false, data: { "expenseID": expenseID, "done": 1 }, success: function(d){ ShowUploadBar(); $("#itemCategoryView").html(d); } }) }); $("#itemCategoryView").click(function(){ var itemClassID = $("#itemClassID").val(); // alert(itemClassID); // exit ShowUploadBar(); $.ajax({ url: "PRF_filterItemClass.php", type: "POST", async: false, data: { "itemClassID": itemClassID, "done": 1 }, success: function(d){ ShowUploadBar(); $("#itemClassView").html(d); } }) }); $("#mainTable").click(function(){ var itemTypeName = $("#itemTypeName").val(); var itemClassID = $("#itemClassID").val(); var itemTypeID = $("#itemTypeID").val(); //alert(itemClassID); ShowUploadBar(); $.ajax({ url: "PRF_LoadItemMaster.php", type: "POST", async: false, data: { "itemTypeName": itemTypeName, "itemClassID": itemClassID, "itemTypeID": itemTypeID, "done": 1 }, success: function(d){ ShowUploadBar(); $("#itemMasterFileView").html(d); } }) }); }); </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0.11 |
proxy
|
phpinfo
|
Settings