Skip to main content

Deposit

Deposit records operational bank/cash deposits, usually connected to transport cash handling but also creatable directly. It stores account/partner context, amount, evidence, branch/warehouse context, and retry state for integration failures.

App Entry Points

AppTarget
MobileDepositList -> DepositDetail; can open from transport detail with prefilled payload
POS Terminaldeposit -> DepositDetailForm

Workflow

Data And API Rules

Form Validation And List Actions

ActionGuard / behavior
CreateCreate dept permission is checked independently from menu visibility.
Account selectionCash and bank account options depend on branch/warehouse group context; account ids and names are submitted together.
Invoice selectionMultiple selected invoices produce a multi-item deposit payload; totals must agree with the form amount.
Confirm/saveShows a summary of amount, cash account and bank account before submitting.
Delete from listVisible only to delete-authorized departments, requires confirmation, and deletes by deposit id.
RetryAllowed only for the responsible/own record in Mobile; otherwise the UI reports that it is not the user's deposit.
Retry filterhasRetry narrows the list to records requiring integration recovery.
RuleBehavior
List sourceTerminal split list calls /deposits with whs = selected whGrpCode, pageLimit: 200, and hasRetry.
DedupeDeposit list dedupes by depositId, falling back to depositNo.
Create/updateDetail form can create a new deposit or update an existing one.
Transport linkWhen launched from transport, saving can update transport bank/deposit flags.
RetryRetry should use the existing deposit id and not create duplicate deposits.
EvidenceSlip/photo/evidence fields belong to the deposit record and should survive refresh.

Permissions And Guards

TopicBehavior
Terminal menu keydeposit
deptCode menu set-2, 1, 2, 3, 4, 7, 29, 21, 8, 9, 13, 16, 14, 27, 30
Create guardCreate button uses canCreateDeposit(...).
Branch ruleAvailable by menu permission and selected warehouse group.

Mobile vs POS Terminal

TopicMobilePOS Terminal
NavigationDeposit stack; may be launched by transportHomeScreen split-pane menu key deposit
DetailFull-screen deposit formDepositDetailForm
Transport linkRoute params/prefillDetail form callback updates transport
RetryDetail/list actionSplit list/detail action

Developer Handoff Map

AreaCode
Mobile list/detailapps/mobile/src/screens/depositStack/depositListScreen, depositDetailScreen
Terminal detailapps/pos-terminal/src/screens/HomeScreen/DepositDetailForm.tsx, DepositPanels.tsx
Serviceapps/*/src/services/deposit.ts / deposit service module
Transport dependencyTransportDetailForm.tsx and transport update service