"No actions to be made whether to Link or Not Link. Users should be able to select the Existing Payment Methods (make it a Searchable List - searchable by Name or Account Number)."
After you add a register, the prompt that offers it a KHQR / Bank payment is now a searchable list you pick from. There's no "Link" button to press any more — choosing the payment method is the action — and you can find one by name or by account number.
The account number was never sent to this screen — the list only ever received the name and the bank. Searching by account was impossible until that was added, which is also why each row can now show its account number: a field you can search by ought to be a field you can see.
Account numbers get written down a dozen ways, so the search ignores spaces and dashes in both directions —
typing 999888 finds an account stored as 999-888-777.
🐞 A real bug turned up, and it's the important part of this ship. Linking an existing payment method to a register has never actually worked — not with the new picker, and not with the old "Link" button either.
Attaching a method to a register changes no fields on the method itself, only which registers it belongs to. The code that saves it always tried to write a field change as well, and refused the request outright when there wasn't one — so the whole save was rejected and nothing was linked. It failed quietly enough that the dialog just sat there. Now fixed, and the checks confirm the link by reading it back out of the database rather than trusting the dialog to close.
Also hardened: a payment method whose bank isn't one of the recognised ones used to crash this list — the prompt would open with no methods at all, looking exactly like a shop with nothing set up. Found while testing, fixed, and covered.
| Suite | Result |
|---|---|
| Local, incl. controls against both bugs | 4/4 |
| Staging, driving the real flow end to end | 9/9 |
| Staging smoke regression | 5/5 |
The staging run adds a register for real, waits for the prompt, searches by name and by account, checks that a nonsense search returns nothing, then picks a method and reads the database to confirm the link — and separately confirms the methods it didn't pick were left alone. Everything it creates is removed afterwards, and the cleanup is itself a check. Run against the previous version, the linking check fails with the exact error the bug produced.
No database change was needed. Verified on staging.