?
Current Path : /home1/savoy/public_html/savoyglobal.net/rms/application/views/inventory/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/public_html/savoyglobal.net/rms/application/views/inventory/inventoryfunctions.php |
<script type="text/javascript"> function check_value(value,cur,name) { if(isNaN(cur)) { alert('enter number'); name.value=""; } if(cur>value) { alert('Exceeds availble stock'); name.value=""; } } function check_stock(id) { append=id.slice(-1); select_id="inventory_utilization_stock_id"+append; var item_id=document.getElementById(select_id).value; if(item_id=="") { alert("Select an item" ) } else if(isNaN($("#"+id).val())) { alert('Enter Number'); $("#"+id).val(''); } else { $.ajax({ type: "POST", url: "<?= site_url()?>"+'/inventory/checkstock/'+item_id, success: function(msg) { if(parseInt($("#"+id).val())>parseInt(msg)) { alert('Exceeds the available stock \n\n Maximum availabilty : '+msg); $("#"+id).val(''); } } }); } } </script>