<?php
$_PDF="";
$StrId=V($_POST['TxtId']);
$StrCmd=V($_POST['TxtAc']);
$LIMPIAR=0;
//+++
$P_C="Cod";
$FF="";
//+++
$Cod=V($_POST['Cod']);
$Des=V($_POST['Des']);
$Ven=V($_POST['Ven']);
$Pre=V($_POST['Pre']);
$UsuP=V($_POST['UsuP']);
$Can=V($_POST['Can']);
$UsuC=V($_POST['UsuC']);
$Dex=V($_POST['Dex']);
$Hax=V($_POST['Hax']);
$Cli=V($_POST['Cli']);
//
if(strlen($Ven)==0)$Ven="TODOS";
if(strlen($Pre)==0)$Pre="SI";
if(strlen($Can)==0)$Can="SI";
if(strlen($UsuP)==0)$UsuP="TODOS";
if(strlen($UsuC)==0)$UsuC="TODOS";
//
$Cod_=$Cod."%";
$Des_=$Des."%";
$Ven_=LIKE($Ven);
$Pre_=LIKE($Pre);
$UsuP_=LIKE($UsuP);
$Can_=LIKE($Can);
$UsuC_=LIKE($UsuC);
$Dex_=val_dex($Dex);
$Hax_=val_hax($Hax);
//
$FF="ID>0 AND COD LIKE '$Cod_' AND DES LIKE '$Des_' AND 
	 VENDEDOR LIKE '$Ven_' 
	 AND USU_PRECIO LIKE '$UsuP_' AND USU_STOCK LIKE '$UsuC_' AND 
	 FEC>='$Dex_' AND FEC<='$Hax_' ";
//
if($UsuP_=="SI"){
	$FF=$FF." AND BIT_PRECIO_EX=1 ";
}
if($UsuP_=="NO"){
	$FF=$FF." AND BIT_PRECIO_EX=0 ";
}
if($UsuC_=="SI"){
	$FF=$FF." AND BIT_STOCK_EX=1 ";
}
if($UsuC_=="NO"){
	$FF=$FF." AND BIT_STOCK_EX=0 ";
}
//
$LStrMsg=BL($StrGT,$LStrMsg,$LStrFoc,$P_C);
?>