src/Entity/FattureInCloud/DocumentoDettagliato.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\FattureInCloud;
  3. use App\API\FattureInCloud\Response\DocumentoDettagliResponse;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. /**
  8.  * @ORM\Entity()
  9.  * @UniqueEntity("token")
  10.  */
  11. class DocumentoDettagliato
  12. {
  13.     /**
  14.      * Identificativo univoco del documento
  15.      *
  16.      * @var string
  17.      *
  18.      * @ORM\Id
  19.      * @ORM\Column(type="string")
  20.      */
  21.     private $id;
  22.     /**
  23.      * Identificativo permanente del documento (rimane lo stesso anche a seguito di modiifche)
  24.      *
  25.      * @var string
  26.      *
  27.      * @ORM\Column(type="string")
  28.      */
  29.     private $token;
  30.     /**
  31.      * Tipologia del documento = ['fatture' o 'proforma' o 'ordini' o 'preventivi' o 'ndc'],
  32.      *
  33.      * @var string
  34.      *
  35.      * @ORM\Column(type="string")
  36.      */
  37.     private $tipo;
  38.     /**
  39.      *  Identificativo univoco del cliente (se nullo, il cliente non è presente nell'anagrafica) [solo con tipo!="ordforn"],
  40.      *
  41.      * @var string|null
  42.      *
  43.      * @ORM\Column(type="string", nullable=true)
  44.      */
  45.     private $id_cliente;
  46.     /**
  47.      * Identificativo univoco del fornitore (se nullo, il fornitore non è presente nell'anagrafica) [solo con tipo="ordforn"],
  48.      *
  49.      * @var string|null
  50.      *
  51.      * @ORM\Column(type="string", nullable=true)
  52.      */
  53.     private $id_fornitore;
  54.     /**
  55.      * Nome o ragione sociale del cliente/fornitore
  56.      *
  57.      * @var string
  58.      *
  59.      * @ORM\Column(type="string")
  60.      */
  61.     private $nome;
  62.     /**
  63.      * Indirizzo del cliente/fornitore
  64.      *
  65.      * @var string
  66.      *
  67.      * @ORM\Column(type="string")
  68.      */
  69.     private $indirizzo_via;
  70.     /**
  71.      * CAP del cliente/fornitore
  72.      *
  73.      * @var string
  74.      *
  75.      * @ORM\Column(type="string")
  76.      */
  77.     private $indirizzo_cap;
  78.     /**
  79.      * Città (comune) del cliente/fornitore
  80.      *
  81.      * @var string
  82.      *
  83.      * @ORM\Column(type="string")
  84.      */
  85.     private $indirizzo_citta;
  86.     /**
  87.      * Provincia del cliente/fornitore
  88.      *
  89.      * @var string
  90.      *
  91.      * @ORM\Column(type="string")
  92.      */
  93.     private $indirizzo_provincia;
  94.     /**
  95.      * Note extra sull'indirizzo
  96.      *
  97.      * @var string|null
  98.      *
  99.      * @ORM\Column(type="string", nullable=true)
  100.      */
  101.     private $indirizzo_extra;
  102.     /**
  103.      * Paese (nazionalità) del cliente/fornitore
  104.      *
  105.      * @var string
  106.      *
  107.      * @ORM\Column(type="string")
  108.      */
  109.     private $paese;
  110.     /**
  111.      * Lingua del documento (sigla) = ['it' o 'en' o 'de'],
  112.      *
  113.      * @var string|null
  114.      *
  115.      * @ORM\Column(type="string", nullable=true)
  116.      */
  117.     private $lingua;
  118.     /**
  119.      * Partita IVA cliente/fornitore
  120.      *
  121.      * @var string
  122.      *
  123.      * @ORM\Column(type="string")
  124.      */
  125.     private $piva;
  126.     /**
  127.      * Codice fiscale cliente/fornitore
  128.      *
  129.      * @var string
  130.      *
  131.      * @ORM\Column(type="string")
  132.      */
  133.     private $cf;
  134.     /**
  135.      * Numero (e serie) del documento
  136.      *
  137.      * @var string
  138.      *
  139.      * @ORM\Column(type="string")
  140.      */
  141.     private $numero;
  142.     /**
  143.      * Data di emissione del documento
  144.      *
  145.      * @var \DateTime
  146.      *
  147.      * @ORM\Column(type="date")
  148.      */
  149.     private $data;
  150.     /**
  151.      * Non presente in preventivi e ddt] Indica la scadenza del prossimo pagamento (vale 00/00/0000 nel caso in cui tutti i pagamenti siano saldati)
  152.      *
  153.      * @var \DateTime|null
  154.      *
  155.      * @ORM\Column(type="date", nullable=true)
  156.      */
  157.     private $prossima_scadenza;
  158.     /**
  159.      * Valuta del documento e degli importi indicati
  160.      *
  161.      * @var string
  162.      *
  163.      * @ORM\Column(type="string")
  164.      */
  165.     private $valuta;
  166.     /**
  167.      * Tasso di cambio EUR/{valuta}
  168.      *
  169.      * @var double
  170.      *
  171.      * @ORM\Column(type="float")
  172.      */
  173.     private $valuta_cambio;
  174.     /**
  175.      * Specifica se i prezzi da utilizzare per il calcolo del totale sono quelli netti, oppure quello lordi, comprensivi di iva
  176.      *
  177.      * @var boolean
  178.      *
  179.      * @ORM\Column(type="boolean")
  180.      */
  181.     private $prezzi_ivati;
  182.     /**
  183.      * Importo netto del documento (competenze)
  184.      *
  185.      * @var double
  186.      *
  187.      * @ORM\Column(type="float")
  188.      */
  189.     private $importo_netto;
  190.     /**
  191.      * Importo dell'IAV del documento (competenze)
  192.      *
  193.      * @var double
  194.      *
  195.      * @ORM\Column(type="float")
  196.      */
  197.     private $importo_iva;
  198.     /**
  199.      * Importo lordo del documento (totale da pagare)
  200.      *
  201.      * @var double
  202.      *
  203.      * @ORM\Column(type="float")
  204.      */
  205.     private $importo_totale;
  206.     /**
  207.      *  [Non presente in ddt e ordforn] Percentuale rivalsa INPS
  208.      *
  209.      * @var double|null
  210.      *
  211.      * @ORM\Column(type="float", nullable=true)
  212.      */
  213.     private $rivalsa;
  214.     /**
  215.      * [Non presente in ddt e ordforn] Importo rivalsa INPS
  216.      *
  217.      * @var double|null
  218.      *
  219.      * @ORM\Column(type="float", nullable=true)
  220.      */
  221.     private $importo_rivalsa;
  222.     /**
  223.      * [Non presente in ddt e ordforn] Percentuale cassa previdenziale
  224.      *
  225.      * @var double|null
  226.      *
  227.      * @ORM\Column(type="float", nullable=true)
  228.      */
  229.     private $cassa;
  230.     /**
  231.      * [Non presente in ddt e ordforn] Importo cassa previdenziale
  232.      *
  233.      * @var double|null
  234.      *
  235.      * @ORM\Column(type="float", nullable=true)
  236.      */
  237.     private $importo_cassa;
  238.     /**
  239.      * [Non presente in ddt e ordforn] Percentuale ritenuta d'acconto
  240.      *
  241.      * @var double|null
  242.      *
  243.      * @ORM\Column(type="float", nullable=true)
  244.      */
  245.     private $rit_acconto;
  246.     /**
  247.      * [Non presente in ddt e ordforn] Imponibile della ritenuta d'acconto (percentuale sul totale)
  248.      *
  249.      * @var double|null
  250.      *
  251.      * @ORM\Column(type="float", nullable=true)
  252.      */
  253.     private $imponibile_ritenuta;
  254.     /**
  255.      * [Non presente in ddt e ordforn] Importo ritenuta d'acconto
  256.      * @var double|null
  257.      *
  258.      * @ORM\Column(type="float", nullable=true)
  259.      */
  260.     private $importo_rit_acconto;
  261.     /**
  262.      *  [Non presente in ddt e ordforn] Percentuale altra ritenuta (ritenuta previdenziale, Enasarco etc.)
  263.      *
  264.      * @var double|null
  265.      *
  266.      * @ORM\Column(type="float", nullable=true)
  267.      */
  268.     private $rit_altra;
  269.     /**
  270.      * [Non presente in ddt e ordforn] Importo altra ritenuta (ritenuta previdenziale, Enasarco etc.)
  271.      *
  272.      * @var double|null
  273.      *
  274.      * @ORM\Column(type="float", nullable=true)
  275.      */
  276.     private $importo_rit_altra;
  277.     /**
  278.      * [Non presente in ddt e ordforn] Valore della marca da bollo (0 se non presente)
  279.      *
  280.      * @var double|null
  281.      *
  282.      * @ORM\Column(type="float", nullable=true)
  283.      */
  284.     private $marca_bollo;
  285.     /**
  286.      * [Non presente in ddt] Oggetto mostrato sul documento (precedentemente "oggetto_fattura")
  287.      *
  288.      * @var string|null
  289.      *
  290.      * @ORM\Column(type="string", nullable=true)
  291.      */
  292.     private $oggetto_visibile;
  293.     /**
  294.      * [Non presente in ddt] Oggetto (per organizzazione interna)
  295.      *
  296.      * @var string|null
  297.      *
  298.      * @ORM\Column(type="string", nullable=true)
  299.      */
  300.     private $oggetto_interno;
  301.     /**
  302.      * [Non presente in ddt e ordforn] Centro ricavo
  303.      *
  304.      * @var string|null
  305.      *
  306.      * @ORM\Column(type="string", nullable=true)
  307.      */
  308.     private $centro_ricavo;
  309.     /**
  310.      * [Solo in ordforn] Centro di costo
  311.      *
  312.      * @var string|null
  313.      *
  314.      * @ORM\Column(type="string", nullable=true)
  315.      */
  316.     private $centro_costo;
  317.     /**
  318.      * [Non presente in ddt] Note (in formato HTML)
  319.      *
  320.      * @var string|null
  321.      *
  322.      * @ORM\Column(type="text", nullable=true)
  323.      */
  324.     private $note;
  325.     /**
  326.      * [Non presente in ddt] Nasconde o mostra la scadenza sul documento
  327.      *
  328.      * @var boolean|null
  329.      *
  330.      * @ORM\Column(type="boolean", nullable=true)
  331.      */
  332.     private $nascondi_scadenza;
  333.     /**
  334.      * [Non presente in ndc e ordforn] Indica la presenza di un DDT incluso nel documento (per i ddt è sempre true)
  335.      *
  336.      * @var boolean|null
  337.      *
  338.      * @ORM\Column(type="boolean", nullable=true)
  339.      */
  340.     private $ddt;
  341.     /**
  342.      * [Solo se tipo=fatture] Indica la presenza di una fattura accompagnatoria inclusa nel documento
  343.      *
  344.      * @var boolean|null
  345.      *
  346.      * @ORM\Column(type="boolean", nullable=true)
  347.      */
  348.     private $ftacc;
  349.     /**
  350.      * [Solo se tipo!=ddt] Identificativo del template del documento
  351.      *
  352.      * @var string|null
  353.      *
  354.      * @ORM\Column(type="string", nullable=true)
  355.      */
  356.     private $id_template;
  357.     /**
  358.      * [Solo se ddt=true] Identificativo del template del ddt
  359.      *
  360.      * @var string|null
  361.      *
  362.      * @ORM\Column(type="string", nullable=true)
  363.      */
  364.     private $ddt_id_template;
  365.     /**
  366.      * [Solo se ftacc=true] Identificativo del template della fattura accompagnatoria
  367.      *
  368.      * @var string|null
  369.      *
  370.      * @ORM\Column(type="string", nullable=true)
  371.      */
  372.     private $ftacc_id_template;
  373.     /**
  374.      * [Non presente in ddt e ndc] Mostra o meno le informazioni sul metodo di pagamento sul documento
  375.      *
  376.      * @var boolean|null
  377.      *
  378.      * @ORM\Column(type="boolean", nullable=true)
  379.      */
  380.     private $mostra_info_pagamento;
  381.     /**
  382.      * [Solo se mostra_info_pagamento=true] Nome del metodo di pagamento
  383.      *
  384.      * @var string|null
  385.      *
  386.      * @ORM\Column(type="string", nullable=true)
  387.      */
  388.     private $metodo_pagamento;
  389.     /**
  390.      * [Solo se mostra_info_pagamento=true] Titolo della riga N del metodo di pagamento (N da 1 a 5)
  391.      *
  392.      * @var string|null
  393.      *
  394.      * @ORM\Column(type="string", nullable=true)
  395.      */
  396.     private $metodo_titiloN;
  397.     /**
  398.      *  [Solo se mostra_info_pagamento=true] Descrizione della riga N del metodo di pagamento (N da 1 a 5)
  399.      *
  400.      * @var string|null
  401.      *
  402.      * @ORM\Column(type="string", nullable=true)
  403.      */
  404.     private $metodo_descN;
  405.     /**
  406.      * [Solo per preventivi, rapporti e ordforn] Nasconde o mostra la scadenza sul documento = ['tutti' o 'netto' o 'nessuno']
  407.      *
  408.      * @var boolean|null
  409.      *
  410.      * @ORM\Column(type="boolean", nullable=true)
  411.      */
  412.     private $mostra_totali;
  413.     /**
  414.      * [Solo per ricevute, fatture, proforma, ordini] Mostra il bottone "Paga con Paypal"
  415.      *
  416.      * @var boolean|null
  417.      *
  418.      * @ORM\Column(type="boolean", nullable=true)
  419.      */
  420.     private $mostra_bottone_paypal;
  421.     /**
  422.      * [Solo per fatture, proforma, ricevute] Mostra il bottone "Paga con TS Pay"
  423.      *
  424.      * @var boolean|null
  425.      *
  426.      * @ORM\Column(type="boolean", nullable=true)
  427.      */
  428.     private $mostra_bottone_ts_pay;
  429.     /**
  430.      * [Solo per ricevute, fatture, proforma, ordini] Mostra il bottone "Paga con Bonifico Immediato"
  431.      *
  432.      * @var boolean|null
  433.      *
  434.      * @ORM\Column(type="boolean", nullable=true)
  435.      */
  436.     private $mostra_bottone_bonifico;
  437.     /**
  438.      * [Solo per ricevute, fatture, proforma, ordini] Mostra il bottone "Notifica pagamento effettuato"
  439.      *
  440.      * @var boolean|null
  441.      *
  442.      * @ORM\Column(type="boolean", nullable=true)
  443.      */
  444.     private $mostra_bottone_notifica;
  445.     /**
  446.      * Lista degli articoli/righe del documento
  447.      *
  448.      * @var DocumentoArticolo[]|null
  449.      *
  450.      * @ORM\OneToMany(targetEntity="DocumentoArticolo", mappedBy="documento", cascade={"persist"})
  451.      */
  452.     private $lista_articoli;
  453.     /**
  454.      * [Non presente in preventivi, ddt e ordforn] Lista delle tranches di pagamento
  455.      *
  456.      * @var DocumentoPagamanto[]|null
  457.      *
  458.      * @ORM\OneToMany(targetEntity="DocumentoPagamento", mappedBy="documento", cascade={"persist"})
  459.      */
  460.     private $lista_pagamenti;
  461.     /**
  462.      * [Se ddt=true] Numero del ddt (se tipo="ddt" corrisponde al campo "numero")
  463.      *
  464.      * @var string|null
  465.      *
  466.      * @ORM\Column(type="string", nullable=true)
  467.      */
  468.     private $ddt_numero;
  469.     /**
  470.      * [Se ddt=true] Data del ddt Numero del ddt (se tipo="ddt" corrisponde al campo "data")
  471.      *
  472.      * @var \DateTime|null
  473.      *
  474.      * @ORM\Column(type="date", nullable=true)
  475.      */
  476.     private $ddt_data;
  477.     /**
  478.      * [Se ddt/ftacc=true] Numero di colli specificato nel ddt
  479.      *
  480.      * @var string|null
  481.      *
  482.      * @ORM\Column(type="string", nullable=true)
  483.      */
  484.     private $ddt_colli;
  485.     /**
  486.      * [Se ddt/ftacc=true] Peso specificato nel ddt
  487.      *
  488.      * @var string|null
  489.      *
  490.      * @ORM\Column(type="string", nullable=true)
  491.      */
  492.     private $ddt_peso;
  493.     /**
  494.      * [Se ddt/ftacc=true] Causale specificata nel ddt
  495.      *
  496.      * @var string|null
  497.      *
  498.      * @ORM\Column(type="string", nullable=true)
  499.      */
  500.     private $ddt_causale;
  501.     /**
  502.      * [Se ddt/ftacc=true] Luogo di spedizione specificato nel ddt
  503.      *
  504.      * @var string|null
  505.      *
  506.      * @ORM\Column(type="string", nullable=true)
  507.      */
  508.     private $ddt_luogo;
  509.     /**
  510.      * [Se ddt/ftacc=true] Dati trasportatore specificati nel ddt
  511.      *
  512.      * @var string|null
  513.      *
  514.      * @ORM\Column(type="string", nullable=true)
  515.      */
  516.     private $ddt_trasportatore;
  517.     /**
  518.      * [Se ddt/ftacc=true] Annotazioni specificate nel ddt
  519.      *
  520.      * @var string|null
  521.      *
  522.      * @ORM\Column(type="string", nullable=true)
  523.      */
  524.     private $ddt_annotazioni;
  525.     /**
  526.      * [Solo se tipo!=ddt] Link al documento in formato PDF
  527.      *
  528.      * @var string|null
  529.      *
  530.      * @ORM\Column(type="string", nullable=true)
  531.      */
  532.     private $link_doc;
  533.     /**
  534.      * [Solo se ddt=true] Link al ddt in formato PDF
  535.      *
  536.      * @var string|null
  537.      *
  538.      * @ORM\Column(type="string", nullable=true)
  539.      */
  540.     private $link_ddt;
  541.     /**
  542.      * [Solo se ftacc=true] Link alla fattura accompagnatoria in formato PDF
  543.      *
  544.      * @var string|null
  545.      *
  546.      * @ORM\Column(type="string", nullable=true)
  547.      */
  548.     private $link_ftacc;
  549.     /**
  550.      * [Solo se è presente un allegato] Link al file allegato
  551.      *
  552.      * @var string|null
  553.      *
  554.      * @ORM\Column(type="string", nullable=true)
  555.      */
  556.     private $link_allegato;
  557.     /**
  558.      * Indica se il documento è bloccato (e di conseguenza non può essere modificato o eliminato)
  559.      *
  560.      * @var boolean|null
  561.      *
  562.      * @ORM\Column(type="boolean", nullable=true)
  563.      */
  564.     private $bloccato;
  565.     /**
  566.      * [Solo per fatture e ndc elettroniche, vale sempre "true"] Indica che il documento è nel formato FatturaPA
  567.      *
  568.      * @var boolean|null
  569.      *
  570.      * @ORM\Column(type="boolean", nullable=true)
  571.      */
  572.     private $PA;
  573.     /**
  574.      * [Solo se PA=true] Indica la tipologia del cliente: Pubblica Amministrazione ("PA") oppure privato ("B2B") = ['PA' o 'B2B']
  575.      *
  576.      * @var string|null
  577.      *
  578.      * @ORM\Column(type="string", nullable=true)
  579.      */
  580.     private $PA_tipo_cliente;
  581.     /**
  582.      * [Solo se PA=true] Tipo di documento a cui fa seguito la fattura/ndc in questione = ['ordine' o 'convenzione' o 'contratto' o 'nessuno']
  583.      *
  584.      * @var string|null
  585.      *
  586.      * @ORM\Column(type="string", nullable=true)
  587.      */
  588.     private $PA_tipo;
  589.     /**
  590.      * [Solo se PA=true] Numero del documento a cui fa seguito la fattura/ndc in questione,
  591.      *
  592.      * @var string|null
  593.      *
  594.      * @ORM\Column(type="string", nullable=true)
  595.      */
  596.     private $PA_numero;
  597.     /**
  598.      * [Solo se PA=true] Data del documento a cui fa seguito la fattura/ndc in questione
  599.      *
  600.      * @var \DateTime|null
  601.      *
  602.      * @ORM\Column(type="date", nullable=true)
  603.      */
  604.     private $PA_data;
  605.     /**
  606.      * [Solo se PA=true] Codice Unitario Progetto
  607.      *
  608.      * @var string|null
  609.      *
  610.      * @ORM\Column(type="string", nullable=true)
  611.      */
  612.     private $PA_cup;
  613.     /**
  614.      * [Solo se PA=true] Codice Identificativo della Gara
  615.      *
  616.      * @var string|null
  617.      *
  618.      * @ORM\Column(type="string", nullable=true)
  619.      */
  620.     private $PA_cig;
  621.     /**
  622.      * [Solo se PA=true] Codice Ufficio della Pubblica Amministrazione,
  623.      *
  624.      * @var string|null
  625.      *
  626.      * @ORM\Column(type="string", nullable=true)
  627.      */
  628.     private $PA_codice;
  629.     /**
  630.      * [Solo se PA=true] Esigibilità IVA e modalità di versamento (I=immediata, D=differita, S=split payment, N=non specificata) = ['I' o 'D' o 'S' o 'N']
  631.      *
  632.      * @var string|null
  633.      *
  634.      * @ORM\Column(type="string", nullable=true)
  635.      */
  636.     private $PA_esigibilita;
  637.     /**
  638.      * [Solo se PA=true] Modalità di pagamento (vedi tabella codifiche sulla documentazione ufficiale)
  639.      *
  640.      * @var string|null
  641.      *
  642.      * @ORM\Column(type="string", nullable=true)
  643.      */
  644.     private $PA_modalita_pagamento;
  645.     /**
  646.      * [Solo se PA=true] Nome dell'istituto di credito
  647.      *
  648.      * @var string|null
  649.      *
  650.      * @ORM\Column(type="string", nullable=true)
  651.      */
  652.     private $PA_istituto_credito;
  653.     /**
  654.      * [Solo se PA=true] Codice IBAN del conto corrente del beneficiario
  655.      *
  656.      * @var string|null
  657.      *
  658.      * @ORM\Column(type="string", nullable=true)
  659.      */
  660.     private $PA_iban;
  661.     /**
  662.      * [Solo se PA=true] Beneficiario del pagamento
  663.      *
  664.      * @var string|null
  665.      *
  666.      * @ORM\Column(type="string", nullable=true)
  667.      */
  668.     private $PA_beneficiario;
  669.     /**
  670.      * Indica che la fattura/ndc elettronica è stata inviata tramite il servizio FEPA TeamSystem
  671.      *
  672.      * @var boolean|null
  673.      *
  674.      * @ORM\Column(type="boolean", nullable=true)
  675.      */
  676.     private $PA_ts;
  677.     /**
  678.      * [Solo se PA_ts=true] Stato di invio della fattura/ndc
  679.      *
  680.      * @var string|null
  681.      *
  682.      * @ORM\Column(type="string", nullable=true)
  683.      */
  684.     private $PA_ts_stato;
  685.     /**
  686.      * [Solo per fatture, ndc e proforma NON elettroniche, vale sempre "true"] Indica che il documento applica lo split payment
  687.      *
  688.      * @var string|null
  689.      *
  690.      * @ORM\Column(type="string", nullable=true)
  691.      */
  692.     private $split_payment;
  693.     public function __toString(): string
  694.     {
  695.         return $this->getNumberExplicit();
  696.     }
  697.     public function __construct(DocumentoDettagliResponse $documentoDettagli null)
  698.     {
  699.         $this->lista_articoli  = new ArrayCollection();
  700.         $this->lista_pagamenti = new ArrayCollection();
  701.         $document $documentoDettagli->getDettagliDocumento();
  702.         if (isset($document)) {
  703.             $this->setId($document->getId());
  704.             $this->setToken($document->getToken());
  705.             $this->setTipo($document->getTipo());
  706.             $this->setIdCliente($document->getIdCliente());
  707.             $this->setIdFornitore($document->getIdFornitore());
  708.             $this->setNome($document->getNome());
  709.             $this->setIndirizzoVia($document->getIndirizzoVia());
  710.             $this->setIndirizzoCap($document->getIndirizzoCap());
  711.             $this->setIndirizzoCitta($document->getIndirizzoCitta());
  712.             $this->setIndirizzoProvincia($document->getIndirizzoProvincia());
  713.             $this->setIndirizzoExtra($document->getIndirizzoExtra());
  714.             $this->setPaese($document->getPaese());
  715.             $this->setLingua($document->getLingua());
  716.             $this->setPiva($document->getPiva());
  717.             $this->setCf($document->getCf());
  718.             $this->setNumero($document->getNumero());
  719.             $this->setData($document->getData());
  720.             $this->setProssimaScadenza($document->getProssimaScadenza());
  721.             $this->setValuta($document->getValuta());
  722.             $this->setValutaCambio($document->getValutaCambio());
  723.             $this->setPrezziIvati($document->isPrezziIvati());
  724.             $this->setImportoNetto($document->getImportoNetto());
  725.             $this->setImportoIva($document->getImportoIva());
  726.             $this->setImportoTotale($document->getImportoTotale());
  727.             $this->setRivalsa($document->getRivalsa());
  728.             $this->setImportoRivalsa($document->getImportoRivalsa());
  729.             $this->setCassa($document->getCassa());
  730.             $this->setImportoCassa($document->getImportoCassa());
  731.             $this->setRitAcconto($document->getRitAcconto());
  732.             $this->setImponibileRitenuta($document->getImponibileRitenuta());
  733.             $this->setImportoRitAcconto($document->getImportoRitAcconto());
  734.             $this->setRitAltra($document->getRitAltra());
  735.             $this->setImportoRitAltra($document->getImportoRitAltra());
  736.             $this->setMarcaBollo($document->getMarcaBollo());
  737.             $this->setOggettoVisibile($document->getOggettoVisibile());
  738.             $this->setOggettoInterno($document->getOggettoInterno());
  739.             $this->setCentroRicavo($document->getCentroRicavo());
  740.             $this->setCentroCosto($document->getCentroCosto());
  741.             $this->setNote($document->getNote());
  742.             // TODO: check why not isNascondiScadenza()
  743.             $this->setNascondiScadenza($document->getNascondiScadenza());
  744.             $this->setDdt($document->getDdt());
  745.             $this->setFtacc($document->getFtacc());
  746.             $this->setIdTemplate($document->getIdTemplate());
  747.             $this->setDdtIdTemplate($document->getDdtIdTemplate());
  748.             $this->setFtaccIdTemplate($document->getFtaccIdTemplate());
  749.             $this->setMostraInfoPagamento($document->getMostraInfoPagamento());
  750.             $this->setMetodoPagamento($document->getMetodoPagamento());
  751. // TODO: fix metodi list
  752. //            $this->setMetodoTitiloN($document->getMetodoTitoloN());
  753. //            $this->setMetodoDescN($document->getMetodoDescN());
  754.             $this->setMostraTotali($document->getMostraTotali());
  755.             $this->setMostraBottonePaypal($document->getMostraBottonePaypal());
  756.             $this->setMostraBottoneTsPay($document->getMostraBottoneTsPay());
  757.             $this->setMostraBottoneBonifico($document->getMostraBottoneBonifico());
  758.             $this->setMostraBottoneNotifica($document->getMostraBottoneNotifica());
  759.             foreach($document->getListaArticoli() as $articolo) {
  760.                 $this->addArticolo(new DocumentoArticolo($articolo));
  761.             }
  762.             foreach($document->getListaPagamenti() as $pagamento) {
  763.                 $this->addPagamento(new DocumentoPagamento($pagamento));
  764.             }
  765.         }
  766.     }
  767.     /**
  768.      * @return string
  769.      */
  770.     public function getId(): string
  771.     {
  772.         return $this->id;
  773.     }
  774.     /**
  775.      * @param string $id
  776.      * @return DocumentoDettagliato
  777.      */
  778.     public function setId(string $id): DocumentoDettagliato
  779.     {
  780.         $this->id $id;
  781.         return $this;
  782.     }
  783.     /**
  784.      * @return string
  785.      */
  786.     public function getToken(): string
  787.     {
  788.         return $this->token;
  789.     }
  790.     /**
  791.      * @param string $token
  792.      * @return DocumentoDettagliato
  793.      */
  794.     public function setToken(string $token): DocumentoDettagliato
  795.     {
  796.         $this->token $token;
  797.         return $this;
  798.     }
  799.     /**
  800.      * @return string
  801.      */
  802.     public function getTipo(): string
  803.     {
  804.         switch($this->tipo) {
  805.             case 'fatture':
  806.                 return 'fattura';
  807.             case 'ordini':
  808.                 return 'ordine';
  809.             default:
  810.                 return $this->tipo;
  811.         }
  812.     }
  813.     /**
  814.      * @param string $tipo
  815.      * @return DocumentoDettagliato
  816.      */
  817.     public function setTipo(string $tipo): DocumentoDettagliato
  818.     {
  819.         $this->tipo $tipo;
  820.         return $this;
  821.     }
  822.     /**
  823.      * @return string|null
  824.      */
  825.     public function getIdCliente(): ?string
  826.     {
  827.         return $this->id_cliente;
  828.     }
  829.     /**
  830.      * @param string|null $id_cliente
  831.      * @return DocumentoDettagliato
  832.      */
  833.     public function setIdCliente(?string $id_cliente): DocumentoDettagliato
  834.     {
  835.         $this->id_cliente $id_cliente;
  836.         return $this;
  837.     }
  838.     /**
  839.      * @return string|null
  840.      */
  841.     public function getIdFornitore(): ?string
  842.     {
  843.         return $this->id_fornitore;
  844.     }
  845.     /**
  846.      * @param string|null $id_fornitore
  847.      * @return DocumentoDettagliato
  848.      */
  849.     public function setIdFornitore(?string $id_fornitore): DocumentoDettagliato
  850.     {
  851.         $this->id_fornitore $id_fornitore;
  852.         return $this;
  853.     }
  854.     /**
  855.      * @return string
  856.      */
  857.     public function getNome(): string
  858.     {
  859.         return $this->nome;
  860.     }
  861.     /**
  862.      * @param string $nome
  863.      * @return DocumentoDettagliato
  864.      */
  865.     public function setNome(string $nome): DocumentoDettagliato
  866.     {
  867.         $this->nome $nome;
  868.         return $this;
  869.     }
  870.     /**
  871.      * @return string
  872.      */
  873.     public function getIndirizzoVia(): string
  874.     {
  875.         return $this->indirizzo_via;
  876.     }
  877.     /**
  878.      * @param string $indirizzo_via
  879.      * @return DocumentoDettagliato
  880.      */
  881.     public function setIndirizzoVia(string $indirizzo_via): DocumentoDettagliato
  882.     {
  883.         $this->indirizzo_via $indirizzo_via;
  884.         return $this;
  885.     }
  886.     /**
  887.      * @return string
  888.      */
  889.     public function getIndirizzoCap(): string
  890.     {
  891.         return $this->indirizzo_cap;
  892.     }
  893.     /**
  894.      * @param string $indirizzo_cap
  895.      * @return DocumentoDettagliato
  896.      */
  897.     public function setIndirizzoCap(string $indirizzo_cap): DocumentoDettagliato
  898.     {
  899.         $this->indirizzo_cap $indirizzo_cap;
  900.         return $this;
  901.     }
  902.     /**
  903.      * @return string
  904.      */
  905.     public function getIndirizzoCitta(): string
  906.     {
  907.         return $this->indirizzo_citta;
  908.     }
  909.     /**
  910.      * @param string $indirizzo_citta
  911.      * @return DocumentoDettagliato
  912.      */
  913.     public function setIndirizzoCitta(string $indirizzo_citta): DocumentoDettagliato
  914.     {
  915.         $this->indirizzo_citta $indirizzo_citta;
  916.         return $this;
  917.     }
  918.     /**
  919.      * @return string
  920.      */
  921.     public function getIndirizzoProvincia(): string
  922.     {
  923.         return $this->indirizzo_provincia;
  924.     }
  925.     /**
  926.      * @param string $indirizzo_provincia
  927.      * @return DocumentoDettagliato
  928.      */
  929.     public function setIndirizzoProvincia(string $indirizzo_provincia): DocumentoDettagliato
  930.     {
  931.         $this->indirizzo_provincia $indirizzo_provincia;
  932.         return $this;
  933.     }
  934.     /**
  935.      * @return string|null
  936.      */
  937.     public function getIndirizzoExtra(): ?string
  938.     {
  939.         return $this->indirizzo_extra;
  940.     }
  941.     /**
  942.      * @param string|null $indirizzo_extra
  943.      * @return DocumentoDettagliato
  944.      */
  945.     public function setIndirizzoExtra(?string $indirizzo_extra): DocumentoDettagliato
  946.     {
  947.         $this->indirizzo_extra $indirizzo_extra;
  948.         return $this;
  949.     }
  950.     /**
  951.      * @return string
  952.      */
  953.     public function getPaese(): string
  954.     {
  955.         return $this->paese;
  956.     }
  957.     /**
  958.      * @param string $paese
  959.      * @return DocumentoDettagliato
  960.      */
  961.     public function setPaese(string $paese): DocumentoDettagliato
  962.     {
  963.         $this->paese $paese;
  964.         return $this;
  965.     }
  966.     /**
  967.      * @return string|null
  968.      */
  969.     public function getLingua(): ?string
  970.     {
  971.         return $this->lingua;
  972.     }
  973.     /**
  974.      * @param string|null $lingua
  975.      * @return DocumentoDettagliato
  976.      */
  977.     public function setLingua(?string $lingua): DocumentoDettagliato
  978.     {
  979.         $this->lingua $lingua;
  980.         return $this;
  981.     }
  982.     /**
  983.      * @return string
  984.      */
  985.     public function getPiva(): string
  986.     {
  987.         return $this->piva;
  988.     }
  989.     /**
  990.      * @param string $piva
  991.      * @return DocumentoDettagliato
  992.      */
  993.     public function setPiva(string $piva): DocumentoDettagliato
  994.     {
  995.         $this->piva $piva;
  996.         return $this;
  997.     }
  998.     /**
  999.      * @return string
  1000.      */
  1001.     public function getCf(): string
  1002.     {
  1003.         return $this->cf;
  1004.     }
  1005.     /**
  1006.      * @param string $cf
  1007.      * @return DocumentoDettagliato
  1008.      */
  1009.     public function setCf(string $cf): DocumentoDettagliato
  1010.     {
  1011.         $this->cf $cf;
  1012.         return $this;
  1013.     }
  1014.     /**
  1015.      * @return string
  1016.      */
  1017.     public function getNumero(): string
  1018.     {
  1019.         return $this->numero;
  1020.     }
  1021.     /**
  1022.      * @param string $numero
  1023.      * @return DocumentoDettagliato
  1024.      */
  1025.     public function setNumero(string $numero): DocumentoDettagliato
  1026.     {
  1027.         $this->numero $numero;
  1028.         return $this;
  1029.     }
  1030.     /**
  1031.      * @return \DateTime
  1032.      */
  1033.     public function getData(): \DateTime
  1034.     {
  1035.         return $this->data;
  1036.     }
  1037.     /**
  1038.      * @param \DateTime $data
  1039.      * @return DocumentoDettagliato
  1040.      */
  1041.     public function setData(\DateTime $data): DocumentoDettagliato
  1042.     {
  1043.         $this->data $data;
  1044.         return $this;
  1045.     }
  1046.     /**
  1047.      * @return \DateTime|null
  1048.      */
  1049.     public function getProssimaScadenza(): ?\DateTime
  1050.     {
  1051.         return $this->prossima_scadenza;
  1052.     }
  1053.     /**
  1054.      * @param \DateTime|null $prossima_scadenza
  1055.      * @return DocumentoDettagliato
  1056.      */
  1057.     public function setProssimaScadenza(?\DateTime $prossima_scadenza): DocumentoDettagliato
  1058.     {
  1059.         $this->prossima_scadenza $prossima_scadenza;
  1060.         return $this;
  1061.     }
  1062.     /**
  1063.      * @return string
  1064.      */
  1065.     public function getValuta(): string
  1066.     {
  1067.         return $this->valuta;
  1068.     }
  1069.     /**
  1070.      * @param string $valuta
  1071.      * @return DocumentoDettagliato
  1072.      */
  1073.     public function setValuta(string $valuta): DocumentoDettagliato
  1074.     {
  1075.         $this->valuta $valuta;
  1076.         return $this;
  1077.     }
  1078.     /**
  1079.      * @return float
  1080.      */
  1081.     public function getValutaCambio(): float
  1082.     {
  1083.         return $this->valuta_cambio;
  1084.     }
  1085.     /**
  1086.      * @param float $valuta_cambio
  1087.      * @return DocumentoDettagliato
  1088.      */
  1089.     public function setValutaCambio(float $valuta_cambio): DocumentoDettagliato
  1090.     {
  1091.         $this->valuta_cambio $valuta_cambio;
  1092.         return $this;
  1093.     }
  1094.     /**
  1095.      * @return bool
  1096.      */
  1097.     public function isPrezziIvati(): bool
  1098.     {
  1099.         return $this->prezzi_ivati;
  1100.     }
  1101.     /**
  1102.      * @param bool $prezzi_ivati
  1103.      * @return DocumentoDettagliato
  1104.      */
  1105.     public function setPrezziIvati(bool $prezzi_ivati): DocumentoDettagliato
  1106.     {
  1107.         $this->prezzi_ivati $prezzi_ivati;
  1108.         return $this;
  1109.     }
  1110.     /**
  1111.      * @return float
  1112.      */
  1113.     public function getImportoNetto(): float
  1114.     {
  1115.         return $this->importo_netto;
  1116.     }
  1117.     /**
  1118.      * @param float $importo_netto
  1119.      * @return DocumentoDettagliato
  1120.      */
  1121.     public function setImportoNetto(float $importo_netto): DocumentoDettagliato
  1122.     {
  1123.         $this->importo_netto $importo_netto;
  1124.         return $this;
  1125.     }
  1126.     /**
  1127.      * @return float
  1128.      */
  1129.     public function getImportoIva(): float
  1130.     {
  1131.         return $this->importo_iva;
  1132.     }
  1133.     /**
  1134.      * @param float $importo_iva
  1135.      * @return DocumentoDettagliato
  1136.      */
  1137.     public function setImportoIva(float $importo_iva): DocumentoDettagliato
  1138.     {
  1139.         $this->importo_iva $importo_iva;
  1140.         return $this;
  1141.     }
  1142.     /**
  1143.      * @return float
  1144.      */
  1145.     public function getImportoTotale(): float
  1146.     {
  1147.         return $this->importo_totale;
  1148.     }
  1149.     /**
  1150.      * @param float $importo_totale
  1151.      * @return DocumentoDettagliato
  1152.      */
  1153.     public function setImportoTotale(float $importo_totale): DocumentoDettagliato
  1154.     {
  1155.         $this->importo_totale $importo_totale;
  1156.         return $this;
  1157.     }
  1158.     /**
  1159.      * @return float|null
  1160.      */
  1161.     public function getRivalsa(): ?float
  1162.     {
  1163.         return $this->rivalsa;
  1164.     }
  1165.     /**
  1166.      * @param float|null $rivalsa
  1167.      * @return DocumentoDettagliato
  1168.      */
  1169.     public function setRivalsa(?float $rivalsa): DocumentoDettagliato
  1170.     {
  1171.         $this->rivalsa $rivalsa;
  1172.         return $this;
  1173.     }
  1174.     /**
  1175.      * @return float|null
  1176.      */
  1177.     public function getImportoRivalsa(): ?float
  1178.     {
  1179.         return $this->importo_rivalsa;
  1180.     }
  1181.     /**
  1182.      * @param float|null $importo_rivalsa
  1183.      * @return DocumentoDettagliato
  1184.      */
  1185.     public function setImportoRivalsa(?float $importo_rivalsa): DocumentoDettagliato
  1186.     {
  1187.         $this->importo_rivalsa $importo_rivalsa;
  1188.         return $this;
  1189.     }
  1190.     /**
  1191.      * @return float|null
  1192.      */
  1193.     public function getCassa(): ?float
  1194.     {
  1195.         return $this->cassa;
  1196.     }
  1197.     /**
  1198.      * @param float|null $cassa
  1199.      * @return DocumentoDettagliato
  1200.      */
  1201.     public function setCassa(?float $cassa): DocumentoDettagliato
  1202.     {
  1203.         $this->cassa $cassa;
  1204.         return $this;
  1205.     }
  1206.     /**
  1207.      * @return float|null
  1208.      */
  1209.     public function getImportoCassa(): ?float
  1210.     {
  1211.         return $this->importo_cassa;
  1212.     }
  1213.     /**
  1214.      * @param float|null $importo_cassa
  1215.      * @return DocumentoDettagliato
  1216.      */
  1217.     public function setImportoCassa(?float $importo_cassa): DocumentoDettagliato
  1218.     {
  1219.         $this->importo_cassa $importo_cassa;
  1220.         return $this;
  1221.     }
  1222.     /**
  1223.      * @return float|null
  1224.      */
  1225.     public function getRitAcconto(): ?float
  1226.     {
  1227.         return $this->rit_acconto;
  1228.     }
  1229.     /**
  1230.      * @param float|null $rit_acconto
  1231.      * @return DocumentoDettagliato
  1232.      */
  1233.     public function setRitAcconto(?float $rit_acconto): DocumentoDettagliato
  1234.     {
  1235.         $this->rit_acconto $rit_acconto;
  1236.         return $this;
  1237.     }
  1238.     /**
  1239.      * @return float|null
  1240.      */
  1241.     public function getImponibileRitenuta(): ?float
  1242.     {
  1243.         return $this->imponibile_ritenuta;
  1244.     }
  1245.     /**
  1246.      * @param float|null $imponibile_ritenuta
  1247.      * @return DocumentoDettagliato
  1248.      */
  1249.     public function setImponibileRitenuta(?float $imponibile_ritenuta): DocumentoDettagliato
  1250.     {
  1251.         $this->imponibile_ritenuta $imponibile_ritenuta;
  1252.         return $this;
  1253.     }
  1254.     /**
  1255.      * @return float|null
  1256.      */
  1257.     public function getImportoRitAcconto(): ?float
  1258.     {
  1259.         return $this->importo_rit_acconto;
  1260.     }
  1261.     /**
  1262.      * @param float|null $importo_rit_acconto
  1263.      * @return DocumentoDettagliato
  1264.      */
  1265.     public function setImportoRitAcconto(?float $importo_rit_acconto): DocumentoDettagliato
  1266.     {
  1267.         $this->importo_rit_acconto $importo_rit_acconto;
  1268.         return $this;
  1269.     }
  1270.     /**
  1271.      * @return float|null
  1272.      */
  1273.     public function getRitAltra(): ?float
  1274.     {
  1275.         return $this->rit_altra;
  1276.     }
  1277.     /**
  1278.      * @param float|null $rit_altra
  1279.      * @return DocumentoDettagliato
  1280.      */
  1281.     public function setRitAltra(?float $rit_altra): DocumentoDettagliato
  1282.     {
  1283.         $this->rit_altra $rit_altra;
  1284.         return $this;
  1285.     }
  1286.     /**
  1287.      * @return float|null
  1288.      */
  1289.     public function getImportoRitAltra(): ?float
  1290.     {
  1291.         return $this->importo_rit_altra;
  1292.     }
  1293.     /**
  1294.      * @param float|null $importo_rit_altra
  1295.      * @return DocumentoDettagliato
  1296.      */
  1297.     public function setImportoRitAltra(?float $importo_rit_altra): DocumentoDettagliato
  1298.     {
  1299.         $this->importo_rit_altra $importo_rit_altra;
  1300.         return $this;
  1301.     }
  1302.     /**
  1303.      * @return float|null
  1304.      */
  1305.     public function getMarcaBollo(): ?float
  1306.     {
  1307.         return $this->marca_bollo;
  1308.     }
  1309.     /**
  1310.      * @param float|null $marca_bollo
  1311.      * @return DocumentoDettagliato
  1312.      */
  1313.     public function setMarcaBollo(?float $marca_bollo): DocumentoDettagliato
  1314.     {
  1315.         $this->marca_bollo $marca_bollo;
  1316.         return $this;
  1317.     }
  1318.     /**
  1319.      * @return string|null
  1320.      */
  1321.     public function getOggettoVisibile(): ?string
  1322.     {
  1323.         return $this->oggetto_visibile;
  1324.     }
  1325.     /**
  1326.      * @param string|null $oggetto_visibile
  1327.      * @return DocumentoDettagliato
  1328.      */
  1329.     public function setOggettoVisibile(?string $oggetto_visibile): DocumentoDettagliato
  1330.     {
  1331.         $this->oggetto_visibile $oggetto_visibile;
  1332.         return $this;
  1333.     }
  1334.     /**
  1335.      * @return string|null
  1336.      */
  1337.     public function getOggettoInterno(): ?string
  1338.     {
  1339.         return $this->oggetto_interno;
  1340.     }
  1341.     /**
  1342.      * @param string|null $oggetto_interno
  1343.      * @return DocumentoDettagliato
  1344.      */
  1345.     public function setOggettoInterno(?string $oggetto_interno): DocumentoDettagliato
  1346.     {
  1347.         $this->oggetto_interno $oggetto_interno;
  1348.         return $this;
  1349.     }
  1350.     /**
  1351.      * @return string|null
  1352.      */
  1353.     public function getCentroRicavo(): ?string
  1354.     {
  1355.         return $this->centro_ricavo;
  1356.     }
  1357.     /**
  1358.      * @param string|null $centro_ricavo
  1359.      * @return DocumentoDettagliato
  1360.      */
  1361.     public function setCentroRicavo(?string $centro_ricavo): DocumentoDettagliato
  1362.     {
  1363.         $this->centro_ricavo $centro_ricavo;
  1364.         return $this;
  1365.     }
  1366.     /**
  1367.      * @return string|null
  1368.      */
  1369.     public function getCentroCosto(): ?string
  1370.     {
  1371.         return $this->centro_costo;
  1372.     }
  1373.     /**
  1374.      * @param string|null $centro_costo
  1375.      * @return DocumentoDettagliato
  1376.      */
  1377.     public function setCentroCosto(?string $centro_costo): DocumentoDettagliato
  1378.     {
  1379.         $this->centro_costo $centro_costo;
  1380.         return $this;
  1381.     }
  1382.     /**
  1383.      * @return string|null
  1384.      */
  1385.     public function getNote(): ?string
  1386.     {
  1387.         return $this->note;
  1388.     }
  1389.     /**
  1390.      * @param string|null $note
  1391.      * @return DocumentoDettagliato
  1392.      */
  1393.     public function setNote(?string $note): DocumentoDettagliato
  1394.     {
  1395.         $this->note $note;
  1396.         return $this;
  1397.     }
  1398.     /**
  1399.      * @return bool|null
  1400.      */
  1401.     public function getNascondiScadenza(): ?bool
  1402.     {
  1403.         return $this->nascondi_scadenza;
  1404.     }
  1405.     /**
  1406.      * @param bool|null $nascondi_scadenza
  1407.      * @return DocumentoDettagliato
  1408.      */
  1409.     public function setNascondiScadenza(?bool $nascondi_scadenza): DocumentoDettagliato
  1410.     {
  1411.         $this->nascondi_scadenza $nascondi_scadenza;
  1412.         return $this;
  1413.     }
  1414.     /**
  1415.      * @return bool|null
  1416.      */
  1417.     public function getDdt(): ?bool
  1418.     {
  1419.         return $this->ddt;
  1420.     }
  1421.     /**
  1422.      * @param bool|null $ddt
  1423.      * @return DocumentoDettagliato
  1424.      */
  1425.     public function setDdt(?bool $ddt): DocumentoDettagliato
  1426.     {
  1427.         $this->ddt $ddt;
  1428.         return $this;
  1429.     }
  1430.     /**
  1431.      * @return bool|null
  1432.      */
  1433.     public function getFtacc(): ?bool
  1434.     {
  1435.         return $this->ftacc;
  1436.     }
  1437.     /**
  1438.      * @param bool|null $ftacc
  1439.      * @return DocumentoDettagliato
  1440.      */
  1441.     public function setFtacc(?bool $ftacc): DocumentoDettagliato
  1442.     {
  1443.         $this->ftacc $ftacc;
  1444.         return $this;
  1445.     }
  1446.     /**
  1447.      * @return string|null
  1448.      */
  1449.     public function getIdTemplate(): ?string
  1450.     {
  1451.         return $this->id_template;
  1452.     }
  1453.     /**
  1454.      * @param string|null $id_template
  1455.      * @return DocumentoDettagliato
  1456.      */
  1457.     public function setIdTemplate(?string $id_template): DocumentoDettagliato
  1458.     {
  1459.         $this->id_template $id_template;
  1460.         return $this;
  1461.     }
  1462.     /**
  1463.      * @return string|null
  1464.      */
  1465.     public function getDdtIdTemplate(): ?string
  1466.     {
  1467.         return $this->ddt_id_template;
  1468.     }
  1469.     /**
  1470.      * @param string|null $ddt_id_template
  1471.      * @return DocumentoDettagliato
  1472.      */
  1473.     public function setDdtIdTemplate(?string $ddt_id_template): DocumentoDettagliato
  1474.     {
  1475.         $this->ddt_id_template $ddt_id_template;
  1476.         return $this;
  1477.     }
  1478.     /**
  1479.      * @return string|null
  1480.      */
  1481.     public function getFtaccIdTemplate(): ?string
  1482.     {
  1483.         return $this->ftacc_id_template;
  1484.     }
  1485.     /**
  1486.      * @param string|null $ftacc_id_template
  1487.      * @return DocumentoDettagliato
  1488.      */
  1489.     public function setFtaccIdTemplate(?string $ftacc_id_template): DocumentoDettagliato
  1490.     {
  1491.         $this->ftacc_id_template $ftacc_id_template;
  1492.         return $this;
  1493.     }
  1494.     /**
  1495.      * @return bool|null
  1496.      */
  1497.     public function getMostraInfoPagamento(): ?bool
  1498.     {
  1499.         return $this->mostra_info_pagamento;
  1500.     }
  1501.     /**
  1502.      * @param bool|null $mostra_info_pagamento
  1503.      * @return DocumentoDettagliato
  1504.      */
  1505.     public function setMostraInfoPagamento(?bool $mostra_info_pagamento): DocumentoDettagliato
  1506.     {
  1507.         $this->mostra_info_pagamento $mostra_info_pagamento;
  1508.         return $this;
  1509.     }
  1510.     /**
  1511.      * @return string|null
  1512.      */
  1513.     public function getMetodoPagamento(): ?string
  1514.     {
  1515.         return $this->metodo_pagamento;
  1516.     }
  1517.     /**
  1518.      * @param string|null $metodo_pagamento
  1519.      * @return DocumentoDettagliato
  1520.      */
  1521.     public function setMetodoPagamento(?string $metodo_pagamento): DocumentoDettagliato
  1522.     {
  1523.         $this->metodo_pagamento $metodo_pagamento;
  1524.         return $this;
  1525.     }
  1526.     /**
  1527.      * @return string|null
  1528.      */
  1529.     public function getMetodoTitiloN(): ?string
  1530.     {
  1531.         return $this->metodo_titiloN;
  1532.     }
  1533.     /**
  1534.      * @param string|null $metodo_titiloN
  1535.      * @return DocumentoDettagliato
  1536.      */
  1537.     public function setMetodoTitiloN(?string $metodo_titiloN): DocumentoDettagliato
  1538.     {
  1539.         $this->metodo_titiloN $metodo_titiloN;
  1540.         return $this;
  1541.     }
  1542.     /**
  1543.      * @return string|null
  1544.      */
  1545.     public function getMetodoDescN(): ?string
  1546.     {
  1547.         return $this->metodo_descN;
  1548.     }
  1549.     /**
  1550.      * @param string|null $metodo_descN
  1551.      * @return DocumentoDettagliato
  1552.      */
  1553.     public function setMetodoDescN(?string $metodo_descN): DocumentoDettagliato
  1554.     {
  1555.         $this->metodo_descN $metodo_descN;
  1556.         return $this;
  1557.     }
  1558.     /**
  1559.      * @return bool|null
  1560.      */
  1561.     public function getMostraTotali(): ?bool
  1562.     {
  1563.         return $this->mostra_totali;
  1564.     }
  1565.     /**
  1566.      * @param bool|null $mostra_totali
  1567.      * @return DocumentoDettagliato
  1568.      */
  1569.     public function setMostraTotali(?bool $mostra_totali): DocumentoDettagliato
  1570.     {
  1571.         $this->mostra_totali $mostra_totali;
  1572.         return $this;
  1573.     }
  1574.     /**
  1575.      * @return bool|null
  1576.      */
  1577.     public function getMostraBottonePaypal(): ?bool
  1578.     {
  1579.         return $this->mostra_bottone_paypal;
  1580.     }
  1581.     /**
  1582.      * @param bool|null $mostra_bottone_paypal
  1583.      * @return DocumentoDettagliato
  1584.      */
  1585.     public function setMostraBottonePaypal(?bool $mostra_bottone_paypal): DocumentoDettagliato
  1586.     {
  1587.         $this->mostra_bottone_paypal $mostra_bottone_paypal;
  1588.         return $this;
  1589.     }
  1590.     /**
  1591.      * @return bool|null
  1592.      */
  1593.     public function getMostraBottoneTsPay(): ?bool
  1594.     {
  1595.         return $this->mostra_bottone_ts_pay;
  1596.     }
  1597.     /**
  1598.      * @param bool|null $mostra_bottone_ts_pay
  1599.      * @return DocumentoDettagliato
  1600.      */
  1601.     public function setMostraBottoneTsPay(?bool $mostra_bottone_ts_pay): DocumentoDettagliato
  1602.     {
  1603.         $this->mostra_bottone_ts_pay $mostra_bottone_ts_pay;
  1604.         return $this;
  1605.     }
  1606.     /**
  1607.      * @return bool|null
  1608.      */
  1609.     public function getMostraBottoneBonifico(): ?bool
  1610.     {
  1611.         return $this->mostra_bottone_bonifico;
  1612.     }
  1613.     /**
  1614.      * @param bool|null $mostra_bottone_bonifico
  1615.      * @return DocumentoDettagliato
  1616.      */
  1617.     public function setMostraBottoneBonifico(?bool $mostra_bottone_bonifico): DocumentoDettagliato
  1618.     {
  1619.         $this->mostra_bottone_bonifico $mostra_bottone_bonifico;
  1620.         return $this;
  1621.     }
  1622.     /**
  1623.      * @return bool|null
  1624.      */
  1625.     public function getMostraBottoneNotifica(): ?bool
  1626.     {
  1627.         return $this->mostra_bottone_notifica;
  1628.     }
  1629.     /**
  1630.      * @param bool|null $mostra_bottone_notifica
  1631.      * @return DocumentoDettagliato
  1632.      */
  1633.     public function setMostraBottoneNotifica(?bool $mostra_bottone_notifica): DocumentoDettagliato
  1634.     {
  1635.         $this->mostra_bottone_notifica $mostra_bottone_notifica;
  1636.         return $this;
  1637.     }
  1638.     /**
  1639.      * @return FattureInCloudDocumentoArticolo[]|null
  1640.      */
  1641.     public function getListaArticoli(): ?ArrayCollection
  1642.     {
  1643.         return $this->lista_articoli;
  1644.     }
  1645.     /**
  1646.      * @param FattureInCloudDocumentoArticolo[]|null $lista_articoli
  1647.      * @return DocumentoDettagliato
  1648.      */
  1649.     public function setListaArticoli(?ArrayCollection $lista_articoli): DocumentoDettagliato
  1650.     {
  1651.         $this->lista_articoli $lista_articoli;
  1652.         return $this;
  1653.     }
  1654.     /**
  1655.      * @return FattureinCloudDocumentoPagamanto[]|null
  1656.      */
  1657.     public function getListaPagamenti(): ?ArrayCollection
  1658.     {
  1659.         return $this->lista_pagamenti;
  1660.     }
  1661.     /**
  1662.      * @param FattureinCloudDocumentoPagamanto[]|null $lista_pagamenti
  1663.      * @return DocumentoDettagliato
  1664.      */
  1665.     public function setListaPagamenti(?ArrayCollection $lista_pagamenti): DocumentoDettagliato
  1666.     {
  1667.         $this->lista_pagamenti $lista_pagamenti;
  1668.         return $this;
  1669.     }
  1670.     /**
  1671.      * @return string|null
  1672.      */
  1673.     public function getDdtNumero(): ?string
  1674.     {
  1675.         return $this->ddt_numero;
  1676.     }
  1677.     /**
  1678.      * @param string|null $ddt_numero
  1679.      * @return DocumentoDettagliato
  1680.      */
  1681.     public function setDdtNumero(?string $ddt_numero): DocumentoDettagliato
  1682.     {
  1683.         $this->ddt_numero $ddt_numero;
  1684.         return $this;
  1685.     }
  1686.     /**
  1687.      * @return \DateTime|null
  1688.      */
  1689.     public function getDdtData(): ?\DateTime
  1690.     {
  1691.         return $this->ddt_data;
  1692.     }
  1693.     /**
  1694.      * @param \DateTime|null $ddt_data
  1695.      * @return DocumentoDettagliato
  1696.      */
  1697.     public function setDdtData(?\DateTime $ddt_data): DocumentoDettagliato
  1698.     {
  1699.         $this->ddt_data $ddt_data;
  1700.         return $this;
  1701.     }
  1702.     /**
  1703.      * @return string|null
  1704.      */
  1705.     public function getDdtColli(): ?string
  1706.     {
  1707.         return $this->ddt_colli;
  1708.     }
  1709.     /**
  1710.      * @param string|null $ddt_colli
  1711.      * @return DocumentoDettagliato
  1712.      */
  1713.     public function setDdtColli(?string $ddt_colli): DocumentoDettagliato
  1714.     {
  1715.         $this->ddt_colli $ddt_colli;
  1716.         return $this;
  1717.     }
  1718.     /**
  1719.      * @return string|null
  1720.      */
  1721.     public function getDdtPeso(): ?string
  1722.     {
  1723.         return $this->ddt_peso;
  1724.     }
  1725.     /**
  1726.      * @param string|null $ddt_peso
  1727.      * @return DocumentoDettagliato
  1728.      */
  1729.     public function setDdtPeso(?string $ddt_peso): DocumentoDettagliato
  1730.     {
  1731.         $this->ddt_peso $ddt_peso;
  1732.         return $this;
  1733.     }
  1734.     /**
  1735.      * @return string|null
  1736.      */
  1737.     public function getDdtCausale(): ?string
  1738.     {
  1739.         return $this->ddt_causale;
  1740.     }
  1741.     /**
  1742.      * @param string|null $ddt_causale
  1743.      * @return DocumentoDettagliato
  1744.      */
  1745.     public function setDdtCausale(?string $ddt_causale): DocumentoDettagliato
  1746.     {
  1747.         $this->ddt_causale $ddt_causale;
  1748.         return $this;
  1749.     }
  1750.     /**
  1751.      * @return string|null
  1752.      */
  1753.     public function getDdtLuogo(): ?string
  1754.     {
  1755.         return $this->ddt_luogo;
  1756.     }
  1757.     /**
  1758.      * @param string|null $ddt_luogo
  1759.      * @return DocumentoDettagliato
  1760.      */
  1761.     public function setDdtLuogo(?string $ddt_luogo): DocumentoDettagliato
  1762.     {
  1763.         $this->ddt_luogo $ddt_luogo;
  1764.         return $this;
  1765.     }
  1766.     /**
  1767.      * @return string|null
  1768.      */
  1769.     public function getDdtTrasportatore(): ?string
  1770.     {
  1771.         return $this->ddt_trasportatore;
  1772.     }
  1773.     /**
  1774.      * @param string|null $ddt_trasportatore
  1775.      * @return DocumentoDettagliato
  1776.      */
  1777.     public function setDdtTrasportatore(?string $ddt_trasportatore): DocumentoDettagliato
  1778.     {
  1779.         $this->ddt_trasportatore $ddt_trasportatore;
  1780.         return $this;
  1781.     }
  1782.     /**
  1783.      * @return string|null
  1784.      */
  1785.     public function getDdtAnnotazioni(): ?string
  1786.     {
  1787.         return $this->ddt_annotazioni;
  1788.     }
  1789.     /**
  1790.      * @param string|null $ddt_annotazioni
  1791.      * @return DocumentoDettagliato
  1792.      */
  1793.     public function setDdtAnnotazioni(?string $ddt_annotazioni): DocumentoDettagliato
  1794.     {
  1795.         $this->ddt_annotazioni $ddt_annotazioni;
  1796.         return $this;
  1797.     }
  1798.     /**
  1799.      * @return string|null
  1800.      */
  1801.     public function getLinkDoc(): ?string
  1802.     {
  1803.         return $this->link_doc;
  1804.     }
  1805.     /**
  1806.      * @param string|null $link_doc
  1807.      * @return DocumentoDettagliato
  1808.      */
  1809.     public function setLinkDoc(?string $link_doc): DocumentoDettagliato
  1810.     {
  1811.         $this->link_doc $link_doc;
  1812.         return $this;
  1813.     }
  1814.     /**
  1815.      * @return string|null
  1816.      */
  1817.     public function getLinkDdt(): ?string
  1818.     {
  1819.         return $this->link_ddt;
  1820.     }
  1821.     /**
  1822.      * @param string|null $link_ddt
  1823.      * @return DocumentoDettagliato
  1824.      */
  1825.     public function setLinkDdt(?string $link_ddt): DocumentoDettagliato
  1826.     {
  1827.         $this->link_ddt $link_ddt;
  1828.         return $this;
  1829.     }
  1830.     /**
  1831.      * @return string|null
  1832.      */
  1833.     public function getLinkFtacc(): ?string
  1834.     {
  1835.         return $this->link_ftacc;
  1836.     }
  1837.     /**
  1838.      * @param string|null $link_ftacc
  1839.      * @return DocumentoDettagliato
  1840.      */
  1841.     public function setLinkFtacc(?string $link_ftacc): DocumentoDettagliato
  1842.     {
  1843.         $this->link_ftacc $link_ftacc;
  1844.         return $this;
  1845.     }
  1846.     /**
  1847.      * @return string|null
  1848.      */
  1849.     public function getLinkAllegato(): ?string
  1850.     {
  1851.         return $this->link_allegato;
  1852.     }
  1853.     /**
  1854.      * @param string|null $link_allegato
  1855.      * @return DocumentoDettagliato
  1856.      */
  1857.     public function setLinkAllegato(?string $link_allegato): DocumentoDettagliato
  1858.     {
  1859.         $this->link_allegato $link_allegato;
  1860.         return $this;
  1861.     }
  1862.     /**
  1863.      * @return bool|null
  1864.      */
  1865.     public function getBloccato(): ?bool
  1866.     {
  1867.         return $this->bloccato;
  1868.     }
  1869.     /**
  1870.      * @param bool|null $bloccato
  1871.      * @return DocumentoDettagliato
  1872.      */
  1873.     public function setBloccato(?bool $bloccato): DocumentoDettagliato
  1874.     {
  1875.         $this->bloccato $bloccato;
  1876.         return $this;
  1877.     }
  1878.     /**
  1879.      * @return bool|null
  1880.      */
  1881.     public function getPA(): ?bool
  1882.     {
  1883.         return $this->PA;
  1884.     }
  1885.     /**
  1886.      * @param bool|null $PA
  1887.      * @return DocumentoDettagliato
  1888.      */
  1889.     public function setPA(?bool $PA): DocumentoDettagliato
  1890.     {
  1891.         $this->PA $PA;
  1892.         return $this;
  1893.     }
  1894.     /**
  1895.      * @return string|null
  1896.      */
  1897.     public function getPATipoCliente(): ?string
  1898.     {
  1899.         return $this->PA_tipo_cliente;
  1900.     }
  1901.     /**
  1902.      * @param string|null $PA_tipo_cliente
  1903.      * @return DocumentoDettagliato
  1904.      */
  1905.     public function setPATipoCliente(?string $PA_tipo_cliente): DocumentoDettagliato
  1906.     {
  1907.         $this->PA_tipo_cliente $PA_tipo_cliente;
  1908.         return $this;
  1909.     }
  1910.     /**
  1911.      * @return string|null
  1912.      */
  1913.     public function getPATipo(): ?string
  1914.     {
  1915.         return $this->PA_tipo;
  1916.     }
  1917.     /**
  1918.      * @param string|null $PA_tipo
  1919.      * @return DocumentoDettagliato
  1920.      */
  1921.     public function setPATipo(?string $PA_tipo): DocumentoDettagliato
  1922.     {
  1923.         $this->PA_tipo $PA_tipo;
  1924.         return $this;
  1925.     }
  1926.     /**
  1927.      * @return string|null
  1928.      */
  1929.     public function getPANumero(): ?string
  1930.     {
  1931.         return $this->PA_numero;
  1932.     }
  1933.     /**
  1934.      * @param string|null $PA_numero
  1935.      * @return DocumentoDettagliato
  1936.      */
  1937.     public function setPANumero(?string $PA_numero): DocumentoDettagliato
  1938.     {
  1939.         $this->PA_numero $PA_numero;
  1940.         return $this;
  1941.     }
  1942.     /**
  1943.      * @return \DateTime|null
  1944.      */
  1945.     public function getPAData(): ?\DateTime
  1946.     {
  1947.         return $this->PA_data;
  1948.     }
  1949.     /**
  1950.      * @param \DateTime|null $PA_data
  1951.      * @return DocumentoDettagliato
  1952.      */
  1953.     public function setPAData(?\DateTime $PA_data): DocumentoDettagliato
  1954.     {
  1955.         $this->PA_data $PA_data;
  1956.         return $this;
  1957.     }
  1958.     /**
  1959.      * @return string|null
  1960.      */
  1961.     public function getPACup(): ?string
  1962.     {
  1963.         return $this->PA_cup;
  1964.     }
  1965.     /**
  1966.      * @param string|null $PA_cup
  1967.      * @return DocumentoDettagliato
  1968.      */
  1969.     public function setPACup(?string $PA_cup): DocumentoDettagliato
  1970.     {
  1971.         $this->PA_cup $PA_cup;
  1972.         return $this;
  1973.     }
  1974.     /**
  1975.      * @return string|null
  1976.      */
  1977.     public function getPACig(): ?string
  1978.     {
  1979.         return $this->PA_cig;
  1980.     }
  1981.     /**
  1982.      * @param string|null $PA_cig
  1983.      * @return DocumentoDettagliato
  1984.      */
  1985.     public function setPACig(?string $PA_cig): DocumentoDettagliato
  1986.     {
  1987.         $this->PA_cig $PA_cig;
  1988.         return $this;
  1989.     }
  1990.     /**
  1991.      * @return string|null
  1992.      */
  1993.     public function getPACodice(): ?string
  1994.     {
  1995.         return $this->PA_codice;
  1996.     }
  1997.     /**
  1998.      * @param string|null $PA_codice
  1999.      * @return DocumentoDettagliato
  2000.      */
  2001.     public function setPACodice(?string $PA_codice): DocumentoDettagliato
  2002.     {
  2003.         $this->PA_codice $PA_codice;
  2004.         return $this;
  2005.     }
  2006.     /**
  2007.      * @return string|null
  2008.      */
  2009.     public function getPAEsigibilita(): ?string
  2010.     {
  2011.         return $this->PA_esigibilita;
  2012.     }
  2013.     /**
  2014.      * @param string|null $PA_esigibilita
  2015.      * @return DocumentoDettagliato
  2016.      */
  2017.     public function setPAEsigibilita(?string $PA_esigibilita): DocumentoDettagliato
  2018.     {
  2019.         $this->PA_esigibilita $PA_esigibilita;
  2020.         return $this;
  2021.     }
  2022.     /**
  2023.      * @return string|null
  2024.      */
  2025.     public function getPAModalitaPagamento(): ?string
  2026.     {
  2027.         return $this->PA_modalita_pagamento;
  2028.     }
  2029.     /**
  2030.      * @param string|null $PA_modalita_pagamento
  2031.      * @return DocumentoDettagliato
  2032.      */
  2033.     public function setPAModalitaPagamento(?string $PA_modalita_pagamento): DocumentoDettagliato
  2034.     {
  2035.         $this->PA_modalita_pagamento $PA_modalita_pagamento;
  2036.         return $this;
  2037.     }
  2038.     /**
  2039.      * @return string|null
  2040.      */
  2041.     public function getPAIstitutoCredito(): ?string
  2042.     {
  2043.         return $this->PA_istituto_credito;
  2044.     }
  2045.     /**
  2046.      * @param string|null $PA_istituto_credito
  2047.      * @return DocumentoDettagliato
  2048.      */
  2049.     public function setPAIstitutoCredito(?string $PA_istituto_credito): DocumentoDettagliato
  2050.     {
  2051.         $this->PA_istituto_credito $PA_istituto_credito;
  2052.         return $this;
  2053.     }
  2054.     /**
  2055.      * @return string|null
  2056.      */
  2057.     public function getPAIban(): ?string
  2058.     {
  2059.         return $this->PA_iban;
  2060.     }
  2061.     /**
  2062.      * @param string|null $PA_iban
  2063.      * @return DocumentoDettagliato
  2064.      */
  2065.     public function setPAIban(?string $PA_iban): DocumentoDettagliato
  2066.     {
  2067.         $this->PA_iban $PA_iban;
  2068.         return $this;
  2069.     }
  2070.     /**
  2071.      * @return string|null
  2072.      */
  2073.     public function getPABeneficiario(): ?string
  2074.     {
  2075.         return $this->PA_beneficiario;
  2076.     }
  2077.     /**
  2078.      * @param string|null $PA_beneficiario
  2079.      * @return DocumentoDettagliato
  2080.      */
  2081.     public function setPABeneficiario(?string $PA_beneficiario): DocumentoDettagliato
  2082.     {
  2083.         $this->PA_beneficiario $PA_beneficiario;
  2084.         return $this;
  2085.     }
  2086.     /**
  2087.      * @return bool|null
  2088.      */
  2089.     public function getPATs(): ?bool
  2090.     {
  2091.         return $this->PA_ts;
  2092.     }
  2093.     /**
  2094.      * @param bool|null $PA_ts
  2095.      * @return DocumentoDettagliato
  2096.      */
  2097.     public function setPATs(?bool $PA_ts): DocumentoDettagliato
  2098.     {
  2099.         $this->PA_ts $PA_ts;
  2100.         return $this;
  2101.     }
  2102.     /**
  2103.      * @return string|null
  2104.      */
  2105.     public function getPATsStato(): ?string
  2106.     {
  2107.         return $this->PA_ts_stato;
  2108.     }
  2109.     /**
  2110.      * @param string|null $PA_ts_stato
  2111.      * @return DocumentoDettagliato
  2112.      */
  2113.     public function setPATsStato(?string $PA_ts_stato): DocumentoDettagliato
  2114.     {
  2115.         $this->PA_ts_stato $PA_ts_stato;
  2116.         return $this;
  2117.     }
  2118.     /**
  2119.      * @return string|null
  2120.      */
  2121.     public function getSplitPayment(): ?string
  2122.     {
  2123.         return $this->split_payment;
  2124.     }
  2125.     /**
  2126.      * @param string|null $split_payment
  2127.      * @return DocumentoDettagliato
  2128.      */
  2129.     public function setSplitPayment(?string $split_payment): DocumentoDettagliato
  2130.     {
  2131.         $this->split_payment $split_payment;
  2132.         return $this;
  2133.     }
  2134.     public function addPagamento(DocumentoPagamento $pagamento): self
  2135.     {
  2136.         $pagamento->setDocumento($this);
  2137.         $this->lista_pagamenti->add($pagamento);
  2138.         return $this;
  2139.     }
  2140.     public function addArticolo(DocumentoArticolo $articolo): self
  2141.     {
  2142.         $articolo->setDocumento($this);
  2143.         $this->lista_articoli->add($articolo);
  2144.         return $this;
  2145.     }
  2146.     public function getNumberExplicit(): string
  2147.     {
  2148.         return $this->getTipo().' '.$this->getNumero().'/'.$this->getData()->format('Y');
  2149.     }
  2150. }