<?php
//+++++++++++++++++
$ProCod=VU($_POST['ProCod']);			
$ProDes=VU($_POST['ProDes']);		
$Mea=VU($_POST['Mea']);	
$Emp=VU($_POST['Emp']);		
$InvSer=VU($_POST['InvSer']);		
$InvNum=VU($_POST['InvNum']);		
$InvIte=VU($_POST['InvIte']);		
$PaiOri="";		
$PaiDes="";	
$NomCom="";	
$Mod="";	
$Cla="";
$Dua=VU($_POST['Dua']);
$DuaIte=VU($_POST['DuaIte']);
//++++++++++++++++++
$ProCod_="%".$ProCod."%";
$ProDes_="%".$ProDes."%";
$Mea_="%".$Mea."%";
$Emp_=LIKE($Emp);
$InvSer_="%".$InvSer."%";
$InvNum_="%".$InvNum."%";
$InvIte_=vbval($InvIte);
$PaiOri_="%".$PaiOri."%";
$PaiDes_="%".$PaiDes."%";
$NomCom_="%".$NomCom."%";
$Mod_="%".$Mod."%";
$Cla_="%".$Cla."%";
$Dua_="%".$Dua."%";
$DuaIte_=vbval($DuaIte);
//++++
$FF="ID_REF>0 AND PRO_COD LIKE '$ProCod_' AND PRO_DES LIKE '$ProDes_' AND 
	 NC_EMP LIKE '$Emp_' AND INV_SER LIKE '$InvSer_' AND INV_NUM LIKE '$InvNum_' AND 
	 PAI_ORI LIKE '$PaiOri_' AND PAI_DES LIKE '$PaiDes_' AND NOM_COM LIKE '$NomCom_' AND 
	 MODELO LIKE '$Mod_' AND CLASE LIKE '$Cla_' AND DUA LIKE '$Dua_' AND MEDIDAS LIKE '$Mea_' ";
if(strlen($InvIte)>0){
	$FF=$FF." AND INV_ITE=".$InvIte_." ";
}
if(strlen($DuaIte)>0){
	$FF=$FF." AND DUA_ITEM=".$DuaIte_." ";
}
//++++
$LStrTR=gn("count(*)","vis_ges_productos_referencias",$FF);
$LStrPag=V($_POST['TxtPag']);
if($StrCmd=="F"){$LStrPag="1";}
$VP_RegXPag=20;	
$LStrPag=PagGet($LStrPag,$StrCmd,$LStrTR,$VP_RegXPag);
?>