<?php
$StrCmd=V($_POST['TxtAc']);
//-------------------------
$Emp=V($_POST['Emp']);			
$InvSer=V($_POST['InvSer']);		
$InvNum=V($_POST['InvNum']);		
$Dex=V($_POST['Dex']);		
$Hax=V($_POST['Hax']);
$Prv=V($_POST['Prv']);
$PunOri=V($_POST['PunOri']);
$PunDes=V($_POST['PunDes']);
//+++
if(strlen($Emp)==0)$Emp="TODOS";
//if(strlen($Dex)==0)$Dex=date("d-m-y");			
//if(strlen($Hax)==0)$Hax=date("d-m-y");			
if(strlen($Prv)==0)$Prv="TODOS";
if(strlen($PunOri)==0)$PunOri="TODOS";
if(strlen($PunDes)==0)$PunDes="TODOS";
//+++
$Emp_=LIKE($Emp);
$InvSer_=$InvSer."%";
$InvNum_="%".$InvNum."%";
$Dex_=dex_($Dex);
$Hax_=hax_($Hax);
$Prv_=LIKE($Prv);
$PunOri_=LIKE($PunOri);
$PunDes_=LIKE($PunDes);
//
$FF="ID>0 AND EMP_NC LIKE '$Emp_' AND 	 
	 INV_SER LIKE '$InvSer_' AND INV_NUM LIKE '$InvNum_' AND 
	 FEC>='$Dex_' AND FEC<='$Hax_' AND PROVEEDOR LIKE '$Prv_' AND 
	 PTO_ORI LIKE '$PunOri_' AND PTO_DES LIKE '$PunDes_' ";
//++
$LStrTR=gn("count(*)","vis_ges_invoice",$FF);
$LStrPag=V($_POST['TxtPag']);
if($StrCmd=="F"){$LStrPag="1";}
$VP_RegXPag=19;	
$LStrPag=PagGet($LStrPag,$StrCmd,$LStrTR,$VP_RegXPag);
?>