AnonSec Shell
Server IP : 162.214.74.102  /  Your IP : 216.73.217.80
Web Server : Apache
System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64
User : lrsys ( 1015)
PHP Version : 5.6.40
Disable Function : exec,passthru,shell_exec,system
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/lrsys/public_html/lrsys_apps/dialogo/application/plugins/module_stock/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/lrsys/public_html/lrsys_apps/dialogo/application/plugins/module_stock/assets/js/item.js
var _url = $("#_url").val();
var $modal = $('#ajax-modal');
var modal = $("#ins_release").html();
$("#ins_release").remove();

$(function(){
    $(".progress").hide();
    $("#emsg").hide();

    $(".includ").click(function(){
        var dec;
        $modal.html(modal);
        $("#date_release").mask("99/99/9999");
        $("#time_release").mask("99:99");
        $('#price_release').maskMoney();
        // $('#qty_release').maskMoney();
        // $('#qty_release').autoNumeric('init', {aSep: ind_mil, aDec: ind_decimal, mDec: 3, aSign: ' '+item_sifr, pSign: 's'});

        if($('#item_decimal').val() == 0)
            dec = 3;
        else
            dec = 0;

        $('#qty_release').autoNumeric('init', {aSep: ',', aDec: '.', mDec: dec, aSign: ' '+$("#item_unidade").val(), pSign: 's'});
         findDataSelect("#crm_accounts_id", 'contacts/ajax-listbygroup/Associated', '');
        $("#date_release").datepicker({
            dateFormat: "dd/mm/yyyy",
            autoclose: true
        }).on('change', function () {
            $(this).datepicker('hide');
        });
        
        $("#due_date").datepicker({
            dateFormat: "dd/mm/yyyy",
            autoclose: true
        }).on('change', function () {
            $(this).datepicker('hide');
        });
        $modal.modal();    
    });

    dropdown();
    datepickerPatch();
    filterPeriod();
    filterType();
    filterclear();
    
    $('#filter_crm_accounts_id').on('change', function(event) {
        event.preventDefault();
        $('#filter-form').submit();
    });
    
     findDataSelect("#filter_crm_accounts_id", 'contacts/ajax-listbygroup/Associated', '');
    
});


function busca(id){
    $.ajax({
        type: "GET",
        url: _url+'module_stock/stock/busca/'+id
    }).done(function(ret) {
        vals = ret.split(";");
        $modal.html(modal);
        $modal.find("#type_release").val(vals[0]);
        $modal.find("#date_release").val(vals[1]);
        $modal.find("#time_release").val(vals[2]);
        $modal.find("#qty_release").val(vals[3]);
        $modal.find("#price_release").val(vals[4]);
        $modal.find("#obs_release").val(vals[5]);
        $modal.find("#id_rels").val(vals[6]);
        $modal.find("#crm_accounts_id").html(vals[7]);
        $modal.modal();
        $("#time_release").mask("99:99");
        $("#date_release").mask("99/99/9999");
        $('#price_release').maskMoney();
        if($('#item_decimal').val() == 0)
            dec = 3;
        else
            dec = 0;
        findDataSelect("#crm_accounts_id", 'contacts/ajax-listbygroup/Associated', '');
        $('#qty_release').autoNumeric('init', {aSep: ',', aDec: '.', mDec: dec, aSign: ' '+$("#item_unidade").val(), pSign: 's'});
        $("#date_release").datepicker({
            dateFormat: "dd/mm/yyyy",
            autoclose: true
        }).on('change', function () {
            $(this).datepicker('hide');
        });
    });
}

function ins_release(){
    if(!($modal).find("form").find("#moduleFish").val()){
        if((!($modal).find("form").find("#date_release").val()) ||
            (!($modal).find("form").find("#qty_release").val()) ||
            (!($modal).find("form").find("#price_release").val())
            ){
            bootbox.alert("Preencha todos os campos com *"); return;
        }
    }
    if(($modal).find("form").find("#moduleFish").val()){
        if  ((!($modal).find("form").find("#date_release").val()) ||
            (!($modal).find("form").find("#qty_release").val()) ||
            (!($modal).find("form").find("#price_release").val())||
            (!($modal).find("form").find("#crm_accounts_id").val())){
            bootbox.alert("Preencha todos os campos com *"); return;
        }
    }
    validate = ($modal).find("form").find("#date_release").val().split("/");
    if( (validate[0] > 31) ||
        (validate[1] > 12) ){
        bootbox.alert("Data inválida!<br>Digite novamente por favor.");
        return;
    }
    validate = ($modal).find("form").find("#time_release").val().split(":");
    if( (validate[0] > 23) ||
        (validate[1] > 59) ){
        bootbox.alert("Hora inválida!<br>Digite novamente por favor.");
        return;
    }


    $.ajax({
        type: "POST",
        url: _url+'module_stock/stock/add',
        data: ($modal).find("form").serialize()
    }).done(function(ret) {
        bootbox.alert(ret);
        setTimeout(function(){
            location.reload();
        }, 600);
    });
}

function atu_release(){
    $.ajax({
        type: "POST",
        url: _url+'module_stock/stock/add',
        data: ($modal).find("form").serialize()
    }).done(function(ret) {
        bootbox.alert(ret);
        setTimeout(function(){
            location.reload();
        }, 600);
    });
}

function del_release(id){
    $.ajax({
        type: "POST",
        url: _url+'module_stock/stock/del',
        data: {id: id}
    }).done(function(ret) {
        bootbox.alert(ret);
        setTimeout(function(){
            location.reload();
        }, 500);
    });
}

function remov_lanc(id){
    bootbox.confirm({
        message: "Deseja realmente remover este lançamento?",
        buttons: {
            confirm: {
                label: 'Sim',
                className: 'btn-success'
            },
            cancel: {
                label: 'Não',
                className: 'btn-danger'
            }
        },
        callback: function (result) {
            if(result)
                del_release(id);
        }
    });
}

function dropdown() {
	$('.dd-filter').click(function (event) {
		event.stopPropagation();
	});
}

function filterPeriod() {
	$('#period-filter-interval').click(function (event) {
		event.preventDefault();
		$('#filter-form').submit();
	});
}

function filterType() {
	$('#advanced-filter').click(function (event) {
		event.preventDefault();
		$('#filter-form').submit();
	});
}

function filterclear() {
	$('#filter-clear').click(function (event) {
		event.preventDefault();
		$('#filter_crm_accounts_id').val('');
		$('#filter-form').find('input[name="ini"]').val('');
		$('#filter-form').find('input[name="end"]').val('');
		$('#filter-form').find('input[name="type"]').val('');

		$('#filter-form').submit();
	});
}

function datepickerPatch() {
        $('input[name="p_ini"]').on('change', function (ev) {
             $(this).datepicker('hide');
	});

	$('input[name="p_end"]').on('change', function (ev) {
		$(this).datepicker('hide');
	});
}



Anon7 - 2022
AnonSec Team