Skip to content

Commit

Permalink
Updating schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
samlown committed Mar 4, 2025
1 parent c5463d5 commit a492af2
Show file tree
Hide file tree
Showing 30 changed files with 473 additions and 1,725 deletions.
2 changes: 1 addition & 1 deletion draft-0/bill/charge.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Charge represents a surchange applied to the complete document independent from

## Schema ID

`https://gobl.org/draft-0/bill/invoice#/$defs/Charge`
`https://gobl.org/draft-0/bill/order#/$defs/Charge`

## Properties

Expand Down
17 changes: 9 additions & 8 deletions draft-0/bill/correction_options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ CorrectionOptions defines a structure used to pass configuration options to corr

## Properties

| Title | Property | Type | Req. | Description |
|------------|--------------|--------------------------------------------|------|----------------------------------------------------------------------------------------------------------------------------------------|
| Type | `type` | [cbc.Key](/draft-0/cbc/key) | true | The type of corrective invoice to produce. |
| Issue Date | `issue_date` | [cal.Date](/draft-0/cal/date) | | When the new corrective invoice's issue date should be set to. |
| Series | `series` | [cbc.Code](/draft-0/cbc/code) | | Series to assign to the new corrective invoice. |
| Stamps | `stamps` | array of [head.Stamp](/draft-0/head/stamp) | | Stamps of the previous document to include in the preceding data. |
| Reason | `reason` | string | | Human readable reason for the corrective operation. |
| Extensions | `ext` | [tax.Extensions](/draft-0/tax/extensions) | | Extensions for region specific requirements that may be added in the preceding or at the document level, according to the local rules. |
| Title | Property | Type | Req. | Description |
|-----------------|--------------|--------------------------------------------|------|----------------------------------------------------------------------------------------------------------------------------------------|
| Type | `type` | [cbc.Key](/draft-0/cbc/key) | true | The type of corrective invoice to produce. |
| Issue Date | `issue_date` | [cal.Date](/draft-0/cal/date) | | When the new corrective invoice's issue date should be set to. |
| Series | `series` | [cbc.Code](/draft-0/cbc/code) | | Series to assign to the new corrective invoice. |
| Stamps | `stamps` | array of [head.Stamp](/draft-0/head/stamp) | | Stamps of the previous document to include in the preceding data. |
| Reason | `reason` | string | | Human readable reason for the corrective operation. |
| Extensions | `ext` | [tax.Extensions](/draft-0/tax/extensions) | | Extensions for region specific requirements that may be added in the preceding or at the document level, according to the local rules. |
| Copy Tax Totals | `copy_tax` | boolean | | CopyTax when true will copy the tax totals from the previous document to the preceding document data. |

80 changes: 71 additions & 9 deletions draft-0/bill/delivery.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,81 @@ title: Delivery
comment:
---

Delivery covers the details of the destination for the products described in the invoice body.
Delivery document used to describe the delivery of goods or potentially also services.

## Schema ID

`https://gobl.org/draft-0/bill/invoice#/$defs/Delivery`
`https://gobl.org/draft-0/bill/delivery`

## Properties

