<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/datepicker.min.css" />
<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/datepicker3.min.css" />
<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/bootstrap-datepicker.min.js"></script>
<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/jquery.mask.min.js',CClientScript::POS_HEAD); ?>
<?php
$this->breadcrumbs=array(
	'Datos Txt Integrados'=>array('index'),
	'Create',
);

$this->menu=array(
	array('label'=>'List DatosTxtIntegrado','url'=>array('index')),
	array('label'=>'Manage DatosTxtIntegrado','url'=>array('admin')),
);
?>

<h3 style="text-align: center;">Pagar aporte fondo</h3>
<?php
    foreach(Yii::app()->user->getFlashes() as $key => $message) {
        echo '<div class="alert alert-'. $key .'">' . $message . "</div>\n";
    }
?>
<?php
    foreach(Yii::app()->user->getFlashes() as $key => $message) {
        echo '<div class="alert alert-'. $key .'">' . $message . "</div>\n";
    }
?>
<script type="text/javascript">
// When the document is ready
$(document).ready(function () {
	$('#ProcesoPago_fecha_pago').datepicker({
		format: "dd-mm-yyyy",
		// startDate: "0d",

		endDate: "0d",
//		todayBtn: "linked",
		// clearBtn: true,
		// multidateSeparator: " ",
		forceParse: false,
		daysOfWeekDisabled: "0,6",
		orientation: "top auto",
		todayHighlight: true,
		toggleActive: true,
		language:'es',
		autoclose:true
	});

});
</script>


<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
	'id'=>'pagar-txt-integrado-form',
	'enableAjaxValidation'=>false,
        'htmlOptions'=>array('onsubmit'=>'activar_barra();'),
         'type'=>'horizontal',
)); ?>
	
	<table class="table table-bordered">
        <tr>
            <td  style="text-align: center;"  colspan="4"><b>Informaci&oacute;n de carga inicial</b></td>
        </tr>
        <tr>
            <td><b><?php echo $model->getAttributeLabel('nombre_archivo')?></b></td>
            <td><?php echo $model->nombre_archivo?></td>
            <td><b><?php echo $model->getAttributeLabel('descripcion')?></b></td>
            <td><?php echo $model->descripcion?></td>
        </tr>
        <tr>
            <td><b><?php echo $model->getAttributeLabel('cant_aportantes')?></b></td>
            <td><?php echo $model->cant_aportantes?></td>
            <td><b><?php echo $model->getAttributeLabel('total_aportes')?></b></td>
            <td><?php echo number_format($model->total_aportes,2,',','.');?></td>
        </tr>
        <tr>
            <td><b><?php echo $model->getAttributeLabel('fecha_aporte')?></b></td>
            <td><?php echo date('d-m-Y',strtotime($model->fecha_aporte))?></td>
            <td><b><?php echo $model->getAttributeLabel('fecha_registro')?></b></td>
            <td><?php echo date('d-m-Y',strtotime($model->fecha_registro)) ?></td>
        </tr>
       	<tr>
            <td><b><?php echo $model->getAttributeLabel('total_aportes')?></b></td>
            <td><?php echo $model->total_aportes?></td>
            <td><b><?php echo $model->getAttributeLabel('cant_aportantes')?></b></td>
            <td><?php echo $model->cant_aportantes?></td>
        </tr> 
    </table>
    <br>

	<p class="help-block">Los campos con <span class="required">*</span> son obligatorios.</p>

        
        <?php echo "<br/>".$form->dropDownListRow($pago,'id_banco', CHtml::listData(ParamBancos::model()->findAll(array('condition'=>'blnborrado=false','order'=>'descripcion asc')), 'id', 'descripcion'), array('class'=>'span4','prompt' => 'Seleccione...')); ?>

	<?php echo $form->textFieldRow($pago,'referencia',array()); ?>
	<?php echo $form->textFieldRow($pago,'fecha_pago',array('class'=>'input-small','readOnly'=>'readOnly')); ?>
    <?php echo $form->textFieldRow($pago,'monto_pagado',array('style'=>'width:36%; text-align: right')); ?>

	

	<?php // echo $form->textFieldRow($model,'total_aportes',array('class'=>'span8','maxlength'=>20)); ?>

	<?php // echo $form->textFieldRow($model,'cant_aportantes',array('class'=>'span8')); ?>

	<div class="form-actions">
            <?php echo CHtml::link('Cancelar', Yii::app()->createUrl('/aportes/datosTxtIntegrado/adminMP'),array('class'=>'btn btn-danger')); ?>
		<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'success',
			'label'=> 'Pagar',
                        
		)); ?>
	</div>

<?php $this->endWidget(); ?>
        
<?php Yii::app()->clientScript->registerScript('modal', '

function activar_barra()
{
    $("#barra_carga").modal(\'show\');  
}

$(\'#'.CHtml::activeId($pago,'monto_pagado').'\').mask(\'#.##0,00\', {reverse: true});

', CClientScript::POS_END);?>