Skip to content

Commit 9afd4f6

Browse files
committed
fix: selezione tipo anagrafica
1 parent f76cadb commit 9afd4f6

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

plugins/importFE/src/FatturaElettronica.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,15 +264,13 @@ public function saveAnagrafica($type = null)
264264

265265
if (!empty($info['codice_fiscale'])) {
266266
$anagrafica->codice_fiscale = $info['codice_fiscale'];
267-
$anagrafica->tipo = 'Privato';
268267
}
269268

270-
271269
if (!empty($info['partita_iva'])) {
272270
$anagrafica->partita_iva = $info['partita_iva'];
273-
$anagrafica->tipo = 'Azienda';
274271
}
275272

273+
$anagrafica->tipo = $this->getHeader()['DatiTrasmissione']['FormatoTrasmissione'] == 'FPR12' ? 'Azienda' : 'Ente pubblico';
276274

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

0 commit comments

Comments
 (0)