Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/br-nfe-v4.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ Indicates a special tax regime that a party is subject to.
| ----- | ---- | ------------------------- |
| `ext` | <ul class="gobl-test"><li>Ext require [br-nfe-payment-means]</li></ul> | `GOBL-BR-NFE-PAY-INSTRUCTIONS-01`<br />Payment instructions require 'br-nfe-payment-means' extension |
</Accordion>
<Accordion title="pay.Advance">
<Accordion title="pay.Record">

| Field | Test | Validation Code / Message |
| ----- | ---- | ------------------------- |
Expand Down
21 changes: 21 additions & 0 deletions addons/es-facturae-v3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,27 @@ options. See the [Extensions](#extensions) section for possible values.
| `CR` | Copy of the Corrective |
| `CC` | Copy of the Summary |
</Accordion>
### FacturaE: Subsidy

Indicates that an advance payment came from a public grant or subsidy. Set this extension on a payment [Record](/draft-0/pay/record)'s `ext` map (under `advances` in an invoice's [PaymentDetails](/draft-0/bill/payment_details), or as a `methods` entry on a [bill.Payment](/draft-0/bill/payment)) to flag subsidised advances when generating FacturaE output.

```yaml
payment:
advances:
- key: credit-transfer
amount: "500.00"
ext:
es-facturae-subsidy: "S"
```

<Accordion title="es-facturae-subsidy">

| Code | Name |
| ---- | ---- |
| `S` | Yes |
| `N` | No |
</Accordion>

### FacturaE Change

FacturaE requires a specific and single code that explains why the previous invoice is being corrected.
Expand Down
2 changes: 1 addition & 1 deletion addons/gr-mydata-v1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ For example:
| `key` | <ul class="gobl-test"><li class="gobl-test-present">Present</li></ul> | `GOBL-GR-MYDATA-PAY-INSTRUCTIONS-01`<br />Payment instructions key is required |
| `ext` | <ul class="gobl-test"><li>Ext require [gr-mydata-payment-means]</li></ul> | `GOBL-GR-MYDATA-PAY-INSTRUCTIONS-02`<br />Payment instructions require 'gr-mydata-payment-means' extension |
</Accordion>
<Accordion title="pay.Advance">
<Accordion title="pay.Record">

| Field | Test | Validation Code / Message |
| ----- | ---- | ------------------------- |
Expand Down
2 changes: 1 addition & 1 deletion addons/it-sdi-v1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ used to determine the correct schema to use when validating the document.
| ----- | ---- | ------------------------- |
| `ext` | <ul class="gobl-test"><li>Ext require [it-sdi-payment-means]</li></ul> | `GOBL-IT-SDI-PAY-INSTRUCTIONS-01`<br />Payment instructions require 'it-sdi-payment-means' extension |
</Accordion>
<Accordion title="pay.Advance">
<Accordion title="pay.Record">

| Field | Test | Validation Code / Message |
| ----- | ---- | ------------------------- |
Expand Down
2 changes: 1 addition & 1 deletion addons/mx-cfdi-v4.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ Pattern: `\d{4}`
| ----- | ---- | ------------------------- |
| `ext` | <ul class="gobl-test"><li>Ext require [mx-cfdi-payment-means]</li></ul> | `GOBL-MX-CFDI-PAY-INSTRUCTIONS-01`<br />Payment instructions require 'mx-cfdi-payment-means' extension |
</Accordion>
<Accordion title="pay.Advance">
<Accordion title="pay.Record">

| Field | Test | Validation Code / Message |
| ----- | ---- | ------------------------- |
Expand Down
2 changes: 1 addition & 1 deletion addons/pl-favat-v3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ Example of a credit note effective on correction date:
| ----- | ---- | ------------------------- |
| `ext` | <ul class="gobl-test"><li>Ext require [pl-favat-tax-category]</li></ul> | `GOBL-PL-FAVAT-TAX-COMBO-01`<br />Tax combo requires 'pl-favat-tax-category' extension |
</Accordion>
<Accordion title="pay.Advance">
<Accordion title="pay.Record">

| Field | Test | Validation Code / Message |
| ----- | ---- | ------------------------- |
Expand Down
2 changes: 1 addition & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,13 @@
{
"group": "Pay",
"pages": [
"draft-0/pay/advance",
"draft-0/pay/card",
"draft-0/pay/credit_transfer",
"draft-0/pay/direct_debit",
"draft-0/pay/due_date",
"draft-0/pay/instructions",
"draft-0/pay/online",
"draft-0/pay/record",
"draft-0/pay/terms"
]
},
Expand Down
8 changes: 5 additions & 3 deletions draft-0/bill/payment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Payment
comment:
---

A Payment is used to link an invoice or invoices with a payment transaction.
A Payment is used to link an invoice or invoices with a payment transaction. A single payment document may record multiple methods (for example, partly card and partly cash) — each method is a [pay.Record](/draft-0/pay/record) with its own amount and optional currency. The sum of method amounts, converted to the document currency via `exchange_rates` where needed, must equal the document `total`.

## Schema ID

