|
@@ -480,10 +480,10 @@ function report_purchases (reporting){
|
|
|
self.fect_cabecera(self.resCompany, self.newInvoice);
|
|
|
download(self.newCabecera, fileName, "text/plain");
|
|
|
}else{
|
|
|
- alert('No hay registros para importar');
|
|
|
+ self.showMensajeRegistro();
|
|
|
}
|
|
|
}else{
|
|
|
- alert('Debe elegir un periodo');
|
|
|
+ self.showMensaje();
|
|
|
}
|
|
|
},
|
|
|
// Descargar el archivo adjunto
|
|
@@ -511,5 +511,61 @@ function report_purchases (reporting){
|
|
|
$(".preview").attr("data-lightbox",dato.name);
|
|
|
$(".preview").attr("href",img);
|
|
|
},
|
|
|
+ // Lanzar el mensaje de pediodo
|
|
|
+ showMensaje : function(modelos){
|
|
|
+ var self = this;
|
|
|
+ $("#dialog" ).dialog({
|
|
|
+ autoOpen: true,
|
|
|
+ resizable: false,
|
|
|
+ modal: true,
|
|
|
+ title: 'Atención',
|
|
|
+ width: 500,
|
|
|
+ open: function() {
|
|
|
+ $(this).html('Debe elegir un periodo');
|
|
|
+ },
|
|
|
+ show: {
|
|
|
+ effect: "fade",
|
|
|
+ duration: 200
|
|
|
+ },
|
|
|
+ hide: {
|
|
|
+ effect: "fade",
|
|
|
+ duration: 200
|
|
|
+ },
|
|
|
+ buttons: {
|
|
|
+ Aceptar: function() {
|
|
|
+ $(this).dialog('close');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return
|
|
|
+ },
|
|
|
+ // Lanzar mensaje de registros
|
|
|
+ showMensajeRegistro : function(modelos){
|
|
|
+ var self = this;
|
|
|
+ $("#dialog" ).dialog({
|
|
|
+ autoOpen: true,
|
|
|
+ resizable: false,
|
|
|
+ modal: true,
|
|
|
+ title: 'Atención',
|
|
|
+ width: 500,
|
|
|
+ open: function() {
|
|
|
+ $(this).html('No hay registros que exportar');
|
|
|
+ },
|
|
|
+ show: {
|
|
|
+ effect: "fade",
|
|
|
+ duration: 200
|
|
|
+ },
|
|
|
+ hide: {
|
|
|
+ effect: "fade",
|
|
|
+ duration: 200
|
|
|
+ },
|
|
|
+ buttons: {
|
|
|
+ Aceptar: function() {
|
|
|
+ $(this).dialog('close');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return
|
|
|
+ },
|
|
|
});
|
|
|
}
|