<div class="content-wrapper">
	<!-- Content Header (Page header) -->
	<section class="content-header">
		<h1>
			Canje de letras proveedor reporte
			<small>modulo</small>
		</h1>
		<ol class="breadcrumb">
			<li><a href="#"><i class="fa fa-dashboard"></i> Inicio</a></li>
			<li><a href="#">Colsultas</a></li>  
			<li><a href="#">Canje de letras proveedor reporte</a></li> 
		</ol>
	</section>  

	<div class="modal fade" id="div_canje_form_vista_dialog" role="dialog" data-keyboard="false" data-backdrop="static" tabindex="-1"  style="padding:0px;overflow-y:scroll;">
			<div class="modal-dialog" style="width: 95% !important;"    role="document" >

			<div class="modal-content">

			<div class="modal-body div_canje_form_vista" style="padding:0%;" >

			</div>
			<br />
			<br />
			</div>
			</div>
			</div>
			
	<!-- filtro de registro -->
	<div id="div_canje_filtro" ></div>
	<!-- lista de datos -->
	<div id="div_caje_tabla" ></div>

</div>

<script type="text/javascript">


function canjeproveedor_cst_filtro()
{
	$.ajax({
		type: "POST",
		url: "../canjeproveedor_cst/canjeproveedor_cst_filtro.php",
		async:true,
		dataType: "html",                      
		//data: ({
			//producto: $('#txt_fil_pro').val()
		//}),
		beforeSend: function() {
			var div = "<center><div class='overlay col-lg-12 col-sm-12 col-xs-12' style='background-color:#fff;padding:0%;font-size:3rem;' >  <i class='fa fa-refresh fa-spin ' ></i> </div>  </center>";				
			$('#div_canje_filtro').html(div);
		},
		success: function(html){
			$('#div_canje_filtro').html(html);
		},
		complete: function(){
		//	cuentasxpagar_tabla();
		}
	});
}




function canje_form_vista(act,id){
			$('#div_canje_form_vista_dialog').modal();
		//$('body').css('overflow-y','hidden');
			$.ajax({
				type: "POST",
				url: "../canjeproveedor/canjeproveedor_form_vista.php",
				async:true,
				dataType: "html",                      
				data: ({
						act:act ,
						canid : id
				}),
				beforeSend: function() {
					var div = "<center><div class='overlay col-lg-12 col-sm-12 col-xs-12' style='background-color:#fff;padding:0%;font-size:3rem;' >  <i class='fa fa-refresh fa-spin ' ></i> </div>  </center>";	
					$('.div_canje_form_vista').html(div);
				},
				success: function(html){
					$('.div_canje_form_vista').html(html);				
				}
			});
		}

		
		
function canje_letras_tabla_vista(act,canid)
{
	$.ajax({
		type: "POST",
		url: "../canjeproveedor/canje_letra_tabla_vista.php",
		async:false,
		dataType: "html",                  
		data: ({
			action:	 act,
			canid:canid

		}),
		beforeSend: function() {
			$('#div_canje_car_tabla_vista').addClass("ui-state-disabled");
		},
		success: function(html){
			$('#div_canje_car_tabla_vista').html(html);
		},
		complete: function(){			
			$('#div_canje_car_tabla_vista').removeClass("ui-state-disabled");

		}
	});
}

		
function canjeproveedor_cst_tabla()
{
	$.ajax({
		type: "POST",
		url: "../canjeproveedor_cst/canjeproveedor_cst_tabla.php",
		async:true,
		dataType: "html", 
		data: $("#for_fil_pro").serialize(),                    
		beforeSend: function() {
			
			$('#div_caje_tabla').addClass("ui-state-disabled");
		},
		success: function(html){
			$('#div_caje_tabla').html(html);
		},
		complete: function(){			
			$('#div_caje_tabla').removeClass("ui-state-disabled");
			
		}
	});     
}





	$(function() {

		$('#btn_actualizar').click(function() {
			$("#content").load("../cajeproveedor/cajeproveedor_vista.php");
		});


	$("#div_canjeletra_form_dialog").on('hidden.bs.modal', function () {
		   	$('body').css('overflow-y','hidden');
		});

		canjeproveedor_cst_filtro();

		setTitle("CANJE DE LETRAS PROVEEDOR REPORTES - "+nombreEmpresa); 

	});

</script>  