Tally UI

MovementSheet

MovementSheet records paid-in, paid-out, or no-sale register movements with a reason, amount when applicable, and optional drawer action.

Import

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

Usage

<MovementSheet
  register={register}
  type="paid_in"
  currency="EUR"
  onOpenChange={(open) => {
    if (!open) setMovementType(null);
  }}
/>

Renders an open dialog for the chosen paid-in, paid-out, or no-sale movement with a reason input and a confirm button that names the amount, 'Put €5.00 in' or 'Take €5.00 out' ('Put cash in' / 'Take cash out' until an amount is valid; 'Record' for a no sale). No-sale movements hide the amount input, record zero, and call onOpenDrawer after recording when supplied.

The sheet offers v2's common reasons as chips that fill the reason field, and "Other…" clears the field and focuses it.

Props

PropTypeDefaultDescription
registerReturnType<typeof useRegisterSession>requiredRegister session state and actions; records through register.actions.recordMovement
typeMovementTyperequiredMovement type chosen before mounting the sheet
currencystringrequiredISO 4217 code used to parse the entered amount into minor units
onDone(id: string, type: MovementType, amountMinor: number) => void---Called with the recorded movement's ID, type, and amount
onOpenChange(open: boolean) => voidrequiredReceives dialog visibility changes; called with false after recording
onOpenDrawer() => void---Called after recording a no-sale movement to open the drawer
reasonsreadonly string[]v2's reasons for the typeReplaces the default reason chips for this type; [] shows only "Other…"

On this page