<?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();
$filas = $objcxc->ConsultaTalonarioDoc($datos);
//if(!$filas['rs']->RecordCount()){exit();}
?>
<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



$Titulo='TALONARIOS';
$objcxc->Grid->IdGrid = 'GridTal';
$objcxc->Grid->AddColumn(1,'Tipo',50);
$objcxc->Grid->AddColumn(2,'N°',50);
$objcxc->Grid->AddColumn(3,'Suc',120);
$objcxc->Grid->AddColumn(4,'Est',50);
$objcxc->Grid->AddColumn(5,'Iden',50);
$objcxc->Grid->AddColumn(6,'Sec',80);
$objcxc->Grid->AddColumn(7,'Cant',80);
$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->JsOnClickRow = "ObjForm.CargarFormulario('".$datosRow['tiptal']."',
															    '".$datosRow['nrotal']."',
															    '".$datosRow['codsuc']."',
															    '".$datosRow['esttal']."',
															    '".$objcxc->io_conexiones->formatea_fecha_normal($datosRow['fecenttal'])."',
															    '".$datosRow['nroident']."',
															    '".$datosRow['nroinisec']."',
															    '".$datosRow['cantal']."',														   
																 ".$objcxc->Grid->NroFila.")";
			
		
		$infosuc = '('.$datosRow['codsuc'].') - '.$datosRow['sigsuc'];
		$objcxc->Grid->EstiloRow="cursor:pointer";
		$objcxc->Grid->CaracteresCell[5] = 2;
		$objcxc->Grid->CaracteresCell[7] = 12;
		$objcxc->Grid->CaracteresCell[8] = 12;
		$objcxc->Grid->AddDataCell(1,'tiptal',$datosRow['tiptal'],'center','html');	
		$objcxc->Grid->AddDataCell(2,'nrotal',$datosRow['nrotal'],'center','html');	
		$objcxc->Grid->AddDataCell(3,'codsuc',$infosuc,'center','html');		
		$objcxc->Grid->AddDataCell(4,'esttal',$datosRow['esttal'],'center','html');
		$objcxc->Grid->AddDataCell(5,'nroident',$datosRow['nroident'],'center','html');	
		$objcxc->Grid->AddDataCell(6,'nroinisec',$datosRow['nroinisec'],'right','html');		
		$objcxc->Grid->AddDataCell(7,'cantal',$datosRow['cantal'],'center','html');			
		$objcxc->Grid->AddCampoHidden('nomsuc',$datosRow['nomsuc']);			
		$objcxc->Grid->FilaGrid();
		$objcxc->Grid->NroFila++; 
		
}
$objcxc->Grid->EndMarcoGrid();
?>
