Skip to content
GitHub
Browse the docs

Bank and payments

Payment batch

PaymentBatch

A payment run that needs two people. Account numbers stay hidden from an agent; duplicates are flagged.

The person sees

AccountRemove
Nordlys Kontor AS•••• 794710012342$12,500.00
Brattli•••• 890320045519$4,380.00
Nordlys Kontor AS•••• 794710012342$12,500.00
Total$29,380.00
  • Payments p1 and p3 look like the same payment: same account, amount and reference. Remove one or give them different references.

Approvals: 0/2

Install
booki_version=$(npm view @booki-aui/react@latest version) &&
ui_sdk_version=$(npm view "@booki-aui/react@$booki_version" peerDependencies.@ui-sdk/core) &&
pnpm add --save-exact "@booki-aui/core@$booki_version" "@booki-aui/react@$booki_version" "@booki-aui/styles@$booki_version" \
  "@ui-sdk/core@$ui_sdk_version" "@ui-sdk/react@$ui_sdk_version"

Try the bridge

Open this page in a browser and run the example in the console with a fresh preview. Read the current ref from the snapshot before acting.

Console
const { agent } = window
const entry = agent.snapshot().filter(
  (entry) => !entry.offPage && entry.component === "payment-batch",
)[0]
const result = await agent.act({
  steps: [{
    ref: entry.ref,
    action: "removePayment",
    args: ["p3"],
  }],
})
console.log(result.ok) // true

The duplicate payment p3 disappears from the draft. Releasing the batch still requires a person.

Import from @booki-aui/react. For Booki's default styling, add import "@booki-aui/styles".