����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����
Server IP : 74.208.127.88 / Your IP : 3.147.43.250 Web Server : Apache/2.4.41 (Ubuntu) System : Linux ubuntu 5.4.0-163-generic #180-Ubuntu SMP Tue Sep 5 13:21:23 UTC 2023 x86_64 User : www-data ( 33) PHP Version : 7.4.3-4ubuntu2.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/t/sae/application/masterIONOS/ |
Upload File : |
$(document).ready( function () { var value = { method : "getdata" }; $('#table_search').DataTable({ "paging": true, "lengthChange": false, "searching": true, "ordering": true, "info": false, "responsive": true, "autoWidth": false, "pageLength": 50, "dom": '<"top"f>rtip', "ajax": { "url": "c_item.php", "type": "POST", "data":value, }, "columns": [ { "data": "urutan" }, { "data": "id_item" }, { "data": "item_name" }, { "data": "price" }, { "data": "tax" }, { "data": "stock" }, { "data": "note" }, { "data": "button" }, ] }); $("#table_search_filter").addClass("pull-right"); }); $(document).on( "click","#btnadd", function() { $(".contentharga").remove(); $("#modalmasteritem").modal('show'); newitem(); }); $(document).on( "click","#in_button", function() { $("#Entradadmodal").modal('show'); }); function newitem() { $("#txtiditem").val("*New"); $("#txtcodebar").val(""); $("#txtname").val(""); $("#txttax").val(""); $("#txtstock").val(0); $("#txtprice").val(0); $("#txtnote").val(""); $("#inputcrud").val("N"); //actualizado al 20/04/2021 var BarcodeInput = document.getElementById('txtcodebar'); BarcodeInput.disabled =false; var VentasInput = document.getElementById('txtstock'); VentasInput.disabled =true; $("#txtunit").change(); set_focus("#txtcodebar"); } $(document).on( "click",".btnedit", function() { var id_item = $(this).attr("id_item"); var value = { id_item: id_item, method : "get_detail_item" }; $.ajax( { url : "c_item.php", type: "POST", data : value, success: function(data, textStatus, jqXHR) { var hasil = jQuery.parseJSON(data); data = hasil.data; $("#inputcrud").val("E"); //se se deshabilita input barcode $("#txtcodebar").val(data.barcode); var BarcodeInput = document.getElementById('txtcodebar'); BarcodeInput.disabled =true; var VentasInput = document.getElementById('txtstock'); $("#txtiditem").val(data.id_item); $("#txtname").val($.trim(data.item_name)); $("#txtunit").val($.trim(data.unit)); $("#txtstock").val(data.stock); $("#txttax").val(data.tax); $("#txtprice").val(addCommas(data.price)); $("#txtnote").val($.trim(data.note)); $("#modalmasteritem").modal('show'); set_focus("#txtname"); }, error: function(jqXHR, textStatus, errorThrown) { } }); }); $(document).on( "click","#btnsaveitem", function() { var id_item = $("#txtiditem").val(); var barcode = $("#txtcodebar").val(); var item_name = $("#txtname").val(); var unit = $("#txtunit").val(); var tax = cleanString($("#txttax").val()); var stock = cleanString($("#txtstock").val()); var price = cleanString($("#txtprice").val()); var note = $("#txtnote").val(); var crud=$("#inputcrud").val(); if(crud == 'E'){ if(id_item == '' || id_item== null ){ $.notify({ message: "registro invalido" },{ type: 'warning', delay: 8000, }); $("#txtiditem").focus(); return; } } if(item_name == '' || item_name== null ){ $.notify({ message: "por favor ingrese nombre" },{ type: 'warning', delay: 8000, }); $("#txtname").focus(); return; } var value = { id_item: id_item, barcode: barcode, item_name: item_name, unit:unit, tax:tax, stock:stock, price:price, note:note, crud:crud, method : "save_item" }; $(this).prop('disabled', true); proccess_waiting("#infoproses"); $.ajax( { url : "c_item.php", type: "POST", data : value, success: function(data, textStatus, jqXHR) { $("#btnsaveitem").prop('disabled', false); $("#infoproses").html(""); var data = jQuery.parseJSON(data); if(data.ceksat == 0){ $.notify(data.error); }else{ if(data.crud == 'N'){ if(data.result == 1){ $.notify('Registro Guardado!'); var table = $('#table_item').DataTable(); table.ajax.reload( null, false ); newitem(); }else{ $.notify({ message: "Error save item, error :"+data.error },{ type: 'danger', delay: 5000, }); set_focus("#txtiditem"); } }else if(data.crud == 'E'){ if(data.result == 1){ $.notify('Registro Actualizado'); var table = $('#table_item').DataTable(); table.ajax.reload( null, false ); $("#modalmasteritem").modal("hide"); }else{ $.notify({ message: "Error al actualizar item, error :"+data.error },{ type: 'danger', delay: 5000, }); set_focus("#txtiditem"); } }else{ $.notify({ message: "Registro Invalido!" },{ type: 'danger', delay: 5000, }); } } }, error: function(jqXHR, textStatus, errorThrown) { $("#btnsaveitem").prop('disabled', false); } }); }); $(document).on( "click",".btndelete", function() { var id_item = $(this).attr("id_item"); var barcode = $(this).attr("barcode"); $("#passwordmodal").modal("show"); $("#txthidetrxid").val($(this).attr("id_item")); $("#txthiddentrans").val(barcode); $("#notepassword").html("Por Favor Ingrese contraseña para continuar!"); set_focus("#txtpass"); }); $(document).on("click",'#btncheckpass',function(){ var pass=$("#txtpass").val(); var value = { pass : pass, method : "check_password" }; $.ajax( { url : "../model/check_password.php", type: "POST", data : value, success: function(data, textStatus, jqXHR) { var data = jQuery.parseJSON(data); if(data.auth == true) { $("#passwordmodal").modal("hide"); $("#txtpass").val(""); var id_item = $("#txthidetrxid").val(); var barcode = $("#txthiddentrans").val(); swal({ title: "Borrar Producto", text: "Eliminar artículo maestro con Codigo : " + barcode + " ?", type: "warning", showCancelButton: true, confirmButtonColor: "#DD6B55", confirmButtonText: "Borrar", closeOnConfirm: true }, function(){ var value = { id_item: id_item, method : "delete_item" }; $.ajax( { url : "c_item.php", type: "POST", data : value, success: function(data, textStatus, jqXHR) { var data = jQuery.parseJSON(data); if(data.result ==1){ $.notify('Registro Borrado'); var table = $('#table_item').DataTable(); table.ajax.reload( null, false ); init_data(); }else{ $.notify({ message: "Error Inesperado!, Valor Error : "+ data.error },{ type: 'warning', delay: 8000, }); } }, error: function(jqXHR, textStatus, errorThrown) { $.notify({ message: "Error al borrar Registro, # : "+ data.error },{ type: 'eror', delay: 8000, }); } }); }); }else{ $.notify({ message: "La contraseña no coincide/Usuario No Autorizado, #: " + data.text1 },{ type: 'danger', delay: 5000, }); set_focus("#txtpass"); return; } }, error: function(jqXHR, textStatus, errorThrown) { loading_stop(); } }); }); function init_data(){ var value = { method : "getdata" }; $('#table_item').DataTable({ "paging": true, "lengthChange": false, "searching": true, "ordering": true, "info": false, "responsive": true, "autoWidth": false, "pageLength": 50, "dom": '<"top"f>rtip', "ajax": { "url": "c_item.php", "type": "POST", "data":value, }, "columns": [ { "data": "urutan" }, { "data": "id_item" }, { "data": "item_name" }, { "data": "price" }, { "data": "tax" }, { "data": "stock" }, { "data": "note" }, { "data": "button" }, ] }); $("#table_item_filter").addClass("pull-right"); }