-
Notifications
You must be signed in to change notification settings - Fork 2
/
header.go
21 lines (18 loc) · 711 Bytes
/
header.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package fatturapa
import (
"github.com/invopop/gobl/bill"
)
// fatturaElettronicaHeader contains all data related to the parties involved
// in the document.
type fatturaElettronicaHeader struct {
DatiTrasmissione *datiTrasmissione `xml:"DatiTrasmissione,omitempty"`
Supplier *Supplier `xml:"CedentePrestatore,omitempty"`
Customer *Customer `xml:"CessionarioCommittente,omitempty"`
}
func newFatturaElettronicaHeader(inv *bill.Invoice, datiTrasmissione *datiTrasmissione) *fatturaElettronicaHeader {
return &fatturaElettronicaHeader{
DatiTrasmissione: datiTrasmissione,
Supplier: newSupplier(inv.Supplier),
Customer: newCustomer(inv.Customer),
}
}