function alertas_ajax(alerta){
	if(alerta.Alerta==="simple"){
		Swal.fire({
		  title: alerta.Titulo,
		  text: alerta.Texto,
		  icon: alerta.Icon,
		  confirmButtonText: alerta.TxtBtn
		});
	}else if(alerta.Alerta==="recargar"){
		Swal.fire({
		  title: alerta.Titulo,
		  text: alerta.Texto,
		  icon: alerta.Icon,
		  confirmButtonText: alerta.TxtBtn
		}).then((result)=>{
			if(result.value) {
				location.reload();
			}
		});
	}else if(alerta.Alerta==="limpiar"){
		Swal.fire({
		  title: alerta.Titulo,
		  text: alerta.Texto,
		  icon: alerta.Icon,
		  confirmButtonText: alerta.TxtBtn
		}).then((result)=>{
			if(result.value) {
				document.querySelector(".FormularioAjax").reset();
			}
		});
	}else if(alerta.Alerta==="venta"){
		Swal.fire({
			title: alerta.Titulo,
			text: alerta.Texto,
			icon: alerta.Icon,
			confirmButtonText: alerta.TxtBtn
		}).then((result)=>{
			if(result.value) {
				document.querySelector('#sale-barcode-input').value="";
			}
		});
	}else if(alerta.Alerta==="redireccionar"){
		window.location.href=alerta.URL;
	}
}
/*----------  Funcion mostrar alertas - Show alerts function ----------*/
Funcion mostrar alertas - Show alerts function
Funcion mostrar alertas - Show alerts function
function alertas_ajax(alerta){
	if(alerta.Alerta==="simple"){
		Swal.fire({
		  title: alerta.Titulo,
		  text: alerta.Texto,
		  icon: alerta.Icon,
		  confirmButtonText: alerta.TxtBtn
		});
	}else if(alerta.Alerta==="recargar"){
		Swal.fire({
		  title: alerta.Titulo,
		  text: alerta.Texto,
		  icon: alerta.Icon,
		  confirmButtonText: alerta.TxtBtn
		}).then((result)=>{
			if(result.value) {
				location.reload();
			}
		});
	}else if(alerta.Alerta==="limpiar"){
		Swal.fire({
		  title: alerta.Titulo,
		  text: alerta.Texto,
		  icon: alerta.Icon,
		  confirmButtonText: alerta.TxtBtn
		}).then((result)=>{
			if(result.value) {
				document.querySelector(".FormularioAjax").reset();
			}
		});
	}else if(alerta.Alerta==="venta"){
		Swal.fire({
			title: alerta.Titulo,
			text: alerta.Texto,
			icon: alerta.Icon,
			confirmButtonText: alerta.TxtBtn
		}).then((result)=>{
			if(result.value) {
				document.querySelector('#sale-barcode-input').value="";
			}
		});
	}else if(alerta.Alerta==="redireccionar"){
		window.location.href=alerta.URL;
	}
}
function alertas_ajax ( alerta ) { if ( alerta . Alerta === "simple" ) { Swal . fire ( { title : alerta . Titulo , text : alerta . Texto , icon : alerta . Icon , confirmButtonText : alerta . TxtBtn } ) ; } else if ( alerta . Alerta === "recargar" ) { Swal . fire ( { title : alerta . Titulo , text : alerta . Texto , icon : alerta . Icon , confirmButtonText : alerta . TxtBtn } ) . then ( ( result ) => { if ( result . value ) { location . reload ( ) ; } } ) ; } else if ( alerta . Alerta === "limpiar" ) { Swal . fire ( { title : alerta . Titulo , text : alerta . Texto , icon : alerta . Icon , confirmButtonText : alerta . TxtBtn } ) . then ( ( result ) => { if ( result . value ) { document . querySelector ( ".FormularioAjax" ) . reset ( ) ; } } ) ; } else if ( alerta . Alerta === "venta" ) { Swal . fire ( { title : alerta . Titulo , text : alerta . Texto , icon : alerta . Icon , confirmButtonText : alerta . TxtBtn } ) . then ( ( result ) => { if ( result . value ) { document . querySelector ( '#sale-barcode-input' ) . value = "" ; } } ) ; } else if ( alerta . Alerta === "redireccionar" ) { window . location . href = alerta . URL ; } }
Funcion mostrar alertas - Show alerts function
Funcion mostrar alertas - Show alerts function