<?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']);
$ProKod=V($_POST['ProKod']);
$ProDex=V($_POST['ProDex']);
$ProMea=V($_POST['ProMea']);
//
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";
//+++
$Emp_=LIKE($Emp);
$InvSer_=$InvSer."%";
$InvNum_="%".$InvNum."%";
$Dex_=dex_($Dex);
$Hax_=hax_($Hax);
$Prv_=LIKE($Prv);
$ProKod_="%".$ProKod."%";
$ProDex_="%".$ProDex."%";
$ProMea_="%".$ProMea."%";
//
$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 
	 DET_COD LIKE '$ProKod_' AND DET_DES LIKE '$ProDex_' AND 
	 MEDIDAS LIKE '$ProMea_' ";
//++
$LStrTR=gn("count(*)","vis_ges_invoice_detallado",$FF);
$LStrPag=V($_POST['TxtPag']);
if($StrCmd=="F"){$LStrPag="1";}
$VP_RegXPag=19;	
$LStrPag=PagGet($LStrPag,$StrCmd,$LStrTR,$VP_RegXPag);
?>