Supplier outstanding balance (AP outstanding)

Calculates the true supplier AP outstanding balance accounting for partial payments. Provides an accurate snapshot of accounts payable at any given date.

โ†“ Download skill (.md)
84/100ยท๐Ÿ“… WeeklyยทIntermediateCFOAP ManagerController
ReconciliationSuppliersget_payablesget_payable_by_id

๐ŸŽฏ Skill purpose

Calculates the true supplier AP outstanding balance accounting for partial payments. Provides an accurate snapshot of accounts payable at any given date.

๐Ÿ“Š What it produces

Total AP outstanding with breakdown by supplier, invoiced amount vs paid amount.

โšก Benefit

Before

Manual Excel calculation reconciling invoices and payments supplier by supplier.

After

Exact real-time AP outstanding, supplier by supplier, without spreadsheets.



# Instructions โ€” Calculating supplier outstanding (AP outstanding)

## โš ๏ธ Critical rule

The `amount` field of a payable is **always the total invoice amount**, never reduced by partial payments.
`paymentStatus=toPay` includes **partially paid** invoices โ€” do not sum `amount` directly.

**Correct formula**: for each `toPay` payable, the actual outstanding = `amount.amount - sum(allocations[].amount.amount)`

## Step 1 โ€” Retrieve unpaid payables

Call `get_payables` with:
```
filters: { field: "paymentStatus", operator: "=", value: ["toPay"] }
```

Paginate if `hasNextPage=true`.

## Step 2 โ€” For each payable, calculate the true remaining balance

```
For each payable p:
  allocations_sum = sum(p.allocations[i].amount.amount)
  actual_outstanding = p.amount.amount - allocations_sum
  outstanding_decimal = actual_outstanding / 10^p.amount.precision
```

Examples of real cases encountered:
- Payable with allocations `[+11,106, -11,106]` โ†’ net = 0 โ†’ outstanding = 0 (payment then revision)
- Payable with allocations `[]` โ†’ outstanding = total amount โ†’ unpaid invoice
- Payable with allocation `[-250,000]` on a credit note of `-300,000` โ†’ 50,000 still to apply

## Step 3 โ€” Aggregate in functional currency

**Careful**: amounts are in various currencies. Use `functionalAmount` (in the company's functional currency) for aggregation, not `amount` (invoice currency).

Calculate `functional_outstanding` = `functionalAmount.amount - sum(functional_allocations)`.

## Step 4 โ€” Summary

Display:
- Total outstanding in functional currency
- Number of invoices involved
- Top 5 suppliers by outstanding amount
- Flag payables with complex allocations (revisions, partial credit notes)

## Example prompts

- "What is our total supplier outstanding?"
- "How much do we still owe suppliers this month?"

How to install this skill

/
  1. 1
    Download the file s13-ap-outstanding-calcul.md using the button above.
  2. 2
    Place the file in the .claude/ directory of your project (or ~/.claude/ for a global install).
    cp s13-ap-outstanding-calcul.md .claude/s13-ap-outstanding-calcul.md
  3. 3
    Use in Claude Code โ€” the skill is automatically discovered. Describe your need in natural language and Claude will apply the skill instructions.
๐Ÿ’ก Make sure the Spendesk MCP is configured in your .claude/settings.json with the tools get_payables, get_payable_by_id.

Similar skills

โ˜… Top
95/100ยท๐Ÿ” Ad hocยทExpert

MCP coverage audit & gap analysis

Probes all available MCP tools, re-evaluates coverage of 50 persona use cases, detects new fields or tools, and regenerates the gap analysis report.

CFOControllerAP Manager
90/100ยท๐Ÿ“… WeeklyยทBeginner

Card requests via get_requests

Explains how to use get_requests for card requests and why expense reimbursements don't appear there. Avoids a frequent source of confusion between two distinct workflows.

ControllerFinance Analyst
90/100ยท๐Ÿ” Ad hocยทIntermediate

Active vs archived cost centers

Distinguishes active cost centers from archived ones with correct use of get_cost_centers. Avoids the counter-intuitive isArchived vs isActive naming convention pitfall.

ControllerFinance Analyst