Expand All @@ -18,7 +18,6 @@ A Payment is used to link an invoice or invoices with a payment transaction.
| Tags | `$tags` | array of [cbc.Key](/draft-0/cbc/key) | Tags are used to help identify specific tax scenarios or requirements that may apply changes to the contents of the document or imply a specific meaning. Converters may use tags to help identify specific situations that do not have a specific extension, for example; self-billed or partial invoices may be identified by their respective tags. |
| UUID | `uuid` | string | Universally Unique Identifier. |
| Type | `type` | [cbc.Key](/draft-0/cbc/key) | Type of payment document being issued. |
| Method | `method` | [pay.Instructions](/draft-0/pay/instructions) | Details on how the payment was made based on the original instructions. |
| Series | `series` | [cbc.Code](/draft-0/cbc/code) | Series is used to identify groups of payments 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 for presentation with a dash (`-`) for separation. |
| Code | `code` | [cbc.Code](/draft-0/cbc/code) | Code is a sequential identifier that uniquely identifies the payment. The code can be left empty initially, but is **required** to **sign** the document. |
| Issue Date | `issue_date` | [cal.Date](/draft-0/cal/date) | When the payment was issued. |
Expand All @@ -32,6 +31,7 @@ A Payment is used to link an invoice or invoices with a payment transaction.
| Customer | `customer` | [org.Party](/draft-0/org/party) | Legal entity that receives the goods or services. |
| Payee | `payee` | [org.Party](/draft-0/org/party) | Legal entity that receives the payment if not the supplier. |
| Lines | `lines` | array of [bill.PaymentLine](/draft-0/bill/payment_line) | List of documents that are being paid for. |
| Methods | `methods` | array of [pay.Record](/draft-0/pay/record) | Methods describes how the payment was settled. At least one method is required; multiple may be present when the payment was split across means (for example, partly card + partly cash). |
| Ordering | `ordering` | [bill.Ordering](/draft-0/bill/ordering) | Ordering allows for additional information about the ordering process including references to other documents and alternative parties involved in the order-to-delivery process. |
| Total | `total` | [num.Amount](/draft-0/num/amount) | Total amount to be paid in this payment, either positive or negative according to the line types and totals. Calculated automatically. |
| Notes | `notes` | array of [org.Note](/draft-0/org/note) | Unstructured information that is relevant to the payment, such as correction or additional legal details. |
Expand All @@ -53,8 +53,10 @@ A Payment is used to link an invoice or invoices with a payment transaction.
| ----- | ---- | ------------------------- |
| `type`<br /><small class="gobl-field-calculated">Calculated</small> | <ul class="gobl-test"><li>Present</li></ul> | `GOBL-BILL-PAYMENT-01`<br />Payment type is required |
| `type`<br /><small class="gobl-field-calculated">Calculated</small> | <ul class="gobl-test"><li>One of [request, advice, receipt]</li></ul> | `GOBL-BILL-PAYMENT-02`<br />Payment type is not valid |
| `method` | <ul class="gobl-test"><li class="gobl-test-present">Present</li></ul> | `GOBL-BILL-PAYMENT-03`<br />Payment method is required |
| `methods` | <ul class="gobl-test"><li class="gobl-test-present">Present</li></ul> | `GOBL-BILL-PAYMENT-03`<br />At least one payment method is required |
| `issue_date`<br /><small class="gobl-field-calculated">Calculated</small> | <ul class="gobl-test"><li>Present</li></ul> | `GOBL-BILL-PAYMENT-04`<br />Payment issue date is required |
| `currency`<br /><small class="gobl-field-calculated">Calculated</small> | <ul class="gobl-test"><li>Present</li></ul> | `GOBL-BILL-PAYMENT-05`<br />Payment currency is required |
| `supplier` | <ul class="gobl-test"><li class="gobl-test-present">Present</li></ul> | `GOBL-BILL-PAYMENT-06`<br />Payment supplier is required |
| `lines` | <ul class="gobl-test"><li class="gobl-test-present">Present</li></ul> | `GOBL-BILL-PAYMENT-07`<br />Payment lines are required |
| <small>Payment</small> | <ul class="gobl-test"><li>Methods sum equals total</li></ul> | `GOBL-BILL-PAYMENT-08`<br />Methods sum must match total |
| `methods[*].key` | <ul class="gobl-test"><li class="gobl-test-present">Present</li></ul> | `GOBL-BILL-PAYMENT-09`<br />Payment method key is required |
2 changes: 1 addition & 1 deletion draft-0/bill/payment_details.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ PaymentDetails contains details as to how the invoice should be paid.
|-------|----------|------|-------------|
| Payee | `payee` | [org.Party](/draft-0/org/party) | The party responsible for receiving payment of the invoice, if not the supplier. |
| Terms | `terms` | [pay.Terms](/draft-0/pay/terms) | Payment terms or conditions. |
| Advances | `advances` | array of [pay.Advance](/draft-0/pay/advance) | Any amounts that have been paid in advance and should be deducted from the amount due. |
| Advances | `advances` | array of [pay.Record](/draft-0/pay/record) | Any amounts that have been paid in advance and should be deducted from the amount due. |
| Instructions | `instructions` | [pay.Instructions](/draft-0/pay/instructions) | Details on how payment should be made. |

