コード例 #1
0
ファイル: f03.php プロジェクト: alevilar/gestionvilar
 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);
 }
コード例 #2
0
ファイル: f31a.php プロジェクト: alevilar/gestionvilar
 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;
 }
コード例 #3
0
ファイル: f59m.php プロジェクト: alevilar/gestionvilar
 function getViewVars()
 {
     $cosasParaver = parent::getViewVars();
     $agents['agents'] = $this->Agent->find('list');
     $agentAux = $this->Agent->find('all', array('contain' => array('IdentificationType')));
     foreach ($agentAux as $au) {
         //debug(json_encode($au));
         $au['Agent']['identification_name'] = $au['IdentificationType']['name'];
         $agents['agentJsonData'][$au['Agent']['id']] = json_encode($au['Agent']);
     }
     return $cosasParaver + $agents;
 }
コード例 #4
0
ファイル: f13ba.php プロジェクト: alevilar/gestionvilar
 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;
 }
コード例 #5
0
ファイル: prenda.php プロジェクト: alevilar/gestionvilar
 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;
 }
コード例 #6
0
ファイル: f02.php プロジェクト: alevilar/gestionvilar
 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;
 }
コード例 #7
0
ファイル: f11.php プロジェクト: alevilar/gestionvilar
 public function getViewVars()
 {
     parent::getViewVars();
     // Get Spouses
     $spouses = array();
     if (!empty($this->data['Vehicle']['Customer']['CustomerNatural']['id'])) {
         $spouses = ClassRegistry::init('Spouse')->find('all', array('conditions' => array('customer_natural_id' => $this->data['Vehicle']['Customer']['CustomerNatural']['id']), 'recursive' => -1));
     }
     $finalSpouses = array();
     foreach ($spouses as $sp) {
         $finalSpouses[$sp['Spouse']['id']] = array('text' => $sp['Spouse']['name'], 'json' => json_encode($sp['Spouse']));
     }
     // Get Representatives
     $representatives = array();
     if (!empty($this->data['Vehicle']['Customer']['id'])) {
         $representatives = ClassRegistry::init('Representative')->find('all', array('conditions' => array('customer_id' => $this->data['Vehicle']['Customer']['id']), 'recursive' => -1));
     }
     $finalRepresentatives = array();
     foreach ($representatives as $rp) {
         $finalRepresentatives[$rp['Representative']['id']] = array('text' => $rp['Representative']['name'], 'json' => json_encode($rp['Representative']));
     }
     return array('spouses' => $finalSpouses, 'representatives' => $finalRepresentatives);
 }