<?php
/* @var $this UtilidadController */
/* @var $model Utilidad */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'utilidad-form',
	'enableAjaxValidation'=>true,
        'htmlOptions' => array(
                'class' => 'form-horizontal'
            )
)); ?>

    
     <div class="row justify-content-center">
        <div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12 ">
            <p class="note">Los campos con <span class="required">*</span> son obligatorios.</p>
        </div> 
    </div>

    <div class="row justify-content-center">
         <div class="col-12 col-sm-12 col-md-4 col-lg-4 col-xl-4">
             <div class="form-group">
		<?php echo $form->labelEx($model,'estatus', array('class' => 'col-12')); ?>
            <div class="col-12">
                    <?php echo $form->dropdownList($model,'estatus',array(1=>'ACTIVO',0=>'INACTIVO'),  array('class'=>'form-control form-control-line')); ?> 
		<?php echo $form->error($model,'estatus'); ?>  
            </div>
        </div>
        </div>
        
              <div class="col-12 col-sm-12 col-md-4 col-lg-4 col-xl-4">
             <div class="form-group">
		<?php echo $form->labelEx($model,'tipo_ingreso', array('class' => 'col-12')); ?>
            <div class="col-12">
                    <?php echo $form->dropdownList($model,'tipo_ingreso',array(''=>'SELECCIONE','I'=>'INGRESO','E'=>'EGRESO'),  array('class'=>'form-control form-control-line')); ?> 
		<?php echo $form->error($model,'tipo_ingreso'); ?>  
            </div>
        </div>
        </div>
        
        
               <div class="col-12 col-sm-12 col-md-4 col-lg-4 col-xl-4">
             <div class="form-group">
		<?php echo $form->labelEx($model,'fecha', array('class' => 'col-12')); ?>
            <div class="col-12">
                     <?php
                        $this->widget('ext.YiiDateTimePicker.jqueryDateTime', array(
                            'model' => $model,
                            'attribute' => 'fecha',
                            'options' => array(
                                'lang'=>'es',
                                'minDate'=>'-1970/01/02',
                                'timepicker'=>false,
                                'format'=>'d-m-Y',
                                ),
                                'htmlOptions' => array('class' => 'form-control form-control-line',
                                'placeholder'=>"dd-mm-aaaa",
                                'recordate'=>false,
                                    
                                    
                                    
                                ),
                        ));
                        ?>
                        
                        
                        <?php echo $form->error($model,'fecha'); ?>  
            </div>
        </div>
        </div>
        
           
        
        
   
        
        <div class="col-12 col-sm-12 col-md-8 col-lg-8 col-xl-8">
             <div class="form-group">
		<?php echo $form->labelEx($model,'descripcion', array('class' => 'col-12')); ?>
		<div class="col-12">
                <?php echo $form->textField($model,'descripcion',array('size'=>60,'maxlength'=>100,
                    'class' => 'form-control form-control-line ', 
                    'placeholder'=>"")); ?>
                <?php echo $form->error($model,'descripcion'); ?>
	       </div>
             </div>
         </div>
        
                   <div class="col-12 col-sm-12 col-md-4 col-lg-4 col-xl-4">
             <div class="form-group">
		<?php echo $form->labelEx($model,'monto', array('class' => 'col-12')); ?>
             <div class="col-12">
                     <?php echo $form->textField($model,'monto',array('size'=>60,'maxlength'=>100,
                    'class' => 'form-control form-control-line ', 
                    'placeholder'=>"")); ?>
		<?php echo $form->error($model,'monto'); ?>  
            </div>
        </div>
        </div>
        
        
        
    </div>
    
      <div class="row justify-content-end">
               
         <div class="col-12 col-sm-12 col-md-4 col-lg-4 col-xl-4 mb-2">
             <button type="reset" class="btn btn-large btn-block btn-default  ">
                         <i class="fa  fa-eraser fa-lg   "></i>     LIMPIAR FORMULARIO</button>
                   </div>  <div class="col-12 col-sm-12 col-md-4 col-lg-4 col-xl-4 mb-2">
                    <button type="submit" class="btn btn-large btn-block btn-success  ">
                            <i class="fa fa-floppy-o fa-lg   "></i>    <?php echo $model->isNewRecord ? "GUARDAR" : "MODIFICAR"; ?></button>
                   </div> 
         
    </div>
     <br>
    <?php echo $form->errorSummary($model); ?>
    <?php $this->endWidget(); ?>
</div>


<script type="text/javascript">
    
     $('#Utilidad_monto').mask('A99999999999999', {translation: { 'A':{pattern: /[1-9]/}}, clearIfNotMatch: true});
  
</script>