Skip to content

Commit f76cadb

Browse files
committed
fix: impostazione tipo anagrafica in import FE
1 parent 18184f1 commit f76cadb

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

plugins/importFE/src/FatturaElettronica.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,17 @@ public function saveAnagrafica($type = null)
262262
TipoAnagrafica::where('name', $type)->first()->id,
263263
]);
264264

265+
if (!empty($info['codice_fiscale'])) {
266+
$anagrafica->codice_fiscale = $info['codice_fiscale'];
267+
$anagrafica->tipo = 'Privato';
268+
}
269+
270+
265271
if (!empty($info['partita_iva'])) {
266272
$anagrafica->partita_iva = $info['partita_iva'];
273+
$anagrafica->tipo = 'Azienda';
267274
}
268275

269-
if (!empty($info['codice_fiscale'])) {
270-
$anagrafica->codice_fiscale = $info['codice_fiscale'];
271-
}
272276

273277
// Informazioni sull'anagrafica
274278
if (!empty($info['rea'])) {

0 commit comments

Comments
 (0)