Runs live, versioned Python application objects on one VM, with a suite of apps: projects, notes, tasks, files and more.

9 downloads

dbbasic-object-server/docs/cash-counts.md
Install on DigitalOcean Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-object-server.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-object-server.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-object-server.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

Daniel Quellhorst Changelog for this batch. 65ef78d 3 hours, 19 minutes ago History
cash-counts.md · 4.5 KB · 104 lines

Cash counts and their witness

A till, a petty-cash box or a safe has no bank to send a statement. The only evidence of what is in it is that somebody counted it. app-banking records that count, compares it with what the books say, and books any difference as cash over/short straight away.

The person counting a till is usually the person who could take from it, so an account can require a second person (value_accounts.requires_second_attestor). This page is about how that second person works.

Naming a witness is not the same as being witnessed

When you record a count (action_record_count), you can name a witness in witnessed_by. It must be the user id of another person who signs in to this server and whose account is active. A display name or an email is not looked up.

The count is refused, and nothing is recorded, when the name is:

  • nobody this server knows,
  • a user who is disabled or not yet active,
  • you: your own user id, display name or email,
  • a user who belongs to a different identity account from yours.

All of these get the same answer, so the refusal does not tell anybody which users exist.

When the witness is accepted, the count is recorded and any shortage or overage is booked at once, exactly as before. But the count says named, not confirmed (witness_status: named) and it is still rated as self-certified (assurance weak). On an account that requires a second attestor, the answer says that requirement is not met yet.

Why: if typing a colleague's name were enough, somebody who took cash could type a colleague's name and the books would show a "witnessed" shortage that points at the colleague. Only the colleague can make it witnessed.

Confirming as the witness

The witness uses action_confirm_count, signed in as themselves.

  • GET lists the counts waiting for them: the account, the date and who

counted. It does not show the figure.

  • POST {count_id, counted_minor} answers one of them. The witness states

the figure they counted.

  • Same figure as the recorded one: the count is confirmed and rated
`medium` (better than self-certified, still below a bank statement).
  • A different figure: the count is not confirmed. It is marked
**disputed** and the figure the witness gave is kept on the count. The
answer does not reveal the recorded figure.

The witness answers once. A confirmed or disputed count cannot be answered again; a disagreement is settled by counting again, which is a new record.

Nobody else can answer for the witness: not the person who counted, not another user, and not an admin. The admin token is nobody's sign-in and is refused. An admin who needs a count gone uses the existing means for records; there is no "confirm on their behalf".

Confirming never changes the books. The variance journal was booked when the count was recorded; confirming only changes how much the count is worth as evidence.

One shared device at the till

Two closers, one tablet: that is the normal case, and it still works.

  1. The first closer counts and records the count, naming the second closer.
  2. The second closer either signs in on the same device (after the first

signs out), or confirms from their own phone. Either way they open the list of counts waiting for them and type the figure they counted.

What does not work, on purpose, is the first closer confirming while still signed in as themselves. The confirmation has to come from the second person's own sign-in, or it is just the first person saying it twice.

What the owner sees

The account owner sees two counts in their attention list:

  • Cash counts awaiting their witness: counts that name a witness who has

not answered yet.

  • Cash counts the named witness disputed: the witness stated a different

figure. Look at it: count again together.

Accounts that do not require a witness

A count recorded without a witness is self-certified (weak), as it always was, and nothing about it changes. If you do name a witness on such an account, the same rules apply: they must be a real active user, and the count is only witnessed once they confirm it.

Fields

On value_account_counts (schema v4), all read-only, so the record API cannot set them. Only the two actions write them:

FieldMeaning
witnessed_byUser id of the named witness
witness_statusnamed, confirmed or disputed (empty when no witness)
witness_stated_minorThe figure the witness stated, matched or not
witness_answered_atWhen the witness answered