Skip to content

Commit

Permalink
Updating GOBL specs
Browse files Browse the repository at this point in the history
  • Loading branch information
samlown committed May 13, 2024
1 parent 3d338c7 commit fb8877c
Show file tree
Hide file tree
Showing 90 changed files with 496 additions and 470 deletions.
6 changes: 3 additions & 3 deletions draft-0/bill/charge.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Charge
comment: Generated with GOBL v0.68.0
comment:
---

Charge represents a surchange applied to the complete document independent from the individual lines.
Expand All @@ -13,9 +13,9 @@ Charge represents a surchange applied to the complete document independent from

| Title | Property | Type | Req. | Description |
|-------------|-----------|-------------------------------------------|------|-------------------------------------------------------------------------------------------------------------------------------------------|
| UUID | `uuid` | [uuid.UUID](/draft-0/uuid/uuid) | | Unique identifying for the discount entry |
| UUID | `uuid` | string | | Universally Unique Identifier. |
| Key | `key` | [cbc.Key](/draft-0/cbc/key) | | Key for grouping or identifying charges for tax purposes. |
| Index | `i` | integer | | Line number inside the list of discounts (calculated). |
| Index | `i` | integer | | Line number inside the list of charges (calculated). |
| Reference | `ref` | string | | Code to used to refer to the this charge |
| Base | `base` | [num.Amount](/draft-0/num/amount) | | Base represents the value used as a base for percent calculations. If not already provided, we'll take the invoices sum before discounts. |
| Percent | `percent` | [num.Percentage](/draft-0/num/percentage) | | Percentage to apply to the invoice's Sum |
Expand Down
2 changes: 1 addition & 1 deletion draft-0/bill/correction_options.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: CorrectionOptions
comment: Generated with GOBL v0.68.0
comment:
---

CorrectionOptions defines a structure used to pass configuration options to correct a previous invoice.
Expand Down
2 changes: 1 addition & 1 deletion draft-0/bill/delivery.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Delivery
comment: Generated with GOBL v0.68.0
comment:
---

Delivery covers the details of the destination for the products described in the invoice body.
Expand Down
4 changes: 2 additions & 2 deletions draft-0/bill/discount.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Discount
comment: Generated with GOBL v0.68.0
comment:
---

Discount represents an allowance applied to the complete document independent from the individual lines.
Expand All @@ -13,7 +13,7 @@ Discount represents an allowance applied to the complete document independent fr

| Title | Property | Type | Req. | Description |
|-------------|-----------|-------------------------------------------|------|--------------------------------------------------------------------------------------------------------------------------|
| UUID | `uuid` | [uuid.UUID](/draft-0/uuid/uuid) | | Unique identifying for the discount entry |
| UUID | `uuid` | string | | Universally Unique Identifier. |
| Index | `i` | integer | | Line number inside the list of discounts (calculated) |
| Reference | `ref` | string | | Reference or ID for this Discount |
| Base | `base` | [num.Amount](/draft-0/num/amount) | | Base represents the value used as a base for percent calculations. If not already provided, we'll take the invoices sum. |
Expand Down
14 changes: 7 additions & 7 deletions draft-0/bill/document_reference.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: DocumentReference
comment: Generated with GOBL v0.68.0
comment:
---

DocumentReference provides a link to a existing document.
Expand All @@ -11,10 +11,10 @@ DocumentReference provides a link to a existing document.

## Properties

| Title | Property | Type | Req. | Description |
|--------|----------|---------------------------------|------|---------------------------------------------|
| UUID | `uuid` | [uuid.UUID](/draft-0/uuid/uuid) | | Unique ID copied from the source document. |
| Series | `series` | string | | Series the reference document belongs to. |
| Code | `code` | string | | Source document's code or other identifier. |
| URL | `url` | string | | Link to the source document. |
| Title | Property | Type | Req. | Description |
|--------|----------|--------|------|---------------------------------------------|
| UUID | `uuid` | string | | Unique ID copied from the source document. |
| Series | `series` | string | | Series the reference document belongs to. |
| Code | `code` | string | | Source document's code or other identifier. |
| URL | `url` | string | | Link to the source document. |

19 changes: 10 additions & 9 deletions draft-0/bill/invoice.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Invoice
comment: Generated with GOBL v0.68.0
comment:
---

