resetAnagrafica(); $anag = \App\Models\Anagrafica::where('id', $anagrafica)->first(); if ($anag != null){ $this->currentAnagrafica = $anagrafica; $this->anag_type = $anag->type; $this->anag_firstname = $anag->firstname; $this->anag_lastname = $anag->lastname; $this->anag_gender = $anag->gender; $this->anag_birth_date = $anag->birth_date; $this->anag_birth_town_id = $anag->birth_town_id; $this->anag_birth_prov_id = $anag->birth_prov_id; $this->anag_residenza_town_id = $anag->residenza_town_id; $this->anag_residenza_prov_id = $anag->residenza_prov_id; $this->anag_residenza_address = $anag->residenza_address; $this->anag_residenza_cap = $anag->residenza_cap; $this->anag_mobile = $anag->mobile; $this->anag_sedicente = $anag->sedicente; $this->anag_documento_tipo = $anag->documento_tipo; $this->anag_documento_patente_cat = $anag->documento_patente_cat; $this->anag_documento_tipo_altro = $anag->documento_tipo_altro; $this->anag_documento_numero = $anag->documento_numero; $this->anag_documento_rilasciato_da = $anag->documento_rilasciato_da; $this->anag_documento_rilasciato_da_altro = $anag->documento_rilasciato_da_altro; $this->anag_foreign_country = $anag->foreign_country; $this->anag_documento_rilasciato_da_di_foreign_localita = $anag->documento_rilasciato_da_di_foreign_localita; $this->anag_documento_rilasciato_da_di_foreign_country = $anag->documento_rilasciato_da_di_foreign_country; $this->anag_documento_rilasciato_da_prov_id = $anag->documento_rilasciato_da_prov_id; $this->anag_documento_rilasciato_da_town_id = $anag->documento_rilasciato_da_town_id; $this->anag_documento_rilasciato_il = $anag->documento_rilasciato_il; $this->anag_documento_scadenza_il = $anag->documento_scadenza_il; $this->anag_state = $anag->state; $this->anag_nazionalita = $anag->nazionalita; $this->anag_nazione_straniera = $anag->nazione_straniera; $this->anag_localita_straniera = $anag->localita_straniera; $this->anag_rag_soc = $anag->rag_soc; $this->anag_vat = $anag->vat; $this->anag_sede_legale_town_id = $anag->sede_legale_town_id; $this->anag_sede_legale_prov_id = $anag->sede_legale_prov_id; $this->anag_sede_legale_address = $anag->sede_legale_address; $this->anag_sede_legale_cap = $anag->sede_legale_cap; $this->anag_phone = $anag->phone; $this->anag_foreign_birth_country = $anag->anag_foreign_birth_country; $this->anag_foreign_birth_city = $anag->anag_foreign_birth_city; $this->anag_foreign_residence_country = $anag->anag_foreign_residence_country; $this->anag_foreign_residence_city = $anag->anag_foreign_residence_city; } $this->emit('load-anagrafica-modal'); $this->emit('change-visualization', $this->anag_type); if ($this->anag_birth_town_id > 0) $this->emit('add-default-value', $this->anag_birth_town_id, $this->getLocalita($this->anag_birth_town_id), 'anag_birth_town_id'); if ($this->anag_residenza_town_id > 0) $this->emit('add-default-value', $this->anag_residenza_town_id, $this->getLocalita($this->anag_residenza_town_id), 'anag_residenza_town_id'); if ($this->anag_documento_rilasciato_da_di_foreign_localita > 0) $this->emit('add-default-value', $this->anag_documento_rilasciato_da_di_foreign_localita, $this->getLocalita($this->anag_documento_rilasciato_da_di_foreign_localita), 'anag_documento_rilasciato_da_di_foreign_localita'); if ($this->vei_carta_circolazione_rilasciata_da_di_foreign_localita > 0) $this->emit('add-default-value', $this->vei_carta_circolazione_rilasciata_da_di_foreign_localita, $this->getLocalita($this->vei_carta_circolazione_rilasciata_da_di_foreign_localita), 'vei_carta_circolazione_rilasciata_da_di_foreign_localita'); if ($this->anag_sede_legale_town_id > 0) $this->emit('add-default-value', $this->anag_sede_legale_town_id, $this->getLocalita($this->anag_sede_legale_town_id), 'anag_sede_legale_town_id'); } public function anagraficaSave() { if ($this->currentAnagrafica > 0){ \App\Models\Anagrafica::whereId($this->currentAnagrafica)->update([ 'type' => $this->anag_type, 'firstname' => $this->anag_firstname, 'lastname' => $this->anag_lastname, 'gender' => $this->anag_gender, 'birth_date' => $this->anag_birth_date, 'birth_town_id' => $this->anag_birth_town_id, 'birth_prov_id' => $this->anag_birth_prov_id, 'residenza_town_id' => $this->anag_residenza_town_id, 'residenza_prov_id' => $this->anag_residenza_prov_id, 'residenza_address' => $this->anag_residenza_address, 'residenza_cap' => $this->anag_residenza_cap, 'mobile' => $this->anag_mobile, 'sedicente' => $this->anag_sedicente, 'documento_tipo' => $this->anag_documento_tipo, 'documento_patente_cat' => $this->anag_documento_patente_cat, 'documento_tipo_altro' => $this->anag_documento_tipo_altro, 'documento_numero' => $this->anag_documento_numero, 'documento_rilasciato_da' => $this->anag_documento_rilasciato_da, 'documento_rilasciato_da_altro' => $this->anag_documento_rilasciato_da_altro, 'foreign_country' => $this->anag_foreign_country, 'documento_rilasciato_da_di_foreign_localita' => $this->anag_documento_rilasciato_da_di_foreign_localita, 'documento_rilasciato_da_di_foreign_country' => $this->anag_documento_rilasciato_da_di_foreign_country, 'documento_rilasciato_da_prov_id' => $this->anag_documento_rilasciato_da_prov_id, 'documento_rilasciato_da_town_id' => $this->anag_documento_rilasciato_da_town_id, 'documento_rilasciato_il' => $this->anag_documento_rilasciato_il, 'documento_scadenza_il' => $this->anag_documento_scadenza_il, 'state' => $this->anag_state, 'nazionalita' => $this->anag_nazionalita, 'nazione_straniera' => $this->anag_nazione_straniera, 'localita_straniera' => $this->anag_localita_straniera, 'rag_soc' => $this->anag_rag_soc, 'vat' => $this->anag_vat, 'sede_legale_town_id' => $this->anag_sede_legale_town_id, 'sede_legale_prov_id' => $this->anag_sede_legale_prov_id, 'sede_legale_address' => $this->anag_sede_legale_address, 'sede_legale_cap' => $this->anag_sede_legale_cap, 'phone' => $this->anag_phone, 'anag_foreign_birth_country' => $this->anag_foreign_birth_country, 'anag_foreign_birth_city' => $this->anag_foreign_birth_city, 'anag_foreign_residence_country' => $this->anag_foreign_residence_country, 'anag_foreign_residence_city' => $this->anag_foreign_residence_city ]); } else { $anagrafica = \App\Models\Anagrafica::create([ 'type' => $this->anag_type, 'firstname' => $this->anag_firstname, 'lastname' => $this->anag_lastname, 'gender' => $this->anag_gender, 'birth_date' => $this->anag_birth_date, 'birth_town_id' => $this->anag_birth_town_id, 'birth_prov_id' => $this->anag_birth_prov_id, 'residenza_town_id' => $this->anag_residenza_town_id, 'residenza_prov_id' => $this->anag_residenza_prov_id, 'residenza_address' => $this->anag_residenza_address, 'residenza_cap' => $this->anag_residenza_cap, 'mobile' => $this->anag_mobile, 'sedicente' => $this->anag_sedicente, 'documento_tipo' => $this->anag_documento_tipo, 'documento_patente_cat' => $this->anag_documento_patente_cat, 'documento_tipo_altro' => $this->anag_documento_tipo_altro, 'documento_numero' => $this->anag_documento_numero, 'documento_rilasciato_da' => $this->anag_documento_rilasciato_da, 'documento_rilasciato_da_altro' => $this->anag_documento_rilasciato_da_altro, 'foreign_country' => $this->anag_foreign_country, 'documento_rilasciato_da_di_foreign_localita' => $this->anag_documento_rilasciato_da_di_foreign_localita, 'documento_rilasciato_da_di_foreign_country' => $this->anag_documento_rilasciato_da_di_foreign_country, 'documento_rilasciato_da_prov_id' => $this->anag_documento_rilasciato_da_prov_id, 'documento_rilasciato_da_town_id' => $this->anag_documento_rilasciato_da_town_id, 'documento_rilasciato_il' => $this->anag_documento_rilasciato_il, 'documento_scadenza_il' => $this->anag_documento_scadenza_il, 'state' => $this->anag_state, 'nazionalita' => $this->anag_nazionalita, 'nazione_straniera' => $this->anag_nazione_straniera, 'localita_straniera' => $this->anag_localita_straniera, 'rag_soc' => $this->anag_rag_soc, 'vat' => $this->anag_vat, 'sede_legale_town_id' => $this->anag_sede_legale_town_id, 'sede_legale_prov_id' => $this->anag_sede_legale_prov_id, 'sede_legale_address' => $this->anag_sede_legale_address, 'sede_legale_cap' => $this->anag_sede_legale_cap, 'phone' => $this->anag_phone ]); $set = false; if ($this->currentTeste > 0){ $set = true; if ($this->currentTeste == 1) $this->data_testi_oculari_0 = $anagrafica->id; if ($this->currentTeste == 2) $this->data_testi_oculari_1 = $anagrafica->id; if ($this->currentTeste == 3) $this->data_testi_oculari_2 = $anagrafica->id; if ($this->currentTeste == 4) $this->data_testi_oculari_3 = $anagrafica->id; } if ($this->currentProprietario > 0){ $set = true; $this->data_proprietari = $anagrafica->id; $this->emit('add-default-value', $this->data_proprietari, $this->getAnagrafica($this->data_proprietari), 'data_proprietari'); } if ($this->currentCoproprietario > 0){ $set = true; $this->data_coproprietari = $anagrafica->id; $this->emit('add-default-value', $this->data_coproprietari, $this->getAnagrafica($this->data_coproprietari), 'data_coproprietari'); } if ($this->currentPasseggero > 0){ $set = true; if ($this->currentPasseggero == 1){ $this->data_passeggero_0 = $anagrafica->id; $this->emit('add-default-value', $this->data_passeggero_0, $this->getAnagrafica($this->data_passeggero_0), 'data_passeggero_0'); } if ($this->currentPasseggero == 2){ $this->data_passeggero_1 = $anagrafica->id; $this->emit('add-default-value', $this->data_passeggero_1, $this->getAnagrafica($this->data_passeggero_1), 'data_passeggero_1'); } if ($this->currentPasseggero == 3){ $this->data_passeggero_2 = $anagrafica->id; $this->emit('add-default-value', $this->data_passeggero_2, $this->getAnagrafica($this->data_passeggero_2), 'data_passeggero_2'); } if ($this->currentPasseggero == 4){ $this->data_passeggero_3 = $anagrafica->id; $this->emit('add-default-value', $this->data_passeggero_3, $this->getAnagrafica($this->data_passeggero_3), 'data_passeggero_3'); } } if ($this->currentInfortunato > 0){ $set = true; if ($this->currentInfortunato == 1){ $this->data_infortunato_extra_0 = $anagrafica->id; $this->emit('add-default-value', $this->data_infortunato_extra_0, $this->getAnagrafica($this->data_infortunato_extra_0), 'data_infortunato_extra_0'); } if ($this->currentInfortunato == 2){ $this->data_infortunato_extra_1 = $anagrafica->id; $this->emit('add-default-value', $this->data_infortunato_extra_1, $this->getAnagrafica($this->data_infortunato_extra_1), 'data_infortunato_extra_1'); } if ($this->currentInfortunato == 3){ $this->data_infortunato_extra_2 = $anagrafica->id; $this->emit('add-default-value', $this->data_infortunato_extra_2, $this->getAnagrafica($this->data_infortunato_extra_2), 'data_infortunato_extra_2'); } if ($this->currentInfortunato == 4){ $this->data_infortunato_extra_3 = $anagrafica->id; $this->emit('add-default-value', $this->data_infortunato_extra_3, $this->getAnagrafica($this->data_infortunato_extra_3), 'data_infortunato_extra_3'); } } if ($this->currentConducente > 0){ $set = true; $this->data_conducenti = $anagrafica->id; $this->emit('add-default-value', $this->data_conducenti, $this->getAnagrafica($this->data_conducenti), 'data_conducenti'); } if ($this->currentProgressive > -1 && !$set){ $this->updateAnagraficaParteCoinvolta($anagrafica->id, $this->currentProgressive); } } $this->resetAnagrafica(); $this->emit('close-modal'); } public function anagraficaDataParteComuneSave(){ // Start a database transaction to ensure data consistency DB::beginTransaction(); try { $veicolo = ReportDataVeicoli::where('progressive', $this->currentProgressive) ->where('report_id', $this->dataId) ->first(); if ($veicolo) { $conducente = $veicolo->conducente; if ($conducente) { $conducente_uguale_proprietario = ($this->data_proprietari == $conducente->id); } else { $conducente_uguale_proprietario = false; } } else { $conducente_uguale_proprietario = false; } // Update ReportDataVeicoli instead of delete/create $veicolo = ReportDataVeicoli::updateOrCreate( [ 'progressive' => $this->currentProgressive, 'report_id' => $this->dataId ], [ 'veicolo' => $this->currentVeicolo, 'chilometri_percorsi' => $this->data_chilometri_percorsi, 'stato_veicolo' => $this->data_stato_veicolo, 'polizze' => $this->data_polizze, 'proprietari' => $this->data_proprietari, 'conducente_uguale_proprietario'=> $conducente_uguale_proprietario, 'coproprietari' => $this->data_coproprietari, 'infortunato' => $this->data_infortunato, 'infortunato_ospedale' => $this->data_infortunato_ospedale, 'patente_al_seguito' => $this->data_patente_al_seguito, 'generalizzato' => $this->data_generalizzato, 'generalizzato_altrove' => $this->data_generalizzato_altrove, 'posizione_statica_finale' => $this->data_posizione_statica_finale, 'danni_visibili_riportati' => $this->data_danni_visibili_riportati, 'danni_visibili_pre_esistenti' => $this->data_danni_visibili_pre_esistenti, 'destinazione_veicolo' => $this->data_destinazione_veicolo, 'destinazione_veicolo_affidato_a' => $this->data_destinazione_veicolo_affidato_a, 'destinazione_veicolo_sequestro_num_art' => $this->data_destinazione_veicolo_sequestro_num_art, 'destinazione_veicolo_amministrativo_num' => $this->data_destinazione_veicolo_amministrativo_num, 'destinazione_veicolo_amministrativo_num_art_violato' => $this->data_destinazione_veicolo_amministrativo_num_art_violato, 'destinazione_veicolo_amministrativo_cds' => $this->data_destinazione_veicolo_amministrativo_cds, 'circostanze_presunte_incidente' => $this->data_circostanze_presunte_incidente, 'stato_pneumatici' => $this->data_stato_pneumatici, 'marca_pneumatici' => $this->data_marca_pneumatici, 'misura_pneumatici' => $this->data_misura_pneumatici, 'dispositivi_ottici' => $this->data_dispositivi_ottici, 'tergicristalli' => $this->data_tergicristalli, 'segnale_pericolo' => $this->data_segnale_pericolo, 'abs' => $this->data_abs, 'gps' => $this->data_gps, 'marcia_inserita' => $this->data_marcia_inserita, 'cristallo' => $this->data_cristallo, 'cristallo_posizione' => $this->data_cristallo_posizione, 'specchio_retrovisore' => $this->data_specchio_retrovisore, 'specchio_lat_dx' => $this->data_specchio_lat_dx, 'specchio_lat_sx' => $this->data_specchio_lat_sx, 'attivazione_airbag' => $this->data_attivazione_airbag, 'airbag_posizione' => $this->data_airbag_posizione, 'alcool_test' => $this->data_alcool_test, 'alcool_test_esito' => $this->data_alcool_test_esito, 'drug_test' => $this->data_drug_test, 'drug_test_esito' => $this->data_drug_test_esito, 'sistema_ritenuta_minori' => $this->data_sistema_ritenuta_minori, 'sistema_ritenuta_minori_omologazione' => $this->data_sistema_ritenuta_minori_omologazione, 'verbale_violazione_numero_1' => $this->data_verbale_violazione_numero_1, 'articolo_violato_1' => $this->data_articolo_violato_1, 'cds_1' => $this->data_cds_1, 'verbale_violazione_numero_2' => $this->data_verbale_violazione_numero_2, 'articolo_violato_2' => $this->data_articolo_violato_2, 'cds_2' => $this->data_cds_2, 'verbale_violazione_numero_3' => $this->data_verbale_violazione_numero_3, 'articolo_violato_3' => $this->data_articolo_violato_3, 'cds_3' => $this->data_cds_3, 'conducente_patente_numero' => $this->data_conducente_patente_numero, 'conducente_patente_categoria' => $this->data_conducente_patente_categoria, 'conducente_patente_rilasciata_da' => $this->data_conducente_patente_rilasciata_da, 'conducente_patente_rilasciata_da_altro' => $this->data_conducente_patente_rilasciata_da_altro, 'conducente_patente_rilasciata_il' => $this->data_conducente_patente_rilasciata_il, 'conducente_patente_scadenza' => $this->data_conducente_patente_scadenza, 'conducente_patente_prescrizioni' => $this->data_conducente_patente_prescrizioni, 'conducente_patente_limitazioni_art_117_1' => $this->data_conducente_patente_limitazioni_art_117_1, 'conducente_patente_limitazioni_art_117_2' => $this->data_conducente_patente_limitazioni_art_117_2, 'conducente_patente_abilitazione' => $this->data_conducente_patente_abilitazione, 'conducente_patente_abilitazione_numero' => $this->data_conducente_patente_abilitazione_numero, 'conducente_patente_abilitazione_rilasciata_da' => $this->data_conducente_patente_abilitazione_rilasciata_da, 'conducente_patente_abilitazione_rilasciata_il' => $this->data_conducente_patente_abilitazione_rilasciata_il, 'conducente_documento' => $this->data_conducente_documento, 'conducente_documento_numero' => $this->data_conducente_documento_numero, 'conducente_sedicente' => $this->data_conducente_sedicente, 'tipo_danno' => $this->data_tipo_danno > 0 ? $this->data_tipo_danno : null, 'entita_danno' => $this->data_entita_danno > 0 ? $this->data_entita_danno : null, 'effetto_danno' => $this->data_effetto_danno > 0 ? $this->data_effetto_danno : null, 'parte_macchina' => $this->data_parte_macchina > 0 ? $this->data_parte_macchina : null, 'tipo_danno_2' => $this->data_tipo_danno_2 > 0 ? $this->data_tipo_danno_2 : null, 'entita_danno_2' => $this->data_entita_danno_2 > 0 ? $this->data_entita_danno_2 : null, 'effetto_danno_2' => $this->data_effetto_danno_2 > 0 ? $this->data_effetto_danno_2 : null, 'parte_macchina_2' => $this->data_parte_macchina_2 > 0 ? $this->data_parte_macchina_2 : null, 'tipo_danno_3' => $this->data_tipo_danno_3 > 0 ? $this->data_tipo_danno_3 : null, 'entita_danno_3' => $this->data_entita_danno_3 > 0 ? $this->data_entita_danno_3 : null, 'effetto_danno_3' => $this->data_effetto_danno_3 > 0 ? $this->data_effetto_danno_3 : null, 'parte_macchina_3' => $this->data_parte_macchina_3 > 0 ? $this->data_parte_macchina_3 : null, 'tipo_danno_4' => $this->data_tipo_danno_4 > 0 ? $this->data_tipo_danno_4 : null, 'entita_danno_4' => $this->data_entita_danno_4 > 0 ? $this->data_entita_danno_4 : null, 'effetto_danno_4' => $this->data_effetto_danno_4 > 0 ? $this->data_effetto_danno_4 : null, 'parte_macchina_4' => $this->data_parte_macchina_4 > 0 ? $this->data_parte_macchina_4 : null ] ); // Update or create ReportDataCintureSicurezza \App\Models\ReportDataCintureSicurezza::updateOrCreate( [ 'progressive' => $this->currentProgressive, 'report_id' => $this->dataId ], [ 'conducente' => $this->data_cinture_conducente, 'passeggeri_0' => $this->data_cinture_passeggeri_0, 'passeggeri_1' => $this->data_cinture_passeggeri_1, 'passeggeri_2' => $this->data_cinture_passeggeri_2, 'passeggeri_3' => $this->data_cinture_passeggeri_3 ] ); // Update or create ReportDataUsoDelCasco \App\Models\ReportDataUsoDelCasco::updateOrCreate( [ 'progressive' => $this->currentProgressive, 'report_id' => $this->dataId ], [ 'conducente' => $this->data_casco_conducente, 'passeggeri' => $this->data_casco_passeggero ] ); \App\Models\ReportDataUsoDelCascoOmologazione::updateOrCreate( [ 'progressive' => $this->currentProgressive, 'report_id' => $this->dataId ], [ 'conducente' => $this->data_casco_omologazione_conducente, 'passeggeri' => $this->data_casco_omologazione_passeggero ] ); // Delete existing passenger records first (since there might be multiple) \App\Models\ReportDataPasseggeri::where('progressive', $this->currentProgressive) ->where('report_id', $this->dataId) ->delete(); // Create new passenger records \App\Models\ReportDataPasseggeri::create([ 'progressive' => $this->currentProgressive, 'report_id' => $this->dataId, 'passeggero' => $this->data_passeggero_0, 'infortunato' => $this->data_infortunato_0, 'infortunato_ospedale' => $this->data_infortunato_ospedale_0 ]); \App\Models\ReportDataPasseggeri::create([ 'progressive' => $this->currentProgressive, 'report_id' => $this->dataId, 'passeggero' => $this->data_passeggero_1, 'infortunato' => $this->data_infortunato_1, 'infortunato_ospedale' => $this->data_infortunato_ospedale_1 ]); \App\Models\ReportDataPasseggeri::create([ 'progressive' => $this->currentProgressive, 'report_id' => $this->dataId, 'passeggero' => $this->data_passeggero_2, 'infortunato' => $this->data_infortunato_2, 'infortunato_ospedale' => $this->data_infortunato_ospedale_2 ]); \App\Models\ReportDataPasseggeri::create([ 'progressive' => $this->currentProgressive, 'report_id' => $this->dataId, 'passeggero' => $this->data_passeggero_3, 'infortunato' => $this->data_infortunato_3, 'infortunato_ospedale' => $this->data_infortunato_ospedale_3 ]); // Delete existing injured person records first \App\Models\ReportDataInfortunati::where('progressive', $this->currentProgressive) ->where('report_id', $this->dataId) ->delete(); // Create new injured person records \App\Models\ReportDataInfortunati::create([ 'progressive' => $this->currentProgressive, 'report_id' => $this->dataId, 'infortunato' => $this->data_infortunato_extra_0 ]); \App\Models\ReportDataInfortunati::create([ 'progressive' => $this->currentProgressive, 'report_id' => $this->dataId, 'infortunato' => $this->data_infortunato_extra_1 ]); \App\Models\ReportDataInfortunati::create([ 'progressive' => $this->currentProgressive, 'report_id' => $this->dataId, 'infortunato' => $this->data_infortunato_extra_2 ]); \App\Models\ReportDataInfortunati::create([ 'progressive' => $this->currentProgressive, 'report_id' => $this->dataId, 'infortunato' => $this->data_infortunato_extra_3 ]); DB::commit(); session()->flash('success', 'Record aggiornato'); } catch (\Exception $ex) { DB::rollBack(); Log::error('Error in anagraficaDataParteComuneSave: ' . $ex->getMessage()); session()->flash('error', 'Errore in fase di aggiornamento (' . $ex->getMessage() . ')'); } $this->resetVeicoloData(); $this->emit('close-modal-parte-comune'); } public function editAnagraficaParte($progressive) { $parte_comune = ReportDataPartiCoinvolte::where('report_id', $this->dataId)->where('progressive', $progressive)->first(); if ($parte_comune != null) { $this->editAnagrafica($parte_comune->anagrafica); $this->emit('load-anagrafica-modal'); } } public function addAnagrafica($progressive) { $this->resetAnagrafica(); $this->currentProgressive = $progressive; $this->emit('load-anagrafica-modal'); } public function getAnagrafica($anagrafica){ if ($anagrafica > 0) { $ret = \App\Models\Anagrafica::findOrFail($anagrafica); if($ret->type == 0) return $ret->lastname . " " . $ret->firstname; else return $ret->rag_soc; } return ""; } public function resetAnagrafica(){ $this->loadAnagrafica = ''; $this->currentAnagrafica = 0; $this->currentPasseggero = 0; $this->currentInfortunato = 0; $this->currentProprietario = 0; $this->currentCoproprietario = 0; $this->currentConducente = 0; $this->currentTeste = 0; $this->anag_type = 0; $this->anag_firstname = ''; $this->anag_lastname = ''; $this->anag_gender = ''; $this->anag_birth_date = null; $this->anag_birth_town_id = null; $this->anag_birth_prov_id = null; $this->anag_residenza_town_id = null; $this->anag_residenza_prov_id = null; $this->anag_residenza_address = ''; $this->anag_residenza_cap = ''; $this->anag_mobile = ''; $this->anag_sedicente; $this->anag_documento_tipo = ''; $this->anag_documento_patente_cat = ''; $this->anag_documento_tipo_altro = ''; $this->anag_documento_numero = ''; $this->anag_documento_rilasciato_da = ''; $this->anag_documento_rilasciato_da_altro = ''; $this->anag_foreign_country = null; $this->anag_documento_rilasciato_da_di_foreign_localita = null; $this->anag_documento_rilasciato_da_di_foreign_country = null; $this->anag_documento_rilasciato_da_prov_id = null; $this->anag_documento_rilasciato_da_town_id = null; $this->anag_documento_rilasciato_il = ''; $this->anag_documento_scadenza_il = ''; $this->anag_state = ''; $this->anag_nazionalita = ''; $this->anag_nazione_straniera = ''; $this->anag_localita_straniera = ''; $this->anag_rag_soc = ''; $this->anag_vat = ''; $this->anag_sede_legale_town_id = null; $this->anag_sede_legale_prov_id = null; $this->anag_sede_legale_address = ''; $this->anag_sede_legale_cap = ''; $this->anag_phone = ''; } }