    <?php
    /* @var $this RetiroParcialController */
    /* @var $model RetiroParcial */
    /* @var $form CActiveForm */
    ?>

    <div class="form">

        <?php
        $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', [
            'id' => 'retiro-parcial-_pagar_form-form',
            //'type' => 'horizontal',
            'enableAjaxValidation' => false,
            'enableClientValidation' => true,
            'clientOptions' => [
                'validateOnSubmit' => true,
                'validateOnChange' => true,
                'validateOnType' => true,
            ],
            'htmlOptions' => ['enctype' => 'multipart/form-data'],
        ]); ?>


        <h3 style="text-align: center">Pagar retiro parcial</h3>
        <p class="note">Los campos con <span class="required">*</span> son obligatorios.</p>

        <?php echo $form->errorSummary($model); ?>

        <div class="well">
            <fieldset>
                <legend>Datos del Solicitante</legend>
                <div class="row">
                    <div class="span1">
                        <?php echo CHtml::label('<strong>Cédula:</strong>', ''); ?>
                        <?php echo $model->idAsociado->cedula; ?>
                    </div>
                    <div class="span2">
                        <?php echo CHtml::label('<strong>Nombre y Apellido:</strong>', ''); ?>
                        <?php echo $model->idAsociado->nombre.' '.$model->idAsociado->apellidos; ?>
                    </div>
                    <div class="span2">
                        <?php echo CHtml::label('<strong>Fecha Ingreso:</strong>', ''); ?>
                        <?php echo date('d-m-Y', strtotime($model->idAsociado->fechaingreso)); ?>
                    </div>
                    <div class="span2">
                        <?php echo CHtml::label('<strong>Empresa:</strong>', ''); ?>
                        <?php echo $model->idAsociado->lugartrabajo0->descripcion; ?>
                    </div>

                    <div class="span2">
                        <?php echo CHtml::label('<strong>Fecha Solicitud:</strong>', ''); ?>
                        <?php echo date('d-m-Y', strtotime($model->fecha_estatus)); ?>
                    </div>
                    <div class="span2">
                        <?php echo CHtml::label('<strong>Num.Cuenta:</strong>', ''); ?>
                        <?php echo $model->cuenta; ?>
                    </div>
                </div>

            </fieldset>
        </div>

        <div class="well">
            <div class="row">
                <div class="span11">
                    <?php
                    echo $form->dropDownListRow($modelEstatusRetiroParcial, 'idBanco', CHtml::listData(ParamBancos::model()->findAll(['condition' => 'estatus=true and blnborrado=false']), 'id', 'descripcion'),
                                                                                    ['prompt' => '-- Seleccione banco--', 'style' => 'width: 100%']);
                    ?>
                </div>

            </div>
            <div class="row">

                <div class="span4">
                    <?php echo $form->textFieldRow($modelEstatusRetiroParcial, 'referencia'); ?>
                </div>
                <div class="span4">
                    <?php echo $form->labelEx($pago, 'fecha_pago'); ?>
                    <?php
                    $this->widget('zii.widgets.jui.CJuiDatePicker', [
                        'model' => $pago,
                        'attribute' => 'fecha_pago',
                        'value' => $pago->fecha_pago,
                        'language' => 'es',
                        'htmlOptions' => ['readonly' => false, 'style' => 'width:140px'],
                        //additional javascript options for the date picker plugin
                        'options' => [
                            'autoSize' => true,
                            'defaultDate' => $pago->fecha_pago,
                            //'dateFormat'=>'yy-m-d',
                            'dateFormat' => 'dd-mm-yy',
                            'maxDate' => '0d',
                            'buttonImage' => Yii::app()->baseUrl.'/images/calendar.png',
                            'buttonImageOnly' => true,
                            'buttonText' => 'Fecha referencia',
                            'selectOtherMonths' => true,
                            'showAnim' => 'slide',
                            'showButtonPanel' => true,
                            'showOn' => 'button',
                            'showOtherMonths' => true,
                            'changeMonth' => 'true',
                            'changeYear' => 'true',
                        ],
                    ]);
                    ?>
                    <?php echo $form->error($pago, 'fecha_pago'); ?>
                </div>
                <?php Yii::import('application.modules.contable.models.*', true); ?>
                <?php if (ParamEscenarios::fechaComprobante(['retiros' => 1])): ?>
                <div class="span3">
                    <?php echo $form->labelEx($model, 'fecha_comprobante'); ?>
                    <?php
                    $this->widget('zii.widgets.jui.CJuiDatePicker', [
                        'model' => $model,
                        'attribute' => 'fecha_comprobante',
                        'value' => $model->fecha_comprobante,
                        'language' => 'es',
                        'htmlOptions' => ['readonly' => false, 'style' => 'width:140px'],
                        //additional javascript options for the date picker plugin
                        'options' => [
                            'autoSize' => true,
                            'defaultDate' => $model->fecha_comprobante,
                            //'dateFormat'=>'yy-m-d',
                            'dateFormat' => 'dd-mm-yy',
                            'maxDate' => '0d',
                            'buttonImage' => Yii::app()->baseUrl.'/images/calendar.png',
                            'buttonImageOnly' => true,
                            'buttonText' => 'Fecha referencia',
                            'selectOtherMonths' => true,
                            'showAnim' => 'slide',
                            'showButtonPanel' => true,
                            'showOn' => 'button',
                            'showOtherMonths' => true,
                            'changeMonth' => 'true',
                            'changeYear' => 'true',
                        ],
                    ]);
                    ?>
                    <?php echo $form->error($pago, 'fecha_comprobante'); ?>
                </div>
                <?php endif; ?>
            </div>
            <div class="row">


            </div>
            <div class="row-fluid">
                <?php echo $form->textAreaRow($modelEstatusRetiroParcial, 'observacion', ['style' => 'width: 100%']); ?>
            </div>

        </div>
        <div class="row-fluid" style="text-align: center">
            <?php
            $this->widget('bootstrap.widgets.TbButton', [
                'buttonType' => 'submit',
                'type' => 'success',
                'icon' => 'icon-ok',
                'label' => 'Generar pago',
            ]);
            ?>
        </div>

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

    </div><!-- form -->