28 changes: 16 additions & 12 deletions draft-0/pay/advance.mdx → draft-0/pay/record.mdx
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
---
title: Advance
title: Record
comment:
---

Advance represents a single payment that has been made already, such as a deposit on an intent to purchase, or as credit from a previous invoice which was later corrected or cancelled.
Record represents an individual payment transaction made via a specific means (cash, card, credit-transfer, etc.), with its own amount and optional currency. Records are nested inside other structures: as advances on an invoice's [PaymentDetails](/draft-0/bill/payment_details), or as the methods used to settle a [bill.Payment](/draft-0/bill/payment).

A single document may contain multiple records when a payment is split across means (for example, partly card and partly cash) or when several advances were collected before issuing the final invoice.

## Schema ID

`https://gobl.org/draft-0/pay/advance`
`https://gobl.org/draft-0/pay/record`

## Properties

| Title | Property | Type | Description |
|-------|----------|------|-------------|
| UUID | `uuid` | string | Universally Unique Identifier. |
| Date | `date` | [cal.Date](/draft-0/cal/date) | When the advance was made. |
| Key | `key` | [cbc.Key](/draft-0/cbc/key) | The payment means used to make the advance. |
| Reference | `ref` | string | ID or reference for the advance. |
| Grant | `grant` | boolean | If this "advance" payment has come from a public grant or subsidy, set this to true. |
| Description | `description` | string | Details about the advance. |
| Percent | `percent` | [num.Percentage](/draft-0/num/percentage) | Percentage of the total amount payable that was paid. Note that multiple advances with percentages may lead to rounding errors, especially when the total advances sums to 100%. We recommend only including one advance with a percent value per document. |
| Date | `date` | [cal.Date](/draft-0/cal/date) | When the payment was made. |
| Key | `key` | [cbc.Key](/draft-0/cbc/key) | The payment means used. |
| Reference | `ref` | string | ID or reference for the payment. |
| Description | `description` | string | Description about the payment. |
| Percent | `percent` | [num.Percentage](/draft-0/num/percentage) | Percentage of the total amount payable that was paid. Note that multiple records with percentages may lead to rounding errors, especially when the total sums to 100%. We recommend only including one record with a percent value per document. |
| Amount | `amount` | [num.Amount](/draft-0/num/amount) | How much was paid. |
| Currency | `currency` | [currency.Code](/draft-0/currency/code) | If different from the parent document's base currency. |
| Card | `card` | [pay.Card](/draft-0/pay/card) | Details of the payment that was made via a credit or debit card. |
| Credit Transfer | `credit_transfer` | [pay.CreditTransfer](/draft-0/pay/credit_transfer) | Details about how the payment was made by credit (bank) transfer. |
| Direct Debit | `direct_debit` | [pay.DirectDebit](/draft-0/pay/direct_debit) | Details of the payment that was made via direct debit. |
| Online | `online` | array of [pay.Online](/draft-0/pay/online) | Details of the payment that was made via an online provider. |
| Extensions | `ext` | [tax.Extensions](/draft-0/tax/extensions) | Tax extensions required by tax regimes or addons. |
| Meta | `meta` | [cbc.Meta](/draft-0/cbc/meta) | Additional details useful for the parties involved. |

Expand All @@ -32,7 +35,9 @@ Advance represents a single payment that has been made already, such as a deposi
| Value | Description |
|-------|-------------|
| `any` | Any method available, no preference. |
| `card` | Payment card. |
| `card` | Payment by card. |
| `card+credit` | Payment by credit card. |
| `card+debit` | Payment by debit card. |
| `credit-transfer` | Sender initiated bank or wire transfer. |
| `credit-transfer+sepa` | Sender initiated bank or wire transfer via SEPA. |
| `debit-transfer` | Receiver initiated bank or wire transfer. |
Expand All @@ -51,5 +56,4 @@ Advance represents a single payment that has been made already, such as a deposi

| Field | Test | Validation Code / Message |
| ----- | ---- | ------------------------- |
| `description` | <ul class="gobl-test"><li class="gobl-test-present">Present</li></ul> | `GOBL-PAY-ADVANCE-01`<br />Description is required |
| `key` | <ul class="gobl-test"><li>Be or starts with one of [any, card, credit-transfer, credit-transfer+sepa, debit-transfer, cash, cheque, bank-draft, direct-debit, direct-debit+sepa, online, promissory-note, netting, other]</li></ul> | `GOBL-PAY-ADVANCE-02`<br />Key must be valid |
| `key` | <ul class="gobl-test"><li>Be or starts with one of [any, card, credit-transfer, credit-transfer+sepa, debit-transfer, cash, cheque, bank-draft, direct-debit, direct-debit+sepa, online, promissory-note, netting, other]</li></ul> | `GOBL-PAY-RECORD-01`<br />Key must be valid |
Loading