Schema ID
https://gobl.org/draft-0/bill/invoice
Properties
| Title | Property | Type | Description |
|---|---|---|---|
| Tax Regime | $regime | tax.RegimeCode | Country code that identifies the tax regime applicable to the document. It determines which country-specific tax rules, normalizations, and validations are applied. It may be determined automatically via normalization of a supplier or issuer tax identity country code. |
| Addons | $addons | tax.AddonList | Keys identifying the tax addons that apply special normalization, scenarios, and validation rules to the document. |
| Tags | $tags | array of cbc.Key | Keys that identify specific tax scenarios or requirements that may change the contents of the document or imply a specific meaning. Converters may use tags to identify situations that do not have a specific extension; for example, self-billed or partial invoices are identified by their respective tags. |
| UUID | uuid | string | Universally Unique Identifier. |
| Type | type | cbc.Key | Type of invoice document. May be restricted by local tax regime requirements. |
| Series | series | cbc.Code | Identifies groups of invoices by date, business area, project, type of document, customer type, a combination of any, or other company specific data. If the output format does not support the series as a separate field, it will be prepended to the code with a dash (-) for separation. |
| Code | code | cbc.Code | Sequential identifier that uniquely identifies the invoice. May be left empty initially, but is required to sign the invoice. |
| Issue Date | issue_date | cal.Date | Date when the invoice was created and issued. Today’s date is used if none is set. There are often legal restrictions on how far back or in the future an invoice can be issued. |
| Issue Time | issue_time | cal.Time | Optional time of day when the invoice was issued. Some regions and formats may require this field; otherwise it can be left nil. |
| Operation Date | op_date | cal.Date | Date when the operation defined by the invoice became effective. |
| Value Date | value_date | cal.Date | When the taxes of the document become accountable. Defaults to the issue date. |
| Currency | currency | currency.Code | Currency for all invoice amounts and totals, unless explicitly stated otherwise. |
| Exchange Rates | exchange_rates | array of currency.ExchangeRate | Exchange rates to be used when converting the document’s monetary values into other currencies. |
| Preceding Details | preceding | array of org.DocumentRef | Document references for previous invoices that this document replaces or extends. |
| Tax | tax | bill.Tax | Special billing tax configuration options. |
| Supplier | supplier | org.Party | The entity supplying the goods or services and usually responsible for paying taxes. |
| Customer | customer | org.Party | Legal entity receiving the goods or services, may be nil in certain circumstances such as simplified invoices. |
| Lines | lines | array of bill.Line | List of invoice lines representing each of the items sold to the customer. |
| Discounts | discounts | array of bill.Discount | Discounts or allowances applied to the complete invoice |
| Charges | charges | array of bill.Charge | Charges or surcharges applied to the complete invoice |
| Ordering Details | ordering | bill.Ordering | Ordering details including document references and buyer or seller parties. |
| Payment Details | payment | bill.PaymentDetails | Information on when, how, and to whom the invoice should be paid. |
| Delivery Details | delivery | bill.DeliveryDetails | Specific details on delivery of the goods referenced in the invoice. |
| Totals | totals | bill.Totals | Summary of all the invoice totals, including taxes (calculated). |
| Notes | notes | array of org.Note | Unstructured information that is relevant to the invoice, such as correction or additional legal details. |
| Complements | complements | array of schema.Object | Additional complementary objects that add relevant information to the invoice. |
| Meta | meta | cbc.Meta | Additional semi-structured data that doesn’t fit into the body of the invoice. |
| Attachments | attachments | array of org.Attachment | Supporting documents that are not included in the main document. Do not use for alternative versions of the PDF; use “links” inside the envelope headers instead. |
Type Values
| Value | Description |
|---|---|
standard | A regular commercial invoice document between a supplier and customer. |
proforma | For a client’s validation before sending a final invoice. |
corrective | Corrected invoice that completely replaces the preceding document. |
credit-note | Reflects a refund either partial or complete of the preceding document. A credit note effectively extends the previous document. |
debit-note | An additional set of charges to be added to the preceding document. |
other | Any other type of invoice that does not fit into the standard categories and implies that any scenarios defined in tax regimes or addons will not be applied. This is useful for being able to create invoices with custom types in extensions, but is not recommended for general use. |
Validation Rules
| Field | Test | Validation Code / Message |
|---|---|---|
typeCalculated |
| GOBL-BILL-INVOICE-01Invoice type is required |
typeCalculated |
| GOBL-BILL-INVOICE-02Invoice type is not valid |
issue_dateCalculated |
| GOBL-BILL-INVOICE-03Invoice issue date is required |
currencyCalculated |
| GOBL-BILL-INVOICE-04Invoice currency is required |
supplier |
| GOBL-BILL-INVOICE-05Invoice supplier is required |
supplier.name |
| GOBL-BILL-INVOICE-06Invoice supplier name is required |
value_date |
| GOBL-BILL-INVOICE-11Value date cannot be set when tax point is set |
customer.name |
| GOBL-BILL-INVOICE-07Invoice customer name required when tax ID is set |
lines[*].item.price |
| GOBL-BILL-INVOICE-08Invoice line item price is required |
totalsCalculated |
| GOBL-BILL-INVOICE-09Invoice totals are required |
lines |
| GOBL-BILL-INVOICE-10Invoice lines are required without discounts or charges |