apply_credit_note
Apply a posted credit note to a posted invoice or bill from the same owner, netting balances without cash movement. Resolves overcharge/outstanding balances on A/R or A/P accounts.
Instructions
Net a posted credit note against a posted invoice or bill from the same owner. No cash moves — the credit balance transfers between lots on the same A/R or A/P account.
This is the most common credit-note settlement path: the
bookkeeper issues a credit note against an overcharge,
then nets it against the next invoice from that customer
(or applies it to an outstanding bill on the vendor side).
Use pay_invoice instead when the credit note will be
settled by sending or receiving cash.
Args:
credit_note_id: The credit note to apply (must be
posted).
applies_to_invoice_id: The target invoice/bill (must
be posted, same owner, same currency, same A/R
or A/P post account).
amount: Decimal-string amount to apply, in the
document currency. Defaults to min(credit_note_ remaining, target_remaining) — apply as much
as possible.
apply_date: ISO date for the netting transaction.
Defaults to today.
owner_type: Optional 'customer' or 'vendor'
disambiguator for ID collisions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | ||
| apply_date | No | ||
| owner_type | No | ||
| credit_note_id | Yes | ||
| applies_to_invoice_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |