1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 13:42:49 +01:00

Fattura object classes

This commit is contained in:
David Bomba 2024-05-11 17:27:32 +10:00
parent c0c818d918
commit 331bdabfb1
29 changed files with 823 additions and 92 deletions

View File

@ -18,19 +18,24 @@ use App\DataMapper\EDoc\FatturaPA\DatiContratto;
use App\DataMapper\EDoc\FatturaPA\DatiRicezione;
use App\DataMapper\EDoc\FatturaPA\DatiOrdineAcquisto;
use App\DataMapper\EDoc\FatturaPA\DatiAnagraficiVettore;
use App\DataMapper\EDoc\FatturaPA\FatturaElettronicaHeader;
use App\DataMapper\EDoc\FatturaPA\FatturaElettronicaBody;
class FatturaPA extends Data
{
public DatiRicezione|Optional $DatiRicezione;
public DatiContratto|Optional $DatiContratto;
public DatiOrdineAcquisto|Optional $DatiOrdineAcquisto;
public DatiAnagraficiVettore|Optional $DatiAnagraficiVettore;
public FatturaElettronicaHeader $FatturaElettronicaHeader;
public FatturaElettronicaBody $FatturaElettronicaBody;
// public DatiRicezione|Optional $DatiRicezione;
// public DatiContratto|Optional $DatiContratto;
// public DatiOrdineAcquisto|Optional $DatiOrdineAcquisto;
// public DatiAnagraficiVettore|Optional $DatiAnagraficiVettore;
public function __construct(
public string $RegimeFiscale = 'RF01',
public string $TipoDocumento = 'TD01',
public string $ModalitaPagamento = 'MP01',
public string $CondizioniPagamento = 'TP02',
// public string $RegimeFiscale = 'RF01',
// public string $TipoDocumento = 'TD01',
// public string $ModalitaPagamento = 'MP01',
// public string $CondizioniPagamento = 'TP02',
) {
}

View File

@ -0,0 +1,31 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA;
use Spatie\LaravelData\Data;
class Anagrafica extends Data
{
//choice
//either Deminominazione OR
//string length 80
public string $Denominazione;
////////////////////////////////////////////
//2. Nome AND CogNome
//string length 60
public string $Nome;
//string length 60
public string $CogNome;
}

View File

@ -0,0 +1,26 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA\Body;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;
class DatiBollo extends Data
{
//SI
public string $BolloVirtuale = 'SI';
//Amount2DecimalType
public float|Optional $ImportoBollo;
}

View File

@ -0,0 +1,46 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA\Body;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;
class DatiCassaPrevidenziale extends Data
{
//string 4char options
public string $TipoCassa;
//rate type 0-100
public float $AlCassa = 0;
//Amount2DecimalType
public float $ImportoContributoCassa;
//rate type 0-100
public float $AliquotaIVA;
//Amount2DecimalType
public float|Optional $ImponibileCassa;
//string string options
public string|Optional $Ritenuta;
//string 2char options
public string|Optional $Natura;
//String20Type
public string|Optional $RiferimentoAmministrazione;
}

View File

@ -0,0 +1,38 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA\Body;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;
use App\DataMapper\EDoc\FatturaPA\DatiTrasporto;
use App\DataMapper\EDoc\FatturaPA\Generics\DatiDDT;
use App\DataMapper\EDoc\FatturaPA\Generics\DatiSAL;
use App\DataMapper\EDoc\FatturaPA\FatturaPrincipale;
use App\DataMapper\EDoc\FatturaPA\Generics\DatiDocumentiCorrelatiType;
class DatiGenerali extends Data
{
public DatiGeneraliDocumento $DatiGeneraliDocumento;
public DatiDocumentiCorrelatiType|Optional $DatiOrdineAcquisto;
public DatiDocumentiCorrelatiType|Optional $DatiContratto;
public DatiDocumentiCorrelatiType|Optional $DatiConvenzione;
public DatiDocumentiCorrelatiType|Optional $DatiRicezione;
public DatiDocumentiCorrelatiType|Optional $DatiFattureCollegate;
public DatiSAL|Optional $DatiSAL;
public DatiDDT|Optional $DatiDDT;
public DatiTrasporto|Optional $DatiTrasporto;
public FatturaPrincipale|Optional $FatturaPrincipale;
}

View File

@ -0,0 +1,52 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA\Body;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;
use App\DataMapper\EDoc\FatturaPA\Body\DatiBollo;
use Spatie\LaravelData\Attributes\WithTransformer;
use App\DataMapper\EDoc\FatturaPA\Body\DatiRitenuta;
use Spatie\LaravelData\Transformers\DateTimeInterfaceTransformer;
class DatiGeneraliDocumento extends Data
{
//length 4 - optional
public string $TipoDocumento;
//string regex [A-Z]{3}
public string $Divisa;
#[WithTransformer(DateTimeInterfaceTransformer::class, format: 'Y-m-d')]
public \DateTime $Data;
//string max 20 char
public string $Numero;
public DatiRitenuta|Optional $DatiRitenuta;
public DatiBollo|Optional $DatiBollo;
public DatiCassaPrevidenziale|Optional $DatiCassaPrevidenziale;
public ScontoMaggiorazione|Optional $ScontoMaggiorazione;
//float 2 decimal type
public float|Optional $ImportoTotaleDocumento;
//float 2 decimal type
public float|Optional $Arrotondamento;
//string 200char
public string|Optional $Causale;
//SI = Documento emesso secondo modalità e termini stabiliti con DM ai sensi dell'art. 73 DPR 633/72
//optional 2 char - only value possible = SI
public string|Optional $Art73;
}

View File

@ -0,0 +1,63 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA\Body;
use Spatie\LaravelData\Data;
class DatiRitenuta extends Data
{
//string 4 char options
public string $TipoRitenuta;
//float 2 decimal
public float $ImportoRitenuta;
// <xs:restriction base="xs:decimal">
// <xs:maxInclusive value="100.00" />
// <xs:pattern value="[0-9]{1,3}\.[0-9]{2}" />
public float $AliquotaRitenuta;
/*
<xs:enumeration value="A" />
<xs:enumeration value="B" />
<xs:enumeration value="C" />
<xs:enumeration value="D" />
<xs:enumeration value="E" />
<xs:enumeration value="G" />
<xs:enumeration value="H" />
<xs:enumeration value="I" />
<xs:enumeration value="L" />
<xs:enumeration value="M" />
<xs:enumeration value="N" />
<xs:enumeration value="O" />
<xs:enumeration value="P" />
<xs:enumeration value="Q" />
<xs:enumeration value="R" />
<xs:enumeration value="S" />
<xs:enumeration value="T" />
<xs:enumeration value="U" />
<xs:enumeration value="V" />
<xs:enumeration value="W" />
<xs:enumeration value="X" />
<xs:enumeration value="Y" />
<!-- IL CODICE SEGUENTE (Z) NON SARA' PIU' VALIDO PER LE FATTURE EMESSE A PARTIRE DAL PRIMO GENNAIO 2021-->
<xs:enumeration value="Z" />
<xs:enumeration value="L1" />
<xs:enumeration value="M1" />
<xs:enumeration value="M2" />
<xs:enumeration value="O1" />
<xs:enumeration value="V1" />
<xs:enumeration value="ZO" />
*/
public string $CausalePagamento;
}

View File

@ -0,0 +1,28 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA\Body;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;
class ScontoMaggiorazione extends Data
{
//string options
//SC - Sconto //discount
//MG - Maggiorazione //surcharge
public string $Tipo;
//float 0-100
public float|Optional $Percentuale;
//Amount8DecimalType
public float|Optional $Importo;
}

View File

@ -0,0 +1,22 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;
class Contatti extends Data
{
public string|Optional $Telefono;
public string|Optional $Fax;
public string|Optional $Email;
}

View File

@ -1,28 +0,0 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA;
use Spatie\LaravelData\Data;
class DatiContratto extends Data
{
public function __construct(
public string $RiferimentoNumeroLinea = '',
public string $IdDocumento = '',
public string $Data = '',
public string $NumItem = '',
public string $CodiceCommessaConvenzione = '',
public string $CodiceCUP = '',
public string $CodiceCIG = '',
) {
}
}

View File

@ -1,28 +0,0 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA;
use Spatie\LaravelData\Data;
class DatiOrdineAcquisto extends Data
{
public function __construct(
public string $RiferimentoNumeroLinea = '',
public string $IdDocumento = '',
public string $Data = '',
public string $NumItem = '',
public string $CodiceCommessaConvenzione = '',
public string $CodiceCUP = '',
public string $CodiceCIG = '',
) {
}
}

View File

@ -1,28 +0,0 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA;
use Spatie\LaravelData\Data;
class DatiRicezione extends Data
{
public function __construct(
public string $RiferimentoNumeroLinea = '',
public string $IdDocumento = '',
public string $Data = '',
public string $NumItem = '',
public string $CodiceCommessaConvenzione = '',
public string $CodiceCUP = '',
public string $CodiceCIG = '',
) {
}
}

View File

@ -0,0 +1,62 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;
use Spatie\LaravelData\Attributes\WithTransformer;
use Spatie\LaravelData\Transformers\DateTimeInterfaceTransformer;
class DatiTrasporto extends Data
{
public DatiAnagraficiVettore|Optional $DatiAnagraficiVettore;
//String80LatinType
public string|Optional $MezzoTrasporto;
//String100LatinType
public string|Optional $CausaleTrasporto;
//int 1-9999
public int|Optional $NumeroColli;
//String100LatinType
public string|Optional $Descrizione;
//String10Type
public string|Optional $UnitaMisuraPeso;
//[0-9]{1,4}\.[0-9]{1,2} //decimal
public float|Optional $PesoLordo;
//[0-9]{1,4}\.[0-9]{1,2} //decimal
public float|Optional $PesoNetto;
//dateTime
#[WithTransformer(DateTimeInterfaceTransformer::class, format: 'Y-m-d\TH:i:s.uP')]
public \DateTime|Optional $DataOraRitiro;
//date
#[WithTransformer(DateTimeInterfaceTransformer::class, format: 'Y-m-d')]
public \DateTime|Optional $DataInizioTrasporto;
//[A-Z]{3}
public string|Optional $TipoResa;
public Sede|Optional $IndirizzoResa;
//dateTime
#[WithTransformer(DateTimeInterfaceTransformer::class, format: 'Y-m-d\TH:i:s.uP')]
public \DateTime|Optional $DataOraConsegna;
}

View File

@ -0,0 +1,26 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;
class FatturaElettronicaBody extends Data
{
public DatiGenerali $DatiGenerali;
public DatiBeniServizi $DatiBeniServizi;
public DatiVeicoli|Optional $DatiVeicoli;
public DatiPagamento|Optional $DatiPagamento;
public Allegati|Optional $Allegati;
}

View File

@ -0,0 +1,24 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA;
use Spatie\LaravelData\Data;
use App\DataMapper\EDoc\FatturaPA\Header\DatiTrasmissione;
use App\DataMapper\EDoc\FatturaPA\Header\CedentePrestatore;
use App\DataMapper\EDoc\FatturaPA\Header\CessionarioCommittente;
class FatturaElettronicaHeader extends Data
{
public DatiTrasmissione $DatiTrasmissione; //DatiTrasmissione
public CedentePrestatore $CedentePrestatore; //CedentePrestatore
public CessionarioCommittente $CessionarioCommittente; //CessionarioCommittente
}

View File

@ -0,0 +1,26 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;
use Spatie\LaravelData\Attributes\WithTransformer;
use Spatie\LaravelData\Transformers\DateTimeInterfaceTransformer;
class FatturaPrincipale extends Data
{
//String20Type
public string $NumeroFatturaPrincipale;
//dateTime
#[WithTransformer(DateTimeInterfaceTransformer::class, format: 'Y-m-d')]
public \DateTime|Optional $DataFatturaPrincipale;
}

View File

@ -0,0 +1,30 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA\Generics;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;
use Spatie\LaravelData\Attributes\WithTransformer;
use Spatie\LaravelData\Transformers\DateTimeInterfaceTransformer;
class DatiDDT extends Data
{
//String20Type
public string $NumeroDDT;
#[WithTransformer(DateTimeInterfaceTransformer::class, format: 'Y-m-d')]
public \DateTime $DataDDT = new \DateTime();
//int 1-9999
public int|Optional $RiferimentoNumeroLinea;
}

View File

@ -0,0 +1,35 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA\Generics;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;
use Spatie\LaravelData\Attributes\WithTransformer;
use Spatie\LaravelData\Transformers\DateTimeInterfaceTransformer;
class DatiDocumentiCorrelatiType extends Data
{
//String20Type
public string $IdDocumento;
//int 1-9999
public int|Optional $RiferimentoNumeroLinea;
#[WithTransformer(DateTimeInterfaceTransformer::class, format: 'Y-m-d')]
public \DateTime|Optional $Data;
//String20Type
public string|Optional $NumItem;
//String100LatinType
public string|Optional $CodiceCommessaConvenzione;
//String15Type
public string|Optional $CodiceCUP;
//String15Type
public string|Optional $CodiceCIG;
}

View File

@ -0,0 +1,22 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA\Generics;
use Spatie\LaravelData\Data;
class DatiSAL extends Data
{
//int 1-999
public int $RiferimentoFase;
}

View File

@ -0,0 +1,29 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA\Header;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;
use App\DataMapper\EDoc\FatturaPA\Sede;
use App\DataMapper\EDoc\FatturaPA\Contatti;
use App\DataMapper\EDoc\FatturaPA\IscrizioneREA;
class CedentePrestatore extends Data
{
public DatiAnagrafici $DatiAnagrafici;
public Sede $sede;
public Sede|Optional $StabileOrganizzazione;
public IscrizioneREA|Optional $IscrizioneREA;
public Contatti|Optional $Contatti;
public string|Optional $RiferimentoAmministrazione;
}

View File

@ -0,0 +1,28 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA\Header;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;
use CleverIt\UBL\Invoice\FatturaPA\common\Sede;
use App\DataMapper\EDoc\FatturaPA\RappresentanteFiscale;
class CessionarioCommittente extends Data
{
public DatiAnagrafici $DatiAnagrafici;
public Sede $Sede;
public Sede|Optional $StabileOrganizzazione;
public RappresentanteFiscale|Optional $RappresentanteFiscale;
}

View File

@ -0,0 +1,44 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA\Header;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;
use App\DataMapper\EDoc\FatturaPA\Anagrafica;
use Spatie\LaravelData\Attributes\WithTransformer;
use Spatie\LaravelData\Transformers\DateTimeInterfaceTransformer;
class DatiAnagrafici extends Data
{
public IdFiscaleIVA $IdFiscaleIVA;
public Anagrafica $Anagrafica;
// string length 4 - options
public string|Optional $RegimeFiscale;
//[A-Z0-9]{11,16}
public string|Optional $CodiceFiscale;
//string 60 char
public string|Optional $AlboProfessionale;
//string 2 chat [A-Z]{2}
public string|Optional $ProvinciaAlbo;
//string 60 char
public string|Optional $NumeroIscrizioneAlbo;
//Date
#[WithTransformer(DateTimeInterfaceTransformer::class, format: 'Y-m-d')]
public \DateTime|Optional $DataIscrizioneAlbo;
}

View File

@ -0,0 +1,24 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA\Header;
use Spatie\LaravelData\Data;
class DatiTrasmissione extends Data
{
public IdTrasmittente $IdTrasmittente; //IdTrasmittente
public string $ProgressivoInvio = ''; //String
public string $FormatoTrasmissione = ''; //String
public string $CodiceDestinatario = ''; //String
}

View File

@ -0,0 +1,24 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA\Header;
use Spatie\LaravelData\Data;
class IdFiscaleIVA extends Data
{
#[\Required]
public string $IdPaese = '';
#[\Required]
public string $IdCodice = '';
}

View File

@ -0,0 +1,21 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA\Header;
use Spatie\LaravelData\Data;
class IdTrasmittente extends Data
{
public string $IdPaese; //String
public string $IdCodice; //String
}

View File

@ -0,0 +1,38 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;
class IscrizioneREA extends Data
{
//[A-Z]{2}
public string $Ufficio;
//string length 20
public string|Optional $NumeroREA;
//precision 2
public float|Optional $CapitaleSociale;
// options
// SU - socio unico (sole trader)
// SN - piu soci (multiple shareholders)
public string|Optional $SocioUnico;
// options
// LS - In Liquidation
// LN - Not in liquidation
public string $StatoLiquidazione = 'LN';
}

View File

@ -0,0 +1,26 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA;
use App\DataMapper\EDoc\FatturaPA\Header\IdFiscaleIVA;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;
class RappresentanteFiscale extends Data
{
public IdFiscaleIVA $IdFiscaleIVA;
public Anagrafica $Anagrafica;
// <xs:pattern value="[A-Z0-9]{11,16}" />
public string|Optional $CodiceFiscaleType;
}

View File

@ -0,0 +1,26 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;
class Sede extends Data
{
public string $Indirizzo = ''; //string - address, 60char limit
public int $CAP = 12345; //[0-9][0-9][0-9][0-9][0-9] ie 12345
public string $Comune = ''; //String 60char limit
public string|Optional $Provincia; //String [A-Z]{2}
public string|Optional $NumeroCivico; // regex \p{IsBasicLatin}{1,8})
public string $Nazione = 'IT'; //String default IT
}

View File

@ -0,0 +1,19 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\EDoc\FatturaPA;
use Spatie\LaravelData\Data;
class StabileOrganizzazione extends Data
{
}