Invoice represents a payment claim for goods or services supplied under conditions agreed between the supplier and the customer.
Expand All @@ -13,7 +13,7 @@ Invoice represents a payment claim for goods or services supplied under conditio

| Title | Property | Type | Req. | Description |
|-------------------|------------------|-------------------------------------------------------------------|------|------------------------------------------------------------------------------------------------------------------|
| UUID | `uuid` | [uuid.UUID](/draft-0/uuid/uuid) | | Unique document ID. Not required, but always recommended in addition to the Code. |
| UUID | `uuid` | string | | Universally Unique Identifier. |
| Type | `type` | [cbc.Key](/draft-0/cbc/key) | | Type of invoice document subject to the requirements of the local tax regime. |
| Series | `series` | string | | Used as a prefix to group codes. |
| Code | `code` | string | true | Sequential code used to identify this invoice in tax declarations. |
Expand All @@ -40,11 +40,12 @@ Invoice represents a payment claim for goods or services supplied under conditio

## Type Values

| Value | Description |
|---------------|-------------------------------------------------------------------------|
| `standard` | A regular commercial invoice document between a supplier and customer. |
| `proforma` | For a clients 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. |
| `debit-note` | An additional set of charges to be added to the preceding document. |
| Value | Description |
|---------------|----------------------------------------------------------------------------|
| `standard` | A regular commercial invoice document between a supplier and customer. |
| `proforma` | For a clients 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. |

4 changes: 2 additions & 2 deletions draft-0/bill/line.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Line
comment: Generated with GOBL v0.68.0
comment:
---

Line is a single row in an invoice.
Expand All @@ -13,7 +13,7 @@ Line is a single row in an invoice.

| Title | Property | Type | Req. | Description |
|-----------|-------------|-----------------------------------------------------------|------|-----------------------------------------------------------------------------|
| UUID | `uuid` | [uuid.UUID](/draft-0/uuid/uuid) | | Unique identifier for this line |
| UUID | `uuid` | string | | Universally Unique Identifier. |
| Index | `i` | integer | | Line number inside the parent (calculated) |
| Quantity | `quantity` | [num.Amount](/draft-0/num/amount) | true | Number of items |
| Item | `item` | [org.Item](/draft-0/org/item) | true | Details about what is being sold |
Expand Down
2 changes: 1 addition & 1 deletion draft-0/bill/line_charge.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: LineCharge
comment: Generated with GOBL v0.68.0
comment:
---

LineCharge represents an amount added to the line, and will be applied before taxes.
Expand Down
2 changes: 1 addition & 1 deletion draft-0/bill/line_discount.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: LineDiscount
comment: Generated with GOBL v0.68.0
comment:
---

LineDiscount represents an amount deducted from the line, and will be applied before taxes.
Expand Down
2 changes: 1 addition & 1 deletion draft-0/bill/ordering.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Ordering
comment: Generated with GOBL v0.68.0
comment:
---

Ordering provides additional information about the ordering process including references to other documents and alternative parties involved in the order-to-delivery process.
Expand Down
4 changes: 2 additions & 2 deletions draft-0/bill/outlay.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Outlay
comment: Generated with GOBL v0.68.0
comment:
---

Outlay represents a reimbursable expense that was paid for by the supplier and invoiced separately by the third party directly to the customer.
Expand All @@ -13,7 +13,7 @@ Outlay represents a reimbursable expense that was paid for by the supplier and i

| Title | Property | Type | Req. | Description |
|-------------|---------------|-----------------------------------|------|-----------------------------------------------------------------------|
| UUID | `uuid` | [uuid.UUID](/draft-0/uuid/uuid) | | Unique identity for this outlay. |
| UUID | `uuid` | string | | Universally Unique Identifier. |
| Index | `i` | integer | | Outlay number index inside the invoice for ordering (calculated). |
| Date | `date` | [cal.Date](/draft-0/cal/date) | | When was the outlay made. |
| Code | `code` | string | | Invoice number or other reference detail used to identify the outlay. |
Expand Down
2 changes: 1 addition & 1 deletion draft-0/bill/payment.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Payment
comment: Generated with GOBL v0.68.0
comment:
---

