Merge branch 'v5-develop' of https://github.com/turbo124/invoiceninja into v5-develop

This commit is contained in:
David Bomba 2024-04-08 20:36:32 +10:00
commit 4721d1dd43

View File

@ -19,37 +19,37 @@ use SimpleXMLElement;
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<FatturaElettronica versione="FPR12" xmlns="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2"> <FatturaElettronica versione="FPR12" xmlns="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2">
<FatturaElettronicaHeader> <FatturaElettronicaHeader>
<DatiTrasmissione> <DatiTrasmissione>// Transmission data
<IdTrasmittente> <IdTrasmittente>// Transmitter ID
<IdPaese>IT</IdPaese> <IdPaese>IT</IdPaese> //Country code
<IdCodice>01234567890</IdCodice> <IdCodice>01234567890</IdCodice> //Taxpayer code
</IdTrasmittente> </IdTrasmittente>
<ProgressivoInvio>00001</ProgressivoInvio> <ProgressivoInvio>00001</ProgressivoInvio> // Transmission progress
<FormatoTrasmissione>FPR12</FormatoTrasmissione> <FormatoTrasmissione>FPR12</FormatoTrasmissione>// Transmission format
<CodiceDestinatario>ABCDE1</CodiceDestinatario> <CodiceDestinatario>ABCDE1</CodiceDestinatario>// Receiver code
</DatiTrasmissione> </DatiTrasmissione>
<CedentePrestatore> <CedentePrestatore>//Seller/Provider
<!-- Company information of the sender (seller/provider) --> <!-- Company information of the sender (seller/provider) -->
</CedentePrestatore> </CedentePrestatore>
<CessionarioCommittente> <CessionarioCommittente>//Buyer/Recipient
<!-- Company information of the receiver (buyer) --> <!-- Company information of the receiver (buyer) -->
</CessionarioCommittente> </CessionarioCommittente>
</FatturaElettronicaHeader> </FatturaElettronicaHeader>
<FatturaElettronicaBody> <FatturaElettronicaBody>
<DatiGenerali> <DatiGenerali>//General data
<DatiGeneraliDocumento> <DatiGeneraliDocumento>// Document general data
<TipoDocumento>TD01</TipoDocumento> <TipoDocumento>TD01</TipoDocumento>// Document type
<Divisa>EUR</Divisa> <Divisa>EUR</Divisa>// Currency
<Data>2023-04-21</Data> <Data>2023-04-21</Data>// Date
<Numero>1</Numero> <Numero>1</Numero>// Number
<!-- Add other information as needed --> <!-- Add other information as needed -->
</DatiGeneraliDocumento> </DatiGeneraliDocumento>
<!-- Add other general data as needed --> <!-- Add other general data as needed -->
</DatiGenerali> </DatiGenerali>
<DatiBeniServizi> <DatiBeniServizi>//Goods and services data
<!-- List of items or services --> <!-- List of items or services -->
</DatiBeniServizi> </DatiBeniServizi>
<DatiPagamento> <DatiPagamento>//Payment data
<!-- Payment details --> <!-- Payment details -->
</DatiPagamento> </DatiPagamento>
</FatturaElettronicaBody> </FatturaElettronicaBody>
@ -60,6 +60,20 @@ class FatturaPA extends AbstractService
{ {
private $xml; private $xml;
//urn:cen.eu:en16931:2017#compliant#urn:fatturapa.gov.it:CIUS-IT:2.0.0
//<cbc:EndpointID schemeID=" 0201 ">UFF001</cbc:EndpointID>
/**
* File Types
*
* EI01 => FILE VUOTO
* EI02 => SERVIZIO NON DISPONIBILE
* EI03 => UTENTE NON ABILITATO
*/
/**
* @param Invoice $invoice
*/
public function __construct(public Invoice $invoice) public function __construct(public Invoice $invoice)
{ {
$this->xml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?><FatturaElettronica></FatturaElettronica>'); $this->xml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?><FatturaElettronica></FatturaElettronica>');