<?php
/*
session_start();
require_once($ruta."clases/covensol_cxc_c_cuentasxcobrar.php");
$objcxc = new covensol_cxc_cuentasxcobrar();
$objcxc->io_conexiones->decodificar_post();
$datos = $objcxc->io_conexiones->asignar_post();
*/
$datos["criterio"]="por_listado";
$filas = $objcxc->ConsultaDetTalonario($datos);
if(!$filas['rs']->RecordCount()){exit();}
?>
<br />
<link href="../shared/css/tablas.css" rel="stylesheet" type="text/css">
<link href="../shared/css/ventanas.css" rel="stylesheet" type="text/css">
<link href="../shared/css/cabecera.css" rel="stylesheet" type="text/css">
<link href="../shared/css/general.css" rel="stylesheet" type="text/css">
<link href="../shared/css/catalogos.css" rel="stylesheet" type="text/css">
<?php

$totalchk = '<input type="checkbox" 
					  name="totchk" 
						id="totchk" 
				   onclick="ObjForm.TildarTodo()" 
					 value=""
						   "'.$DisabledGrid.'"
				/>';

$Titulo='TALONARIO';
$objcxc->Grid->IdGrid = 'GridTal';
$objcxc->Grid->AddColumn(1,$totalchk,10);
$objcxc->Grid->AddColumn(2,'N°',50);
$objcxc->Grid->AddColumn(3,'Ident',50);
$objcxc->Grid->AddColumn(4,'Sec',100);
$objcxc->Grid->AddColumn(5,'Est',90);
$objcxc->Grid->AddColumn(6,'nrocont',120);
$objcxc->Grid->NroFila=1;
$objcxc->Grid->InitMarcoGrid();
$objcxc->Grid->TituloGrid($Titulo);
$objcxc->Grid->EncabezadoGrid();
foreach($filas['rs'] as $datosRow) {
			
		//SEGURIDAD DE LA SUCURSAL
        $objcxc->codintper = $datosRow['codsuc'];		
        if(!$objcxc->obtSegCxc()){continue;}
		
		$objcxc->Grid->InitRow();
		
		$objcxc->Grid->JsOnClickComp[1] = "ObjForm.ProcDetalle('".$datosRow['nrodoctal']."',
															'".$datosRow['nroident']."',
															'".$datosRow['nrosec']."',
															'".$datosRow['estdoctal']."',
															'".$datosRow['fecanu']."',
															'".$datosRow['nrocont']."',												   
															 ".$objcxc->Grid->NroFila.")";
															 
		$objcxc->Grid->DisabledComp[1] = $datosRow['estdoctal']!='D'?true:false;
		$infosuc = '('.$datosRow['codsuc'].') - '.$datosRow['sigsuc'];
		$objcxc->Grid->EstiloRow="cursor:pointer";
		$objcxc->Grid->AddDataCell(1,'chktal',$objcxc->Grid->NroFila,'center','chk');
		$objcxc->Grid->AddDataCell(2,'nrodoctal',$datosRow['nrodoctal'],'center','html');	
		$objcxc->Grid->AddDataCell(3,'nroident',$datosRow['nroident'],'center','html');	
		$objcxc->Grid->AddDataCell(4,'nrosec',$datosRow['nrosec'],'center','html');		
		$objcxc->Grid->AddDataCell(5,'desestdoctal',$datosRow['desestdoctal'],'center','html');
		$objcxc->Grid->AddDataCell(6,'nrocont',$datosRow['nrocont'],'center','html');		
		$objcxc->Grid->AddCampoHidden('tiptal',$datosRow['tiptal']);
		$objcxc->Grid->AddCampoHidden('nrotal',$datosRow['nrotal']);					
		$objcxc->Grid->AddCampoHidden('nrodoctal',$datosRow['nrodoctal']);
		$objcxc->Grid->AddCampoHidden('nroident',$datosRow['nroident']);
		$objcxc->Grid->AddCampoHidden('nrosec',$datosRow['nrosec']);
		$objcxc->Grid->AddCampoHidden('nrocont',$datosRow['nrocont']);
		$objcxc->Grid->AddCampoHidden('estdoctal',$datosRow['estdoctal']);
		$objcxc->Grid->AddCampoHidden('obsanu',$datosRow['obsanu']);			
		$objcxc->Grid->FilaGrid();
		$objcxc->Grid->NroFila++;		 
		
}
$objcxc->Grid->EndMarcoGrid();
?>
