<h3 style="text-align: center">Pagar orden de pago</h3>
<hr>
<div class="form">
		<table class="table table-bordered table-striped table-hover items table table-striped table-bordered table-condensed" >
            <tr class="info" >
              <td style="text-align: center"><b><?= $model->getAttributeLabel('id_tipo_orden')?></b></td>
              <td style="text-align: center"><b><?= $model->getAttributeLabel('rif')?></b></td>
              <td style="text-align: center"><b><?= $model->getAttributeLabel('razon_social')?></b></td>
              <td style="text-align: center"><b>Banco</b></td>
              <td style="text-align: center"><b>Tipo de cuenta</b></td>
              <td style="text-align: center"><b>N&uacute;mero de cuenta</b></td>
              <td style="text-align: center"><b><?= $model->getAttributeLabel('monto_pago')?></b></td>
              <td style="text-align: center"><b><?= $model->getAttributeLabel('descripcion')?></b></td>
            </tr>
            <tr>
              <td style="text-align: center"><?= $model->idTipoOrden->descripcion?></td>
              <td style="text-align: center"><?= $model->rif?></td>
              <td style="text-align: center"><?= $model->razon_social?></td>
              <td style="text-align: center"><?= $model->nb_banco?></td>
              <td style="text-align: center"><?= $model->tp_cuenta?></td>
              <td style="text-align: center"><?= $model->num_cuenta?></td>
              <td style="text-align: center"><?= number_format($model->monto_pago,2,',','.')?></td>
              <td style="text-align: center"><?= $model->descripcion?></td>
            </tr>
          </table>	<hr>

<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'id'=>'orden-pago-aprobar-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	<p class="help-block text-center">Campos con <span class="required">*</span> son requerido.</p>

	    <div class="alert alert-info">
           	<div class="row">
           		<div class="span3"><h3>Datos bancarios</h3></div>
           		<div class="span6">
	           		<div class="row">
				        <?= $form->dropDownListRow($modelProcesoPago,'id_banco',  CHtml::listData(ParametrosBancos::model()->findAll(array('condition'=>'estatus=true and blnborrado=false')),'id','descripcion'),
	                                                                    ['style'=>"width:100%",'prompt'=>'-- SELECCIONE EL BANCO--']); ?>
	           		</div>
	               <div class="row">
	                   <?php echo $form->textFieldRow($modelProcesoPago,'referencia', array('style'=>'width: 100%;')); ?>
	               </div>
	                <div class="row">
	                    <?php echo CHtml::label('Fecha del pagado:',''); ?>
	                    <?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
	                              'model' => $modelProcesoPago,
	                              'attribute' => 'fecha_pago',
	                              'value' => $modelProcesoPago->fecha_pago,
	                              'language' => 'es',
	                              'htmlOptions' => array('readonly' => "readonly", 'class' => 'input-xlarge'),
	                              //additional javascript options for the date picker plugin
	                              'options' => array(
	                                  'autoSize' => true,
	                                  'defaultDate'=>'03-03-2011',
	                                  //'dateFormat'=>'yy-m-d',
	                                  'dateFormat' => 'dd-mm-yy',
	                                  'buttonImage' => Yii::app()->baseUrl . '/images/calendar.png',
	                                  'buttonImageOnly' => true,
	                                  'buttonText' => 'Fecha',
	                                  'selectOtherMonths' => true,
	                                  'showAnim' => 'slide',
	                                  'showButtonPanel' => true,
	                                  'showOn' => 'button',
	                                  'changeMonth' => 'true',
	                                  'changeYear' => 'true',
	                                  'maxDate'=> "+0D",
	                              ),
	                        'htmlOptions'=>array('value'=>date('d-m-Y'))
	                          ));
	                    ?>
                        <?php echo $form->error($modelProcesoPago,'fecha_pago') ;?>
                    </div>
                    <?php if (ParamEscenarios::fechaComprobante(['pagar_orden_pago' => 8])): ?>
                        <div class="row">
                            <?php echo CHtml::label('Fecha de comprobante:',''); ?>
                            <?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                                'model' => $model,
                                'attribute' => 'fecha_comprobante',
                                'value' => $model->fecha_comprobante,
                                'language' => 'es',
                                'htmlOptions' => array('readonly' => 'readonly'),
                                'options' => array(
                                    'autoSize' => true,
                                    'defaultDate'=>'03-03-2011',
                                    'dateFormat' => 'dd-mm-yy',
                                    'buttonImage' => Yii::app()->baseUrl . '/images/calendar.png',
                                    'buttonImageOnly' => true,
                                    'buttonText' => 'Fecha',
                                    'selectOtherMonths' => true,
                                    'showAnim' => 'slide',
                                    'showButtonPanel' => true,
                                    'showOn' => 'button',
                                    'changeMonth' => 'true',
                                    'changeYear' => 'true',
                                    'maxDate'=> "+0D",
                                ),
                                'htmlOptions'=>array('value'=>date('d-m-Y'))
                            )) ?>
                            <?php echo $form->error($model,'fecha_comprobante') ;?>
                        </div>
                    <?php endif ?>
                   <div class="row">
	                   <?php echo $form->textareaRow($modelProcesoPago,'observacion', array('style'=>'width: 100%;')); ?>
	               </div>
           			
           		</div>
           </div>
        
    </div>
    
	<div class="row buttons text-right">
		<?php
        $this->widget('bootstrap.widgets.TbButton', array(
            'type' => 'success',
            'buttonType' => 'submit',
            'id' => 'btn_registrar',
            'icon' => 'icon-ok',
            'label' => 'Pagar',
//                        'htmlOptions'=>array('onclick'=>'aprobarla()'),
        ));?>
        &nbsp;
        <?php $this->widget('bootstrap.widgets.TbButton', array(
            'type' => 'info',
            'id' => 'btn_registrar',
            'label' => 'Regresar',
            'icon' => 'icon-circle-arrow-left',
            'url' => Yii::app()->createUrl('pagos/ordenPago/admin'),
        ));
        ?>       
	</div>

<?php $this->endWidget(); ?>
