Schema ID
https://gobl.org/draft-0/bill/order
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 the order. |
| Series | series | cbc.Code | Identifies groups of orders by date, business area, project, type, customer, 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 order. May be left empty initially, but is required to sign the document. |
| Issue Date | issue_date | cal.Date | When the order was created. |
| Issue Time | issue_time | cal.Time | Optional time of day when the order 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 order 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 order totals. |
| Exchange Rates | exchange_rates | array of currency.ExchangeRate | Exchange rates to be used when converting the document’s monetary values into other currencies. |
| Contracts | contracts | array of org.DocumentRef | Contracts related to the document. |
| Preceding Details | preceding | array of org.DocumentRef | Key information regarding previous order documents. |
| Identities | identities | array of org.Identity | Additional codes, IDs, SKUs, or other regional or custom identifiers that may be used to identify the order. |
| Period | period | cal.Period | Period of time in which the order is valid. |
| Tax | tax | bill.Tax | Special tax configuration for billing. |
| 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. |
| Buyer | buyer | org.Party | Party who is responsible for issuing payment, if not the same as the customer. |
| Seller | seller | org.Party | Party liable to pay taxes on the transaction, if not the same as the supplier. |
| Lines | lines | array of bill.Line | List of lines representing each of the items to be ordered. |
| Discounts | discounts | array of bill.Discount | Discounts or allowances applied to the order totals. |
| Charges | charges | array of bill.Charge | Charges or surcharges applied to the order totals. |
| Payment Details | payment | bill.PaymentDetails | Information on when, how, and to whom a final invoice would be paid. |
| Delivery Details | delivery | bill.DeliveryDetails | Specific details on delivery of the goods to copy to the final invoice. |
| Totals | totals | bill.Totals | Summary of all the order totals, including taxes (calculated). |
| Notes | notes | array of org.Note | Unstructured information that is relevant to the order, such as correction or additional legal details. |
| Complements | complements | array of schema.Object | Additional complementary objects that add relevant information to the order. |
| Meta | meta | cbc.Meta | Additional semi-structured data that doesn’t fit into the body of the order. |
| 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 |
|---|---|
purchase | A purchase order is a document that a buyer sends to a seller to request goods or services. |
sale | A sales order is a document that a seller sends to a buyer to confirm the sale of goods or services. |
quote | A quote is a document that a seller sends to a buyer to provide a price for goods or services. |
Validation Rules
| Field | Test | Validation Code / Message |
|---|---|---|
type |
| GOBL-BILL-ORDER-01Type is required |
type |
| GOBL-BILL-ORDER-02Type is not valid |
issue_dateCalculated |
| GOBL-BILL-ORDER-03Issue date is required |
currencyCalculated |
| GOBL-BILL-ORDER-04Currency is required |
supplier |
| GOBL-BILL-ORDER-05Supplier is required |
lines |
| GOBL-BILL-ORDER-06Lines are required |