<?php

function inve_sal()
{
require('../cfg/res.php');
	
$xacceso=0;
$sql_acce='select * from usrdoc1 where (docu like "IB%" or docu like "EB%") and info="1" and user="'.$_SESSION['user_vcrx_id'].'" ';
$res_acce=mysql_query($sql_acce,$link_vcrx);
  
$docuacce='IB10';  
include('php_useracce.php');

if($user_tipo=='sist')
{
  $user_nuev=1;
  $user_cons=1;
  $user_modi=1;
  $user_anul=1;
  $user_elim=1;
  $user_clon=1;
}
  
  $xacceso=$user_info;
  $xacceso=1;
  
if (mysql_num_rows($res_acce)!=0){$xacceso=1;}
if (mb_stristr('sist.supe',$_SESSION['user_vcrx_tipo'])){$xacceso=1;}
if ($xacceso==0){echo '<font size="8" color="red"><b>';die('No tiene acceso a Informe de Inventario ' );}	
	
$xacceprec=0;
$sql_acce='select * from usrdoc1 where (docu like "PREC%" or docu like "DCTI%") and modi="1" and user="'.$_SESSION['user_vcrx_id'].'" ';
$res_acce=mysql_query($sql_acce,$link_vcrx);
if (mysql_num_rows($res_acce)!=0){$xacceprec=1;}
if (mb_stristr('sist.supe',$_SESSION['user_vcrx_tipo'])){$xacceprec=1;}
	
$xaccehoja=0;
$sql_acce='select * from usrdoc1 where (docu like "HOJA%" or docu like "CARR%") and modi="1" and user="'.$_SESSION['user_vcrx_id'].'" ';
$res_acce=mysql_query($sql_acce,$link_vcrx);
if (mysql_num_rows($res_acce)!=0){$xaccehoja=1;}
if (mb_stristr('sist.supe',$_SESSION['user_vcrx_tipo'])){$xaccehoja=1;}
	
$xacceimgi=0;
$sql_acce='select * from usrdoc1 where (docu like "IMGI%" ) and modi="1" and user="'.$_SESSION['user_vcrx_id'].'" ';
$res_acce=mysql_query($sql_acce,$link_vcrx);
if (mysql_num_rows($res_acce)!=0){$xacceimgi=1;}
if (mb_stristr('sist.supe',$_SESSION['user_vcrx_tipo'])){$xacceimgi=1;}
	
	
	
mysql_query("SET NAMES 'utf8'");

$fecha1 = date('Y-m-j');
$nuevafecha = strtotime ( '-1 month' , strtotime ( $fecha1 ) ) ;
$xfecha1 = date ( 'Y-m-j' , $nuevafecha );
$xfecha1= date('Y-m-'.'01');
$xfecha2= date('Y-m-d');

$xfposi='true';
$xfnega='true';
$xforde='D';
$xfrepo='D';
$xfcodi='1';


?>


	<script type="text/javascript">
		<?php include('../../_js/busca_maes3.js');?>
		<?php include('../../_js/lista_maes3.js');?>
		<?php include('../../_js/fecha_format.js');?>

		
		function _fecha(e, idfec) {
			// 	if(e.keyCode==13)
			if (e.keyCode == 9 || e.keyCode == 13) {
				var fn = document.getElementById(idfec).value;
				fn = fecha_format(fn);
				document.getElementById(idfec).value = fn;
			}
		}

		function inves1d(grupox, idnumx, obj)
		{
			var obj2 = obj.parentNode;
			var obj3 = obj2.parentNode;
			for (i = 0; i <= document.getElementsByClassName('filax').length - 1; i++) {
				document.getElementsByClassName('filax').item(i).style.background = '#fff';
			}
			obj3.style.background = '#09c';
			document.getElementById('invesal2').innerHTML = 'Cargando datos...';

			$.ajax({
				cache: false,
				url: '../lib/vrinves1d.php',
				datatype: "text",
				async: false,
				type: 'POST',
				data: {
					grupox: grupox,
					idnum: idnumx,
					fini: document.getElementById('fecha_ini').value,
					ffin: document.getElementById('fecha_fin').value
				},
				beforeSend: function(jqXHR, textStatus) {},
				success: function(dato, textStatus, jqXHR)
					{document.getElementById('invesal2').innerHTML = dato;},
				error: function(jqXHR, textStatus, errorThrown) {
					if (jqXHR.status === 0) {document.getElementById('invesal2').innerHTML = 'Not connect: Verify Network.';}
					else if (jqXHR.status == 404) {document.getElementById('invesal2').innerHTML = 'Requested page not found [404]';}
					else if (jqXHR.status == 500) {document.getElementById('invesal2').innerHTML = 'Internal Server Error [500].';}
					else if (exception === 'parsererror') {document.getElementById('invesal2').innerHTML = 'Requested JSON parse failed.';}
					else if (exception === 'timeout') {document.getElementById('invesal2').innerHTML = 'Servidor no Responde';}
					else if (exception === 'abort') {document.getElementById('invesal2').innerHTML = 'Ajax request aborted.';}
					else {document.getElementById('invesal2').innerHTML = 'Uncaught Error: ' + jqXHR.responseText;}
				},
				complete: function(jqXHR, textStatus){if (textStatus === 'success'){}},
				timeout: 60000
			});

		}


		function redireccionar(xmodi)
		{
			document.body.style.cursor = 'wait';

			var fecha_ini = document.getElementById('fecha_ini').value;
			var fecha_fin = document.getElementById('fecha_fin').value;

			var fordec = document.getElementById('fordec').checked;
			var forded = document.getElementById('forded').checked;
			var fordet = document.getElementById('fordet').checked;

			var frepod = document.getElementById('frepod').checked;
			var frepog = document.getElementById('frepog').checked;
			var frepob = document.getElementById('frepob').checked;

			var fcodis = document.getElementById('fcodis').checked;
			var fcodia = document.getElementById('fcodia').checked;
			var fcodie = document.getElementById('fcodie').checked;

			var fposi = document.getElementById('fposi').checked;
			var fcero = document.getElementById('fcero').checked;
			var fnega = document.getElementById('fnega').checked;

			var fcost = document.getElementById('fcost').checked;
			var fpuni = document.getElementById('fpuni').checked;
			var fpvp1 = document.getElementById('fpvp1').checked;
			var frese = document.getElementById('frese').checked;

			var mpuni = document.getElementById('mpuni').checked;
			var mpvp1 = document.getElementById('mpvp1').checked;
			var mhoja = document.getElementById('mhoja').checked;
			var mimgi = document.getElementById('mimgi').checked;

			var flsub = document.getElementById('flsub').value;
			var fitem = document.getElementById('fitem').value;
			var fdocu = document.getElementById('fdocu').value;
			var fbode = document.getElementById('fbode').value;
			var fmdlo = document.getElementById('fmdlo').value;
			var fmrca = document.getElementById('fmrca').value;
			var fctlg = document.getElementById('fctlg').value;

			var fcodi = '1';
			//var fgrou='D';
			var forde = 'D';
			var frepo = 'G';

			if (fcodis) {fcodi = '1';}
			if (fcodia) {fcodi = '2';}
			if (fcodie) {fcodi = '3';}

			if (fordec) {forde = 'C';}
			if (forded) {forde = 'D';}
			if (fordet) {forde = 'T';}

			if (frepod) {frepo = 'D';}
			if (frepog) {frepo = 'G';}
			if (frepob) {frepo = 'B';}




			document.body.style.cursor = 'wait';
			document.getElementById('invesal1').innerHTML = 'Cargando datos...';
			$.ajax({
				cache: false,
				url: 'vrinves2.php',
				datatype: "text",
				async: true,
				type: 'POST',
				data: {
					opt: "<?php echo $_GET['opt']?>",
					xmodi: xmodi,
					mpuni: mpuni,
					mpvp1: mpvp1,
					mhoja: mhoja,
					mimgi: mimgi,
					fecha_ini: fecha_ini,
					fecha_fin: fecha_fin,
					forde: forde,
					frepo: frepo,
					fposi: fposi,
					fcero: fcero,
					fnega: fnega,
					fdocu: fdocu,
					fbode: fbode,
					flsub: flsub,
					fitem: fitem,
					fmrca: fmrca,
					fmdlo: fmdlo,
					fcodi: fcodi,
					fcost: fcost,
					fpuni: fpuni,
					fpvp1: fpvp1,
					frese: frese,
					fctlg: fctlg
				},
				beforeSend: function(jqXHR, textStatus) {},
				success: function(dato, textStatus, jqXHR) {document.getElementById('invesal1').innerHTML = dato;},
				error: function(jqXHR, textStatus, errorThrown) {
					if (jqXHR.status === 0) {console.log('Not connect: Verify Network.');}
					else if (jqXHR.status == 404) {console.log('Requested page not found [404]');}
					else if (jqXHR.status == 500) {console.log('Internal Server Error [500].');}
					else if (exception === 'parsererror') {console.log('Requested JSON parse failed.');}
					else if (exception === 'timeout') {alert('Servidor no Responde');}
					else if (exception === 'abort') {console.log('Ajax request aborted.');}
					else {console.log('Uncaught Error: ' + jqXHR.responseText);}
				},
				complete: function(jqXHR, textStatus) {if (textStatus === 'success') {}},
				timeout: 300000
			});
			// document.body.style.cursor='auto';
			//location.href=pagina;
			document.body.style.cursor = 'default';
		}



		function imprimirlista(entix, entid) {

			var fecha_ini = document.getElementById('fecha_ini').value;
			var fecha_fin = document.getElementById('fecha_fin').value;

			var fordec = document.getElementById('fordec').checked;
			var forded = document.getElementById('forded').checked;
			var fordet = document.getElementById('fordet').checked;

			var frepod = document.getElementById('frepod').checked;
			var frepog = document.getElementById('frepog').checked;
			var frepob = document.getElementById('frepob').checked;

			var fcodis = document.getElementById('fcodis').checked;
			var fcodia = document.getElementById('fcodia').checked;
			var fcodie = document.getElementById('fcodie').checked;


			var fposi = document.getElementById('fposi').checked;
			var fcero = document.getElementById('fcero').checked;
			var fnega = document.getElementById('fnega').checked;

			var fcost = document.getElementById('fcost').checked;
			var fpuni = document.getElementById('fpuni').checked;
			var fpvp1 = document.getElementById('fpvp1').checked;
			var frese = document.getElementById('frese').checked;

			var flsub = document.getElementById('flsub').value;
			var fitem = document.getElementById('fitem').value;
			var fdocu = document.getElementById('fdocu').value;
			var fbode = document.getElementById('fbode').value;
			var fmdlo = document.getElementById('fmdlo').value;
			var fmrca = document.getElementById('fmrca').value;
			var fctlg = document.getElementById('fctlg').value;

			var fcodi = '1';
			//var fgrou='D';
			var forde = 'D';

			var frepo = 'G';

			if (fcodis) {
				fcodi = '1';
			}
			if (fcodia) {
				fcodi = '2';
			}
			if (fcodie) {
				fcodi = '3';
			}



			if (fordec) {forde = 'C';}
			if (forded) {forde = 'D';}
			if (fordet) {forde = 'T';}

			if (frepod) {frepo = 'D';}
			if (frepog) {frepo = 'G';}
			if (frepob) {frepo = 'B';}

			pagina = "../lib/impr_inves0.php?" 
				+"&fecha_ini=" + fecha_ini 
				+"&fecha_fin=" + fecha_fin 
				+"&fposi=" + fposi 
				+"&fcero=" + fcero 
				+"&fnega=" + fnega 
				+"&fcodi=" + fcodi 
				+"&forde=" + forde 
				+"&frepo=" + frepo 
				+"&fdocu=" + fdocu 
				+"&fbode=" + fbode 
				+"&flsub=" + flsub 
				+"&fitem=" + fitem 
				+"&fmrca=" + fmrca 
				+"&fmdlo=" + fmdlo 
				+"&fcost=" + fcost 
				+"&fpuni=" + fpuni 
				+"&fpvp1=" + fpvp1 
				+"&frese=" + frese 
				+"&fctlg=" + fctlg;

			window.open(pagina);
		}
		
function _modii(codigo)
{
	var hoja=document.getElementById('hoja_'+codigo).checked;
	var carr=document.getElementById('carr_'+codigo).checked;
	var puni=document.getElementById('puni_'+codigo).value;
	var pvp1=document.getElementById('pvp1_'+codigo).value;
// 	var imgi=document.getElementById('imgi_'+codigo).checked;

	if(hoja){hoja=1;}else{hoja=0;}
	if(carr){carr=1;}else{carr=0;}
// 	if(imgi){imgi=1;}else{imgi=0;}
	
	
	$.ajax({
		cache:false,
		url:'vrmitem0.php',
		datatype: "text",
	    async:false,
		type:'POST',
		data:{
				codigo:codigo,
				puni:puni,
				pvp1:pvp1,
				hoja:hoja,
				carr:carr
			}, 
    	beforeSend: function(jqXHR, textStatus){}, 
		success:function(dato, textStatus, jqXHR)
		{
// 			console.log(dato);
// 			document.getElementById('error_'+codigo).innerHTML=dato;
		},
		error:function(jqXHR,textStatus,errorThrown )
		{
           if (jqXHR.status === 0) {console.log('Not connect: Verify Network.');}
						else if (jqXHR.status == 404) {console.log('Requested page not found [404]');}
						else if (jqXHR.status == 500) {console.log('Internal Server Error [500].');}
						else if (exception === 'parsererror') {console.log('Requested JSON parse failed.');}
						else if (exception === 'timeout') {alert('Servidor no Responde');}
						else if (exception === 'abort') {console.log('Ajax request aborted.');}
						else {console.log('Uncaught Error: ' + jqXHR.responseText);}

		}, 
	    complete:function(jqXHR, textStatus)
    	{
			if(textStatus==='success'){}           
		},
		timeout:30000
	});

	
}

    

function _modi2(idnum,iddet)
{
	var puni=document.getElementById('puni_'+idnum+'_'+iddet).value;
// 	var cair=document.getElementById('cair_'+idnum+'_'+iddet).value;
// 	var ctas=document.getElementById('ctas_'+idnum+'_'+iddet).value;

	$.ajax({
		cache:false,
		url:'vrminve2.php',
		datatype: "text",
	    async:false,
		type:'POST',
		data:{
				idnum:idnum,
				iddet:iddet,
				puni:puni
			}, 
    	beforeSend: function(jqXHR, textStatus)
		{
	
		}, 
		success:function(dato, textStatus, jqXHR)
		{
			document.getElementById('error_'+idnum+'_'+iddet).innerHTML=dato;
		},
		error:function(jqXHR,textStatus,errorThrown )
		{
           if (jqXHR.status === 0) {console.log('Not connect: Verify Network.');}
						else if (jqXHR.status == 404) {console.log('Requested page not found [404]');}
						else if (jqXHR.status == 500) {console.log('Internal Server Error [500].');}
						else if (exception === 'parsererror') {console.log('Requested JSON parse failed.');}
						else if (exception === 'timeout') {alert('Servidor no Responde');}
						else if (exception === 'abort') {console.log('Ajax request aborted.');}
						else {console.log('Uncaught Error: ' + jqXHR.responseText);}

		}, 
	    complete:function(jqXHR, textStatus)
    	{
			if(textStatus==='success'){}           
		},
		timeout:30000
	});

	
}
	    
    
    
	</script>


	<!-- <div style=" max-height:100px; overflow-y:scroll; margin-top:5px;"> -->
	<div style=" max-height:200px; max-width:1600px; overflow-y:scroll; margin-top:5px;">

		<table id="tabla_filtros1" width="100%" border="0" cellspacing="0" cellpadding="2" style="border-collapse:collapse;font-size:12px; border:#000000 solid 1px;">
			<tr align="left" valign="top">
				<!-- <th align="right">FECHAS</th>	 -->
				<th width="20%">
					<table>
						<caption>FECHAS</caption>
						<tr>
							<?php $pcaption='inicial';  $pidtxt='fecha_ini'; $pdefa=$xfecha1; $pobj=3; include('vrgetfec.php'); ?>
						</tr>
						<tr>
							<?php $pcaption='final';  $pidtxt='fecha_fin'; $pdefa=$xfecha2; $pobj=3; include('vrgetfec.php'); ?>
						</tr>
					</table>
				</th>

				<!-- <th align="right" style ="border-left:solid 1px;">REPORTE</th>	 -->
				<th width="10%" style="border-left:solid 1px;">
					<div align="center">
						<span>REPORTE</span>
					</div>
					<div>
<!-- 				
						<input type="radio" id="frepog" name="frepor" <?php if($xfrepo=='G' ){echo 'checked';}?>/><span>Saldos General</span> <br/>
						<input type="radio" id="frepob" name="frepor" <?php if($xfrepo=='B' ){echo 'checked';}?>/><span>Saldos X Bodega</span> <br/> 
-->
						<?php $pname="frepor"; $pidtxt='frepod'; $pcaption='Registro Diario'; if($xfrepo=='D'){$pdefa='checked';}; include('vrradio.php'); ?>	
						<?php $pname="frepor"; $pidtxt='frepog'; $pcaption='Saldos General'; if($xfrepo=='G'){$pdefa='checked';}; include('vrradio.php'); ?>	
						<?php $pname="frepor"; $pidtxt='frepob'; $pcaption='Saldos X Bodega'; if($xfrepo=='B' ){$pdefa='checked';} include('vrradio.php'); ?>	
					</div>

				</th>



				<th width="10%" style="border-left:solid 1px;">
					<div align="center">
						<span>SALDOS</span>
					</div>
					<div>
					<?php $pidtxt='fposi';  $pcaption='Positivos'; $pdefa=1; include('vrchkbox.php'); ?>	
					<?php $pidtxt='fnega';  $pcaption='Negativos'; $pdefa=1; include('vrchkbox.php'); ?>	
					<?php $pidtxt='fcero';  $pcaption='Agotados';  include('vrchkbox.php'); ?>	
					<?php $pidtxt='frese';  $pcaption='Reservados'; include('vrchkbox.php'); ?>	
					</div>
				</th>

				<th width="10%" style="border-left:solid 1px;">
					<div align="center">
						<span>VALORES</span>
					</div>
					<div>
					<?php $pidtxt='fcost';  $pcaption='Costo';  include('vrchkbox.php'); ?>	
					<?php $pidtxt='fpuni';  $pcaption='P.Unit.'; include('vrchkbox.php'); ?>	
					<?php $pidtxt='fpvp1';  $pcaption='P.V.P.'; include('vrchkbox.php'); ?>	
					</div>
				</th>


				<th width="10%" style="border-left:solid 1px;">
					<div align="center">
						<span>Ordenado X</span>
					</div>
					<div>
<!-- 						<input type="radio" id="forded" name="forder" <?php if($xforde=='D' ){echo 'checked';}?>/><span>Nombre</span> <br/> -->
<!-- 						<input type="radio" id="fordec" name="forder" <?php if($xforde=='C' ){echo 'checked';}?>/><span>Codigo</span> <br/> -->
<!-- 						<input type="radio" id="fordet" name="forder" <?php if($xforde=='T' ){echo 'checked';}?>/><span>Totales</span> <br/> -->
						<?php $pname="forder"; $pidtxt='forded'; $pcaption='Nombre'; if($xforde=='D'){$pdefa='checked';}; include('vrradio.php'); ?>	
						<?php $pname="forder"; $pidtxt='fordec'; $pcaption='Codigo'; if($xforde=='C'){$pdefa='checked';}; include('vrradio.php'); ?>	
						<?php $pname="forder"; $pidtxt='fordet'; $pcaption='Totales'; if($xforde=='T'){$pdefa='checked';}; include('vrradio.php'); ?>	
						
					</div>
				</th>


				<th width="10%" style="border-left:solid 1px;">
					<div align="center">
						<span>Codigos</span>
					</div>
					<div>
<!-- 						<input type="radio" id="fcodis" name="tcodi" <?php if($xfcodi=='1' ){echo 'checked';}?>/><span>Sistema</span> <br/> -->
<!-- 						<input type="radio" id="fcodia" name="tcodi" <?php if($xfcodi=='2' ){echo 'checked';}?>/><span>Auxiliar</span> <br/> -->
<!-- 						<input type="radio" id="fcodie" name="tcodi" <?php if($xfcodi=='3' ){echo 'checked';}?>/><span>EAN (Barras)</span> <br/> -->
						<?php $pname="tcodi"; $pidtxt='fcodis'; $pcaption='Sistema'; if($xfcodi=='1'){$pdefa='checked';}; include('vrradio.php'); ?>	
						<?php $pname="tcodi"; $pidtxt='fcodia'; $pcaption='Auxiliar'; if($xfcodi=='2'){$pdefa='checked';}; include('vrradio.php'); ?>	
						<?php $pname="tcodi"; $pidtxt='fcodie'; $pcaption='EAN(Barras)'; if($xfcodi=='3'){$pdefa='checked';}; include('vrradio.php'); ?>	
						
					</div>

				</th>

				<th width="10%" style="border-left:solid 1px;" align="center">
					<?php $pcaption='Consultar';  $ponclick="redireccionar('0');" ;include('vrbutton.php'); ?>
					<!-- <div>
<input type="button" value="Consultar" onclick="redireccionar(1);"  />
</div> -->
					<br>
					<?php $pcaption='Imprimir';  $ponclick="imprimirlista();" ;include('vrbutton.php'); ?>
					<!-- <div>
<input type="button" value="Imprimir" onclick="imprimirlista();"  />
</div> -->
				</th>

		</table>

		<table id="tabla_filtros" width="100%" border="0" cellspacing="0" cellpadding="2" style="border-collapse:collapse;font-size:12px; border:#000000 solid 1px;">
<tr>
<th>FILTROS</th>

			<th style="border-left:solid 1px;">
				<table>
					<tr>
						<?php $pcaption='Documento';  $ptabla='docu'; $pidtxt='fdocu'; $pdefa=$xfdocu; $pnotob=1; $pobj=3; include('vrgetcod.php'); ?>
					</tr>
					<tr>
						<?php $pcaption='Bodega';  $ptabla='bode'; $pidtxt='fbode'; $pdefa=$xfbode; $pobj=3; include('vrgetcod.php'); ?>
					</tr>
				</table>
			</th>

			<th>
				<table>
					<tr>
						<?php $pcaption='Lineas';  $ptabla='lsub'; $pidtxt='flsub'; $pdefa=$xflsub; $pobj=3; include('vrgetcod.php'); ?>
					</tr>
					<tr>
						<?php $pcaption='Items';  $ptabla='item'; $pidtxt='fitem'; $pdefa=$xfitem; $pnotob=1; $pobj=3; include('vrgetcod.php'); ?>
					</tr>

				</table>

				<!-- <div align="center">
<span>FILTROS</span>
</div> -->
				<div>
					<!--     	<div align="right">
	    <span>Bodega</span> 
	    <input type="text" id="fbode" placeholder="bodega" size="10" value="<?php echo $xfbode;?>" /> 
	</div>
    	<div align="right">
	    <span>Lineas</span> 
	    <input type="text" id="flsub" placeholder="linea" size="10" value="<?php echo $xflsub;?>" /> 
	</div>
    	<div align="right">
	    <span>Item</span> 
	    <input type="text" id="fitem" placeholder="item" size="13" value="<?php echo $xfitem;?>" /> 
	</div>
 -->

				</div>
			</th>

			<th>
				<table>
					<tr>
						<?php $pcaption='Marca';  $ptabla='mrca'; $pidtxt='fmrca'; $pdefa=$xfmrca; $pobj=3; include('vrgetcod.php'); ?>
					</tr>
					<tr>
						<?php $pcaption='Modelo';  $pidtxt='fmdlo'; $pdefa=$xfmdlo; $plong=20; $pobj=3; include('vrgettxt.php'); ?>
					</tr>
				</table>
			</th>

			<th>
				<table>
					<tr>
						<?php //$pcaption='Num.Parte';   $pidtxt='fnpar'; $pdefa=$xfnpar; $plong=20; $pobj=3; include('vrgettxt.php'); ?>
					</tr>
					<tr>
						<?php //$pcaption='EAN';  $pidtxt='fean'; $pdefa=$xfean; $plong=20; $pobj=3; include('vrgettxt.php'); ?>
					</tr>
				</table>
			</th>


			<th style="border-left:solid 1px;">

				<table style="<?php	if (mb_stristr('gnya.gmny.leie',substr($_SESSION['user_vcrx_empr'],0,4))){}else{echo 'display:none;';} ?>">
					<tr>
						<?php $pcaption='Catalogo';  $pidtxt='fctlg'; $plong=6; $pdefa=$xfctlg; $pobj=3; include('vrgettxt.php'); ?>
					</tr>
				</table>

				<table style="<?php	if (mb_stristr('rcsa',substr($_SESSION['user_vcrx_empr'],0,4))){}else{echo 'display:none;';} ?>">
					<caption>VEHICULO</caption>
					<tr>
						<?php $pcaption='Marca';  $ptabla='mrca'; $pidtxt='fmrca2'; $pdefa=$xfmrca2; $pobj=3; include('vrgetcod.php'); ?>
					</tr>
					<tr>
						<?php $pcaption='Modelo';  $pidtxt='fmdlo2'; $pdefa=$xfmdlo2; $plong=20; $pobj=3; include('vrgettxt.php'); ?>
					</tr>
				</table>

			</th>

<th align="center" style ="border-left:none 1px;">
<?php $pcaption='Modif.Cab.';  $ponclick="redireccionar('1');" ;include('vrbutton.php'); ?>
	<br>
<?php $pcaption='Modif.Det.';  $ponclick="redireccionar('2');" ;include('vrbutton.php'); ?>
</th>
      
			<th style="border-left:solid 1px;" align="left">
					<table id="modificar" width="100%" border="0" cellspacing="0" cellpadding="2" style="border-collapse:collapse;font-size:12px; ">

					<tr>
					<td>
					<?php $pcaption='MODIFICAR';  $ponclick="redireccionar(3);" ;include('vrbutton.php'); ?>
					</td>		
					</tr>	

					<tr>
					<td style="<?php if($xacceprec==0){echo 'display:none;';} ?>">
						<?php $pname='mprecio';?>	
						<?php $pidtxt='mpuni';  $pcaption='P.Unit'; $pdefa=0; include('vrchkbox.php'); ?>	
						<?php $pidtxt='mpvp1';  $pcaption='P.V.P.'; $pdefa=0; include('vrchkbox.php'); ?>	
					</td>		
						
						
					<td>
						<table>
					<tr>		
					<td style="<?php if($xaccehoja==0){echo 'display:none;';} ?>">
						<?php $pidtxt='mhoja';  $pcaption='Hoja / Tienda'; $pdefa=0; include('vrchkbox.php'); ?>	
					<?php //} ?>
					</td>		
					</tr>		
						
					<tr>		
					<td style="<?php if($xacceimgi==0){echo 'display:none;';} ?>">
						<?php $pidtxt='mimgi';  $pcaption='Imagenes'; $pdefa=0; include('vrchkbox.php'); ?>	
					<?php //} ?>
					</td>		
					</tr>		
							
						</table>
					</td>	
						
					</tr>		

						
				</table>
			</th>

			<th style="border-left:solid 1px;">
			</th>


			</tr>
		</table>





	</div>

	<hr/>

	<div id="invesal1" style="overflow-y:scroll; height:300px;"></div>

	<br>
	<div id="invesal2"></div>

	<?php		
// $xwidth=40;	
require('lista_car.php');
?>
		<!-- 
<div id="lista_temporal_contenedor" style=" display:none; padding:0px; margin:0px; background: #666; opacity:0.5; width:100%; min-height: 100%; height:auto !important;position: fixed;top:0;left:0; z-index:1;" ></div>
<div id="lista_cargador" style=" display:none; background:#FFF;position: fixed; top:50px;z-index:10;" ><img src="../img/ajax-loader.gif" /></div>    
<div id="lista_temporal" style=" display:none; background:#FFF;position: fixed; top:50px;z-index:10; overflow-y:scroll; min-height:50px; max-height:400px; width:100%;" ><img src="../img/ajax-loader.gif" /></div>    
 -->

		<?php } ?>