Payment contains details as to how the invoice should be paid.
Expand Down
15 changes: 13 additions & 2 deletions draft-0/bill/preceding.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Preceding
comment: Generated with GOBL v0.68.0
comment:
---

Preceding allows for information to be provided about a previous invoice that this one will replace, subtract from, or add to.
Expand All @@ -13,7 +13,7 @@ Preceding allows for information to be provided about a previous invoice that th

| Title | Property | Type | Req. | Description |
|------------|--------------|--------------------------------------------|------|--------------------------------------------------------------------------------------------------|
| UUID | `uuid` | [uuid.UUID](/draft-0/uuid/uuid) | | Preceding document's UUID if available can be useful for tracing. |
| UUID | `uuid` | string | | Preceding document's UUID. |
| Type | `type` | [cbc.Key](/draft-0/cbc/key) | | Type of the preceding document |
| Series | `series` | string | | Series identification code |
| Code | `code` | string | true | Code of the previous document. |
Expand All @@ -24,3 +24,14 @@ Preceding allows for information to be provided about a previous invoice that th
| Ext | `ext` | [tax.Extensions](/draft-0/tax/extensions) | | Extensions for region specific requirements. |
| Meta | `meta` | [cbc.Meta](/draft-0/cbc/meta) | | Additional semi-structured data that may be useful in specific regions |

## Type Values

| Value | Description |
|---------------|----------------------------------------------------------------------------|
| `standard` | A regular commercial invoice document between a supplier and customer. |
| `proforma` | For a clients 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. |

13 changes: 7 additions & 6 deletions draft-0/bill/tax.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Tax
comment: Generated with GOBL v0.68.0
comment:
---

Tax defines a summary of the taxes which may be applied to an invoice.
Expand All @@ -11,9 +11,10 @@ Tax defines a summary of the taxes which may be applied to an invoice.

## Properties

| Title | Property | Type | Req. | Description |
|----------------|------------------|--------------------------------------|------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Prices Include | `prices_include` | [cbc.Code](/draft-0/cbc/code) | | Category of the tax already included in the line item prices, especially useful for B2C retailers with customers who prefer final prices inclusive of tax. |
| Tags | `tags` | array of [cbc.Key](/draft-0/cbc/key) | | Special tax tags that apply to this invoice according to local requirements. |
| Meta | `meta` | [cbc.Meta](/draft-0/cbc/meta) | | Any additional data that may be required for processing, but should never be relied upon by recipients. |
| Title | Property | Type | Req. | Description |
|----------------|------------------|-------------------------------------------|------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Prices Include | `prices_include` | [cbc.Code](/draft-0/cbc/code) | | Category of the tax already included in the line item prices, especially useful for B2C retailers with customers who prefer final prices inclusive of tax. |
| Tags | `tags` | array of [cbc.Key](/draft-0/cbc/key) | | Special tax tags that apply to this invoice according to local requirements. |
| Extensions | `ext` | [tax.Extensions](/draft-0/tax/extensions) | | Additional extensions that are applied to the invoice as a whole as opposed to specific sections. |
| Meta | `meta` | [cbc.Meta](/draft-0/cbc/meta) | | Any additional data that may be required for processing, but should never be relied upon by recipients. |

2 changes: 1 addition & 1 deletion draft-0/bill/totals.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Totals
comment: Generated with GOBL v0.68.0
comment:
---

Totals contains the summaries of all calculations for the invoice.
Expand Down
2 changes: 1 addition & 1 deletion draft-0/cal/date.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Date
comment: Generated with GOBL v0.68.0
comment:
---

Civil date in simplified ISO format, like 2021-05-26
Expand Down
2 changes: 1 addition & 1 deletion draft-0/cal/date_time.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: DateTime
comment: Generated with GOBL v0.68.0
comment:
---

Civil date time in simplified ISO format with no time zone
Expand Down
2 changes: 1 addition & 1 deletion draft-0/cal/period.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Period
comment: Generated with GOBL v0.68.0
comment:
---

Period represents two dates with a start and finish.
Expand Down
2 changes: 1 addition & 1 deletion draft-0/cbc/code.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Code
comment: Generated with GOBL v0.68.0
comment:
---

Alphanumerical text identifier with upper-case letters, no whitespace, nor symbols.
Expand Down
Loading

0 comments on commit fb8877c

Please sign in to comment.