Tally UI

Tender

Tender is the sale's tender pane, laid out as WCPOS v2's, with a balance headline, payment legs with their status and void, a keypad, quick-cash chips and completion.

Import

import { Tender } from '@tallyui/components';

Usage

import { useSale } from '@tallyui/pos';
import { Tender } from '@tallyui/components';

// Inside a component under TaxProvider.
const sale = useSale(settings, { registerId, cashierRef });
<Tender sale={sale} />

Renders only during the sale's tender stage. The headline shows the total, or what remains once money is paid (pending legs never count), and any change. Each payment leg shows its method, amount and status, with Cancel payment where the method can void it. While a balance remains, the cashier picks Cash or Card terminal, types the amount on the keypad or presses a quick-cash chip (the exact amount, then the next 5, 10 and 50), and takes each leg in turn, so a sale can be split across several payments. Complete sale is enabled once nothing is due and no leg is in motion. Error, continuation and Back controls show as the sale state requires.

TenderPane is the same pane for a host that owns the tender reducer (tenderReducer from @tallyui/pos): it takes sale, state and dispatch.

Props

PropTypeDefaultDescription
saleReturnType<typeof useSale>requiredThe sale from useSale
tenderReturnType<typeof useTender>own reducerShare useTender's state and dispatch with Cart's unit picker
methodsPaymentMethodDescriptor[]defaultPaymentMethods()The methods offered: each manual-capture descriptor gets a tile and records its wire method (cash or external) plus its own id as methodId; other capture modes are not shown
ledgerbooleantrueDraws the payments ledger in the TenderPane; pass false when Cart's tenderLedger shows it in the cart column
backbooleantrueDraws the TenderPane's Back button; pass false when the host leaves the tender stage itself, as WCPOS v2's phone checkout does
confirmVoidbooleanfalseWCPOS v2's "Cancel this payment?" before a leg in the TenderPane's ledger is voided: Cancel payment opens a question with the leg's amount ("Return €10.00 cash to the customer" for cash, else "Void €15.00 on Card terminal"), and the leg is voided only on confirm. Default off: Cancel payment voids at once

On this page