| Server IP : 162.214.74.102 / Your IP : 216.73.216.192 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/www/lrsys_apps/vilagran/application/plugins/modulo_fiscal/assets/js/ |
Upload File : |
$(function(){
var _url = $("#_url").val();
////////////////////////IMAGES
var upload_resp;
var $ib_form_submit = $("#submit");
var ib_file = new Dropzone("#upload_container", {
url: _url + "modulo_fiscal/importar/import_nfe_xml",
maxFiles: 100,
acceptedFiles: "text/xml/*",
autoProcessQueue: false,
maxfiles: 100,
parallelUploads : 100,
maxFilesize: 4,
dictInvalidFileType: "Arquivo enviado não é um XML",
uploadMultiple: true,
addRemoveLinks: true,
init: function() {
var qtd = 0;
var submitButton = $ib_form_submit,
dpzone = this;
dpzone.on("sending", function () {
$ib_form_submit.prop('disabled', true);
$(".retNotas").show();
});
// dpzone.on("addedfile", function(file) {
// dpzone.emit("thumbnail", file, "application/plugins/modulo_fiscal/empresa/envioXMLNfe");
// });
dpzone.on("uploadprogress", function (a, progress, sent) {
$(".progress-bar ").css({width: progress+"%"});
});
dpzone.on("complete", function(file, response) {
dpzone.removeFile(file);
qtd++;
$ib_form_submit.prop('disabled', false);
if(qtd>1)
$("#notasOk").html(qtd+" notas enviadas");
else
$("#notasOk").html(qtd+" nota enviada");
});
},
});
$ib_form_submit.on("click", function(){
ib_file.processQueue();
//console.log(ib_file);
});
});
function progress(){
var pbar = $('#progressbar');
pbar.hide();
pbar.progressbar({
warningMarker: 100,
dangerMarker: 100,
maximum: 100,
step: 15
});
var timer = setInterval(function () {
pbar.progressbar('stepIt');
}, 100);
$('#ibox_form').block({ message: null });
$('#progressbar').show();
$('.progress').show();
$('.progress .progress-bar').progressbar();
}
function import_gov(){
bootbox.prompt("Digite a chave da nota", function(result){
if(result){
progress();
$.get($("#app_url").val()+'/?ng=modulo_fiscal/importar/import_nfe_gov/'+result, function(ret){
bootbox.alert(ret);
$('.progress').hide();
$('#ibox_form').unblock();
});
}
});
}
// function import_xml(){
// alert($('.dropzone').serialize());return;
// $.get(_url+'modulo_fiscal/importar/import_nfe_xml/'+$('#file').val(), function(ret){
// bootbox.alert(ret);
// });
// }