Exemplo n.º 1
0
 public function beforeSave($options)
 {
     if (!empty($this->data[$this->name]['i_concepto'])) {
         switch ($this->data[$this->name]['i_concepto']) {
             case 'saldo':
                 $this->data[$this->name]['i_concepto_saldo'] = 'X';
                 break;
             case 'prestamo':
                 $this->data[$this->name]['i_concepto_prestamo'] = 'X';
                 break;
             case 'garantiapago':
                 $this->data[$this->name]['i_concepto_sgtia_pago'] = 'GARANTIA DE PAGO';
                 break;
             default:
                 break;
         }
     }
     if (!empty($this->data[$this->name]['i_clausula'])) {
         switch ($this->data[$this->name]['i_clausula']) {
             case 'si':
                 $this->data[$this->name]['i_clausula_si'] = 'X';
                 break;
             case 'no':
                 $this->data[$this->name]['i_clausula_no'] = 'X';
                 break;
             default:
                 break;
         }
     }
     return parent::beforeSave($options);
 }
Exemplo n.º 2
0
 public function beforeSave($options)
 {
     parent::beforeSave($options);
     if (!empty($this->data[$this->name]['tipo_tramite_id'])) {
         $numTipo = $this->data[$this->name]['tipo_tramite_id'];
         $this->data[$this->name]['tipo_tramite_' . $numTipo] = 'X';
     }
     return true;
 }
Exemplo n.º 3
0
 public function beforeSave($options)
 {
     parent::beforeSave($options);
     $idenTyps = ClassRegistry::init('IdentificationType')->find('list', array('fields' => array('id', 'name')));
     foreach ($this->involucrados as $i) {
         if (!empty($this->data[$this->name][$i . '_identification_type_id'])) {
             $iId = $this->data[$this->name][$i . '_identification_type_id'];
             $this->data[$this->name][$i . '_identification_type_name'] = $idenTyps[$iId];
         }
     }
     return true;
 }
Exemplo n.º 4
0
 function beforeSave($options)
 {
     parent::beforeSave($options);
     $MS = ClassRegistry::init('MaritalStatus');
     if (!empty($this->data[$this->name]['acreedor_marital_status_id'])) {
         $MS->id = $this->data[$this->name]['acreedor_marital_status_id'];
         $maritalName = strtoupper($MS->field('name'));
         $this->data[$this->name]['acreedor_marital_status'] = $maritalName;
     }
     if (!empty($this->data[$this->name]['deudor_marital_status_id'])) {
         $MS->id = $this->data[$this->name]['deudor_marital_status_id'];
         $maritalName = strtoupper($MS->field('name'));
         $this->data[$this->name]['deudor_marital_status'] = $maritalName;
     }
     return true;
 }
Exemplo n.º 5
0
 public function beforeSave($options)
 {
     parent::beforeSave($options);
     if (!empty($this->data[$this->name]['d_tipo'])) {
         $numTipo = $this->data[$this->name]['d_tipo'];
         $this->data[$this->name]['d_tipo' . $numTipo] = 'X';
     }
     if (!empty($this->data[$this->name]['declaraciones'])) {
         $this->data[$this->name]['declaraciones'] = '                                        ' . $this->data[$this->name]['declaraciones'];
     }
     /**
     *
     *
     *  representative_identification_dni
        representative_identification_le
        representative_identification_lc
        representative_identification_ext_dni
        representative_identification_ci
        representative_identification_pasap
     *
     */
     switch ($this->data[$this->name]['representative_identification_type_id']) {
         case 1:
             //DNI
             $this->data[$this->name]['representative_identification_dni'] = 'X';
             break;
         case 6:
             // Pasaporte
             $this->data[$this->name]['representative_identification_pasap'] = 'X';
             break;
         case 3:
             // LE
             $this->data[$this->name]['representative_identification_le'] = 'X';
             break;
         case 4:
             // LC
             $this->data[$this->name]['representative_identification_lc'] = 'X';
             break;
         case 5:
             // CI
             $this->data[$this->name]['representative_identification_ci'] = 'X';
             break;
     }
     return true;
 }
Exemplo n.º 6
0
 public function beforeSave($options)
 {
     parent::beforeSave($options);
     if (!empty($this->data[$this->name]['es_entrega'])) {
         // si es 1 es posesion
         // si es 2 es tenencia
         if ($this->data[$this->name]['es_entrega'] == 2) {
             $this->data[$this->name]['entrega_tenencia'] = 'X';
         } elseif ($this->data[$this->name]['es_entrega'] == 1) {
             $this->data[$this->name]['entrega_posesion'] = 'X';
         }
     }
     switch ($this->data[$this->name]['vendedor_marital_status_id']) {
         case 1:
             // Casado
             $this->data[$this->name]['vendedor_casado'] = 'X';
             break;
         case 2:
             //Soltero
             $this->data[$this->name]['vendedor_soltero'] = 'X';
             break;
         case 3:
             // Viudo
             $this->data[$this->name]['vendedor_viudo'] = 'X';
             break;
         case 4:
             // DIvorciado
             $this->data[$this->name]['vendedor_divorciado'] = 'X';
             break;
     }
     switch ($this->data[$this->name]['representative_identification_type_id']) {
         case 1:
             //DNI
             $this->data[$this->name]['representative_identification_dni'] = 'X';
             break;
         case 6:
             // Pasaporte
             $this->data[$this->name]['representative_identification_pasap'] = 'X';
             break;
         case 3:
             // LE
             $this->data[$this->name]['representative_identification_le'] = 'X';
             break;
         case 4:
             // LC
             $this->data[$this->name]['representative_identification_lc'] = 'X';
             break;
         case 5:
             // CI
             $this->data[$this->name]['representative_identification_ci'] = 'X';
             break;
     }
     switch ($this->data[$this->name]['spouse_identification_type_id']) {
         case 1:
             //DNI
             $this->data[$this->name]['spouse_identification_dni'] = 'X';
             break;
         case 6:
             // Pasaporte
             $this->data[$this->name]['spouse_identification_pasap'] = 'X';
             break;
         case 3:
             // LE
             $this->data[$this->name]['spouse_identification_le'] = 'X';
             break;
         case 4:
             // LC
             $this->data[$this->name]['spouse_identification_lc'] = 'X';
             break;
         case 5:
             // CI
             $this->data[$this->name]['spouse_identification_ci'] = 'X';
             break;
     }
     //debug($this->data);die();
     return true;
 }