File manager - Edit - /home/autoph/public_html/connect/home/inventory_price_setup.php
Back
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <?php $userID=$user_data['u_id']; $toDate = date_create() ->format("Y/m/d"); ?> <script type="text/javascript"> $(function () { $('.showMenu').click(function () { $('.DivToHide').show(); }); $('.showMenu').click(function () { $('.DivToHide').hide(); }); }); function showAddNewForm(){ var diva=document.getElementById("AddNewInventoryForm"); if (diva.style.display == 'none') { diva.style.display = ''; } else { diva.style.display = 'none'; } } function hideAssignMsg(){ $("#saveMessage").fadeOut(10000); }; function showAssignMsg(){ $("#saveMessage").fadeIn(); }; function invHideAssignMsg(){ $("#invMessage").fadeOut(10000); }; function invShowAssignMsg(){ $("#invMessage").fadeIn(); }; </script> <!--================================================ =====================================--> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <div id="wait" style="display:none;width:400px;height:100px;border:0px solid red;position:absolute;top:50%;left:45%;padding:2px;z-index:999999999999999999"> <img src='images/demo_wait.gif' width="64" height="64" /><br>Scanning. Please wait....</div> <!-- add jquery --> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(document).ajaxStart(function(){ $("#wait").css("display", "block"); }); $(document).ajaxComplete(function(){ $("#wait").css("display", "none"); }); $("#priceUpdate").click(function(){ //alert("test"); //return false; var unitPrice = $("#unitPrice").val(); var unitDiscount = $("#unitDiscount").val(); var unitComm = $("#unitComm").val(); var unitDesc = $("#unitDesc").val(); var activeCompany = $("#activeCompany").val(); var model = $("#model").val(); if (unitPrice == "") { $('#unitPrice').focus(); $('#unitPrice').css({'border-bottom':'1px solid red'}); $('#unitPrice').css({'color':'red'}); $('#unitPrice').attr("placeholder","Required*"); return false; } if (unitDiscount == "") { $('#unitDiscount').focus(); $('#unitDiscount').css({'border-bottom':'1px solid red'}); $('#unitDiscount').css({'color':'red'}); $('#unitDiscount').attr("placeholder","Required*"); return false; } if (unitComm == "") { $('#unitComm').focus(); $('#unitComm').css({'border-bottom':'1px solid red'}); $('#unitComm').css({'color':'red'}); $('#unitComm').attr("placeholder","Required*"); return false; } $.ajax({ url: "save_new_price.php", type: "POST", async: false, data: { "unitPrice":unitPrice, "unitDiscount":unitDiscount, "unitComm":unitComm, "unitDesc":unitDesc, "activeCompany":activeCompany, "model":model, "done": 1 }, success: function(d){ showAssignMsg(); $("#invMessage").html(d); hideAssignMsg(); $('#unitDesc').val(''); $('#unitComm').val(''); $('#unitPrice').val(''); $('#unitDiscount').val(''); } }) }); }); </script> <!--=============================================== =====================================--> <script type="text/javascript"><!-- function getVal(e) { //ARNEL ENDAYA var targ; //var searchV = $("#searchV").val(); if (!e) var e = window.event; if (e.target) targ = e.target; else if (e.srcElement) targ = e.srcElement; if (targ.nodeType == 8) // defeat Safari bug targ = targ.parentNode; var getData = targ.innerHTML; var unitDesc = $("#unitDesc").val(); //alert(getData); $.ajax({ url: "filter_unit_price.php", type: "POST", async: false, data: { "display": 1, "unitDesc": unitDesc, "getData": getData }, success: function(d){ //$("#viewInventoryPerModel").load("viewInventoryPerModel"); $("#viewInventoryPerModel").html(d); } }); } onload = function() { var t = document.getElementById("mainModel").getElementsByTagName("td"); for ( var i = 0; i < t.length; i++ ) t[i].onclick = getVal; } </script> <script language="javascript" type="text/javascript"> function showClearanceInfo(row) { var x=row.cells; document.getElementById("unitDesc").value = x[2].innerHTML; document.getElementById("unitPrice").value = x[3].innerHTML; document.getElementById("unitDiscount").value = x[4].innerHTML; document.getElementById("unitComm").value = x[5].innerHTML; document.getElementById("selModel").value = x[1].innerHTML; } </script> <div class='bodyTitle' style="font-family:Arial;font-size:20px;color:#f7510a;font-weight:bold">PRICE SETUP - <?php echo $_GET['model'];?></div> <div class='bodyMenu'> <input type='text' id='searchText' style='margin:0px;height:35px; float:left;;width:45%'> <button style='height:35px; float:left;;width:15%;min-width:100px'>Search...</button> <!-- <button style='height:35px; float:left;width:10%;min-width:100px' onclick="showAddNewForm()" >✚ New </button> --> <button style='height:35px; float:left;width:10%;min-width:50px;font-family:AriL;font-size:24px;color:green;font-weight:bold' onclick="location.reload()" >↺</button> <input type="hidden" id="selModel"> <input type="hidden" id="activeCompany" value="<?php echo $comName;?>"> </div> </div> <div style="background:#eceae9;width:100%;height:100px;border:0px solid red;margin:0px;margin-bottom:2px;padding:0px;border-bottom:1px solid gray"> <div id="saveMessage" style="position:absolute;display:none;background:yellow;padding:25px;width:61.2%;margin:10px;float:right;text-align:center;font-family:Arial;font-size:16px;font-weight:bold"> New price has been posted. </div> <div style="float:left;width:80%;text-align:left;border:0px solid red;padding:3px;margin-right:0px;color:black;padding:10px"> <div style="float:left;width:50%;text-align:left;border:0px solid red;padding:3px;margin-right:0px;color:black">UNIT DESCRIPTION</div> <div style="float:left;width:16%;text-align:left;border:0px solid red;padding:3px;margin-right:0px;color:black">UNIT PRICE</div> <div style="float:left;width:16%;text-align:left;border:0px solid red;padding:3px;margin-right:0px;color:black">DISCOUNT</div> <div style="float:left;width:16%;text-align:left;border:0px solid red;padding:3px;margin-right:0px;color:black">UNIT COMM.</div> <div style="float:left;width:50%;text-align:left;border:0px solid red;padding:3px;margin-right:0px"> <input type="text" id="unitDesc" disabled style="padding:10px;font-family:Arial;font-size:18px;width:100%;margin:0px"> </div> <div style="float:left;width:16%;text-align:left;border:0px solid red;padding:3px;margin-right:0px"> <input type="text" id="unitPrice" style="padding:10px;font-family:Arial;font-size:18px;width:100%;margin:0px"> </div> <div style="float:left;width:16%;text-align:left;border:0px solid red;padding:3px;margin-right:0px"> <input type="text" id="unitDiscount" style="padding:10px;font-family:Arial;font-size:18px;width:100%;margin:0px"> </div> <div style="float:left;width:16%;text-align:left;border:0px solid red;padding:3px;margin-right:0px"> <input type="text" id="unitComm" style="padding:10px;font-family:Arial;font-size:18px;width:100%;margin:0px"> </div> </div> <div style="float:left;width:20%;text-align:left;border:0px solid red;padding:0px;margin-right:0px;color:black;height:99px"> <div style="float:left;width:100%;text-align:left;border:0px solid red;padding:0px;margin-right:0px"> <input type="submit" value="UPDATE PRICE" id="priceUpdate" style="height:100px;padding:10px; font-family:Arial;font-size:18px;margin:0px"> </div> </div> </div> <div id="viewInventory" style="padding:15px;width:100%;margin:0px;background:white;min-height:250px;max-height:450px;overflow:auto;float:left"> <?php $model=$_GET['model']; $getUnitDescription=mysql_query("SELECT DISTINCT(description) FROM `db_vehicle_inventory` WHERE `brand_code`= '$model' AND `company`='$comName' ORDER BY description ASC "); echo "<table id='mainModel' style='width:100%;margin:00px'>"; echo "<thead>"; echo "<th style='width:6%;padding:8px%%'>NO</th>"; echo "<th style='width:15%;padding:8px%%'>MODEL</th>"; echo "<th style='width:40%;padding:8px%%'>VARIANT</th>"; echo "<th style='width:13%;padding:8px%%'>UNIT PRICE</th>"; echo "<th style='width:13%;padding:8px%%'>DISCOUNT PRICE</th>"; echo "<th style='width:13%;padding:8px%'>UNIT COMM</th>"; echo "</thead>"; while($row=mysql_fetch_array($getUnitDescription)){ $count=$count + 1; $desc = $row['description']; $unitPrice = mysql_result(mysql_query("SELECT `price` FROM `db_vehicle_inventory` WHERE `description`='$desc' AND `company`='$comName' AND `status`!='Demo'"),0); $DiscountPrice = mysql_result(mysql_query("SELECT `discount` FROM `db_vehicle_inventory` WHERE `description`='$desc' AND `company`='$comName' AND `status`!='Demo'"),0); $unitComm = mysql_result(mysql_query("SELECT `commission` FROM `db_vehicle_inventory` WHERE `description`='$desc' AND `company`='$comName' AND `status`!='Demo'"),0); ?><tr onclick="javascript:showClearanceInfo(this);"><?php echo "<td style='text-align:left;padding:8px;font-family:Arial;font-size:14px'>".$count."</td>"; echo "<td style='text-align:left;padding:8px'>".$model."</td>"; echo "<td style='text-align:left;padding:8px'>".$row['description']."</td>"; echo "<td style='text-align:left;padding:8px;text-align:right'>".number_format($unitPrice,2,'.',',')."</td>"; echo "<td style='text-align:left;padding:8px;text-align:right'>".number_format($DiscountPrice,2,'.',',')."</td>"; echo "<td style='text-align:left;padding:8px;text-align:right'>".number_format($unitComm,2,'.',',')."</td>"; echo "</tr>"; } echo "</table>"; ?> </div> <div id="viewInventoryPerModel" style="padding:15px;width:100%;margin:0px;background: #f9f7f6;height:468px;overflow:auto;float:left;border:1px solid gray"> <p style="font-family:Calibri;font-size:14px;color:gray;font-weight:normal;float:center;margin:40px">Select Vehicle Model...</p> </div>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings