Cash rows: SELF cheques, ATM withdrawals and cash deposits

The 16/10 alpha test showed that cash rows often start with no suggestion, or with a weak one. This page shows the cause, four ways for the app to handle cash rows, and a mock of the Suggestions and Review steps where you can try each way with the keyboard. All sample rows are made up from the patterns in the alpha data. They contain no person names and no real account or card numbers.

14 SELF cheques₹8.4 lakh, printed by HDFC as SELF-CHQPAID- SARDARCHOWK, got no suggestion from the server. Only the Miracle history clue helped 4 of them.
69% → red markEvery ATM withdrawal and every other cash row is rated “category one alone”, which is 69%. That is under the 70% line, so the mark is red, not yellow, and these rows sort to the top as “least likely”. 3 were left unsaved and went to Suspense.
Cash deposits missed tooCASHDEPOSITBY-SELF-… is one glued word, so it got no suggestion either. The cause is the same as for SELF cheques.

Why it happens

The cash rule (server/ledger_signals.go, the first categories entry) reads the narration as separate letter runs. For a SELF cheque it needs SELF plus the separate word CHQ or PAID. In SELF-CHQPAID- the word is CHQPAID, so the rule does not see it. For deposits it needs CASH plus DEPOSIT or BY. In CASHDEPOSITBY they are one word.

The 69% is not a measure of cash rows. The confidence table pools every category (cash, loans, bills, rent, salary…) into one situation, “category one alone” (267 right of 388). Cash rows are much more accurate than that pool, as the book check below shows.

Book check: what the 10 Miracle companies of the replay corpus booked

These are labelled statement rows only (an unambiguous match to one bank-ledger posting). I ran the current rule and the proposed rule over the narrations and compared them with the ledger in the books. “Right” means the books post the row to the Cash-in-hand ledger. Every company has exactly one Cash-in-hand ledger. Its many GST “Cash Ledger(CGST)…” ledgers are in another group, and the rule already leaves them out.

Row kind (rule part)ExampleRowsBooked to cashToday
CASH + a separate word (WDL, PAID TO SELF, DEP, BY…)CASH CHEQUE/PAID TO SELF9595 (100%)found, 69% red
SELF + glued CHQPAID (missed today)SELF-CHQPAID- JETPUR1010 (100%)no suggestion
Glued CASHDEPOSITBY (missed today)CASHDEPOSITBY-SELF-…55 (100%)no suggestion
ATWATW-XXXXXX4821-S1ACJT07-JETPUR1313 (100%)found, 69% red
NWDNWD-XXXXXX4821-…98 (89%)found, 69% red
ATM (without POS)ATM WDL/S1CNR745/…86 (75%)found, 69% red
POS + ATM (a debit-card purchase)POS ATM PUR HP COCO …60 (0%)wrongly suggests Cash

All 3 withdrawals that were not booked to cash (1 NWD, 2 ATM) went to Suspense in the books. None went to another party. With POS rows left out, cash withdrawals are 126 of 129 right (97.7%). That is the same accuracy as today’s exact (auto-saved) rules (97.6% in the 12/10 audit). Cash deposits are 11 of 11, but that is a small sample. Also, a deposit is often a customer’s payment (“CASH DEP BY <party>”).

Try the options

Pick an option and a company setup, then click a row in the mock (or Tab into it) and use the keys. The steps are fixed when the review starts, as in the app. “Start again” runs the start again.

Option
Company
LedgerMap DEMO TEXTILES - CMP0042

Comparison

1 · Green suggestion2 · Auto-save withdrawals Recommended3 · Cash group4 · Ask once
Work for 17 cash rowsCtrl+Shift+Enter (all suggestions), or Enter twice on each rowNone. Check them in Review if you want.One Enter on the groupOne Enter per import, or none after “every import”
Wrong cash bookingLowest: you confirm each row, or all at onceAbout 2 in 100 withdrawals (the books use Suspense). Saved without asking, but listed under Cash Account in Review and easy to changeLow: one key books the group, but its rows are shown right belowLow per import. “Every import” then works like 2, with no reminder
Unsaved rows lost at export (alpha: 21 of 50)Still possible. Green rows sort last, below the rows that need thoughtNot for withdrawalsLess likely: the group is firstNot after Yes
Fits current app rulesYes, no UI changeYes. Exact matches already exist (UPI, account no., same narration) and show “Matched · …” in ReviewNew: a group header inside the shared table, which interacts with sorting, row selection and Alt+GNew: a modal before the steps are fixed, plus a per-party setting on the server
Several / no cash ledgersTwo: both suggested, yellow. None: Suspense + noteTwo: falls back to 1 (yellow). None: Suspense + noteTwo: Enter on the group asks which. None: no groupTwo: choose in the dialog. None: choose any ledger, or leave in Suspense
Cash depositsGreen suggestion (BY SELF); party first when namedNever auto-saved: green suggestionInside the group, counted separatelyNot in the question: they stay suggestions
Older installed appsSame benefitSame benefit (server decides; Review already shows “Matched · Looks like cash”)Need the updateNeed the update
EffortS: rule fixes + confidence by category + regenerate the tableM: S + exact level for cash withdrawals only + testsM–L: S + table grouping + keys + testsM: S + dialog + per-party setting + tracking + tests

Recommendation: Option 2, built on the rule fixes of Option 1

Cash withdrawals are the most common rows that need no thought, and the books show they are as safe as today’s exact rules. The alpha shows that a suggestion left unsaved is lost. If the app saves withdrawals itself, the user's attention goes to the rows that need it. Cash deposits, plain “ATM” rows and companies with two cash ledgers keep a real choice, so they stay suggestions with an honest green or yellow mark. Nothing is booked silently where the books show a real choice.

Rule changes I would make

  1. Glued cheque words. SELF together with a word that starts with CHQ or CHEQUE and ends with PAID or WDL (CHQPAID, CHQWDL). Keep the exclusion for NEFT, RTGS, IMPS, UPI, TRF and TRANSFER. (+10 of 10 in the books, +14 alpha rows)
  2. Glued cash words. A whole word CASH + DEPOSIT/DEP/WDL/WITHDRAWAL/PAID, optionally + BY or SELF (CASHDEPOSITBY, CASHWDL). The charge check still runs first, so CASHWITHDRAWCHR stays a bank charge. (+5 of 5)
  3. POS is not cash. ATM together with POS is a card purchase. Do not treat it as cash. (removes 6 wrong of 6)
  4. Measure confidence per category. Key the situation by the category's detail (category cash one alone instead of the pooled category one alone), then regenerate ledger_confidence_table.go with MATCHEVAL_CONFIDENCE=write. Cash should then measure about 95–98% (green). Loans, bills and the others get their own, more honest marks. This is a change for every category, so the replay must show that the ordering does not get worse.
  5. Cash withdrawal as an exact match (Option 2 only) when all of these hold: the row is a debit; it is a SELF cheque, ATW, NWD or CASH + WDL/WITHDRAWAL/PAID TO SELF (not plain ATM, not POS, not a deposit); the company has exactly one Cash-in-hand ledger; no other ledger's name is found in the narration; and no learned match (UPI, account no., same narration) points elsewhere. The learned matchers keep their higher rule order, so the user's own earlier choice still wins. In Review it shows “Matched · Looks like cash”, which today's app already renders.
  6. Cash deposits that name a party. Today, cash ranks before a ledger name, so “CASH DEP BY MAHAVIR TRADERS” suggests Cash first. Put the named ledger first and Cash second, and never auto-save. (Check with matcheval before keeping it.)
  7. No cash ledger (small UI follow-up, optional). The server says that a row looks like cash even when there is no ledger, and Suspense shows one note with “Choose one ledger for these N entries”.

Seen but out of scope: the charge IBCASHWDLCHGSINCL GST (₹59) is not found as a bank charge, because CHGS is inside the glued word, not at its end.