| Title | Property | Type | Req. | Description |
|------------|--------------|------------------------------------------------|------|-----------------------------------------------------------------------------------------------------------|
| Receiver | `receiver` | [org.Party](/draft-0/org/party) | | The party who will receive delivery of the goods defined in the invoice and is not responsible for taxes. |
| Identities | `identities` | array of [org.Identity](/draft-0/org/identity) | | Identities is used to define specific codes or IDs that may be used to identify the delivery. |
| Date | `date` | [cal.Date](/draft-0/cal/date) | | When the goods should be expected. |
| Period | `period` | [cal.Period](/draft-0/cal/period) | | Period of time in which to expect delivery if a specific date is not available. |
| Meta | `meta` | [cbc.Meta](/draft-0/cbc/meta) | | Additional custom data. |
| Title | Property | Type | Req. | Description |
|-------------------|------------------|-------------------------------------------------------------------|------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Tax Regime | `$regime` | [l10n.TaxCountryCode](/draft-0/l10n/tax_country_code) | | |
| Addons | `$addons` | array of [cbc.Key](/draft-0/cbc/key) | | Addons defines a list of keys used to identify tax addons that apply special normalization, scenarios, and validation rules to a document. |
| Tags | `$tags` | array of [cbc.Key](/draft-0/cbc/key) | | Tags are used to help identify specific tax scenarios or requirements that will apply changes to the contents of the invoice. Tags by design should always be optional, it should always be possible to build a valid invoice without any tags. |
| UUID | `uuid` | string | | Universally Unique Identifier. |
| Type | `type` | [cbc.Key](/draft-0/cbc/key) | true | Type of delivery document. |
| Series | `series` | [cbc.Code](/draft-0/cbc/code) | | Used as a prefix to group codes. |
| Code | `code` | [cbc.Code](/draft-0/cbc/code) | true | Sequential code used to identify this delivery in tax declarations. |
| Issue Date | `issue_date` | [cal.Date](/draft-0/cal/date) | | When the delivery document is to be issued. |
| Value Date | `value_date` | [cal.Date](/draft-0/cal/date) | | When the taxes of this delivery become accountable, if none set, the issue date is used. |
| Currency | `currency` | [currency.Code](/draft-0/currency/code) | | Currency for all delivery totals. |
| Exchange Rates | `exchange_rates` | array of [currency.ExchangeRate](/draft-0/currency/exchange_rate) | | Exchange rates to be used when converting the invoices monetary values into other currencies. |
| Ordering | `ordering` | [bill.Ordering](/draft-0/bill/ordering) | | Ordering details for the delivery, including links to other documents. |
| Preceding Details | `preceding` | array of [org.DocumentRef](/draft-0/org/document_ref) | | Key information regarding previous delivery documents that this one will either extend or replace. |
| Tracking | `tracking` | [bill.Tracking](/draft-0/bill/tracking) | | Tracking is used to define specific codes or IDs that may be used to identify and track delivery. |
| Despatch Date | `despatch_date` | [cal.Date](/draft-0/cal/date) | | DespatchDate is the date when the goods are expected to be despatched. |
| Receive Date | `receive_date` | [cal.Date](/draft-0/cal/date) | | ReceiveDate is the date when the goods are expected to be received. |
| Tax | `tax` | [bill.Tax](/draft-0/bill/tax) | | Special tax configuration for calculating totals. |
| Supplier | `supplier` | [org.Party](/draft-0/org/party) | true | The entity supplying the goods or services and usually responsible for paying taxes. |
| Customer | `customer` | [org.Party](/draft-0/org/party) | | Legal entity receiving the goods or services, may be nil in certain circumstances such as simplified invoices. |
| Despatcher | `despatcher` | [org.Party](/draft-0/org/party) | | The party who will despatch the goods defined in the invoice. |
| Receiver | `receiver` | [org.Party](/draft-0/org/party) | | The party who will receive delivery of the goods defined in the invoice. |
| Courier | `courier` | [org.Party](/draft-0/org/party) | | The courier responsible for delivering the goods. |
| Lines | `lines` | array of [bill.Line](/draft-0/bill/line) | | List of lines representing each of the items to be ordered. |
| Discounts | `discounts` | array of [bill.Discount](/draft-0/bill/discount) | | Discounts or allowances applied to order totals |
| Charges | `charges` | array of [bill.Charge](/draft-0/bill/charge) | | Charges or surcharges applied to order totals |
| Totals | `totals` | [bill.Totals](/draft-0/bill/totals) | | Summary of all the order totals, including taxes (calculated). |
| Notes | `notes` | array of [org.Note](/draft-0/org/note) | | Unstructured information that is relevant to the delivery, such as correction or additional legal details. |
| Complements | `complements` | array of [schema.Object](/draft-0/schema/object) | | Additional complementary objects that add relevant information to the delivery. |
| Meta | `meta` | [cbc.Meta](/draft-0/cbc/meta) | | Additional semi-structured data that doesn't fit into the body of the delivery. |
| Attachments | `attachments` | array of [org.Attachment](/draft-0/org/attachment) | | Attachments provide additional information or supporting documents that are not included in the main document. It is important that attachments are not used for alternative versions of the PDF, for that, see "links" inside the envelope headers. |

## Tax Regime Values

| Value | Description |
|-------|--------------------------|
| `AE` | United Arab Emirates |
| `AT` | Austria |
| `BE` | Belgium |
| `BR` | Brazil |
| `CA` | Canada |
| `CH` | Switzerland |
| `CO` | Colombia |
| `DE` | Germany |
| `EL` | Greece |
| `ES` | Spain |
| `FR` | France |
| `GB` | United Kingdom |
| `IN` | India |
| `IT` | Italy |
| `MX` | Mexico |
| `NL` | The Netherlands |
| `PL` | Poland |
| `PT` | Portugal |
| `US` | United States of America |

## Type Values

| Value | Description |
|-----------|-------------------------------------------------------------------------------|
| `advice` | A delivery or despatch advice document send by the supplier to indicate how |
| | an order is to be delivered. |
| `note` | A delivery note is a document accompanying a shipment of goods that lists the |
| | items included in the shipment. |
| `waybill` | A waybill is a document issued by a carrier giving details and instructions |
| | relating to the shipment of a consignment of goods. |
| `receipt` | A delivery receipt is a document that is signed by the person who receives |
| | goods to confirm that they have been received. |

Loading

0 comments on commit a492af2

Please sign in to comment.