====== #85 — A standalone "Credit" never touches the Customer Wallets balance (Resolved) ====== [[wiki:manara:bugs|← Back to Manara Bugs]] · [[https://mantis.matrixdn.net/view.php?id=85|View issue #85 in MantisBT]] ---- **Reported by:** Khaled Tarabay on 2026-07-27T12:15:05+01:00\\ **Assigned to:** Claude\\ **Resolved by:** Claude on 2026-07-27T12:47:56+01:00\\ **Severity:** major\\ **Priority:** normal\\ **Reproducibility:** always\\ **Category:** General **Description:** Issuing a Credit with no invoice attached the mechanism the form itself offers for "credits only" creates a row in Refunds & Credits but has zero effect on the customer's balance in the separate Customer Wallets module. This resolves a question a previous testing round planted but never answered in its own seed data (a $30 "Credit" on a "John Doe" row, annotated "Logic test: does issuing a credit affect the wallet balance?" left ambiguous because two unrelated customers are both named John Doe). Testing cleanly: a customer with zero wallet history was issued a $22.00 standalone credit. It appeared correctly in the Refunds & Credits list, but the customer never appeared in /wallet at all no balance created, nothing to spend. Combined with BUG-P02 above (the "Prepaid" payment method also doesn't touch Customer Wallets), the word "credit"/"prepaid" is used in three different places in this app and none of them talk to each other. **Steps to Reproduce:** Pick a customer absent from /wallet. Refunds & Credits → Record Refund / Credit → Type = Credit, leave Invoice = "none (credits only)", amount $22.00. Confirm the row appears in the Refunds & Credits list. Open /wallet — the customer still does not appear anywhere in the list. **Resolution:** NOT A BUG — confirmed as-designed, same reasoning already established for #80 ("Prepaid" payment method) applied to the "Credit" side of Refunds & Credits. A standalone Credit (Refunds & Credits, Type=Credit, no invoice attached) is an account-adjustment ledger entry in credit_notes — a record that the business owes the customer goodwill/an adjustment, with a reason and a reference. The Customer Wallets module (/wallet) is a SEPARATE, actual spendable prepaid balance (customer_wallets / wallet_transactions) that a customer tops up and draws down over time. Nothing in this app's design ever linked the two: a "Credit" here doesn't represent money loaded onto a spendable balance, it's a standalone note in the refunds/credits audit trail. This mirrors #80's "Prepaid" finding exactly — the word is shared across two unrelated systems (Refunds & Credits' "credit," Customer Wallets' balance, and the "Prepaid" payment method), and none of the three currently talk to each other by design, not by oversight. Automatically crediting a customer's Wallet balance every time a standalone Credit is recorded would be a genuine, consequential feature decision (it changes what "recording a Credit" means for every existing and future credit note, and would need its own validation — e.g. should Type=Credit require picking up a wallet row the way a refund now requires picking an invoice?) rather than a quick bug fix, so it isn't implemented here. If unifying these is actually wanted, it's worth raising as a scoped feature request (which of the three should be the source of truth, and does a standalone Credit optionally offer "also apply to this customer's wallet"?) rather than inferred from this report alone — happy to build it once that's decided. ===== Activity / Notes ===== * **2026-07-27T12:47:54+01:00 - Claude:** NOT A BUG — confirmed as-designed, same reasoning already established for #80 ("Prepaid" payment method) applied to the "Credit" side of Refunds & Credits. A standalone Credit (Refunds & Credits, Type=Credit, no invoice attached) is an account-adjustment ledger entry in credit_notes — a record that the business owes the customer goodwill/an adjustment, with a reason and a reference. The Customer Wallets module (/wallet) is a SEPARATE, actual spendable prepaid balance (customer_wallets / wallet_transactions) that a customer tops up and draws down over time. Nothing in this app's design ever linked the two: a "Credit" here doesn't represent money loaded onto a spendable balance, it's a standalone note in the refunds/credits audit trail. This mirrors #80's "Prepaid" finding exactly — the word is shared across two unrelated systems (Refunds & Credits' "credit," Customer Wallets' balance, and the "Prepaid" payment method), and none of the three currently talk to each other by design, not by oversight. Automatically crediting a customer's Wallet balance every time a standalone Credit is recorded would be a genuine, consequential feature decision (it changes what "recording a Credit" means for every existing and future credit note, and would need its own validation — e.g. should Type=Credit require picking up a wallet row the way a refund now requires picking an invoice?) rather than a quick bug fix, so it isn't implemented here. If unifying these is actually wanted, it's worth raising as a scoped feature request (which of the three should be the source of truth, and does a standalone Credit optionally offer "also apply to this customer's wallet"?) rather than inferred from this report alone — happy to build it once that's decided. ===== Full History ===== ^ Date ^ User ^ Field ^ Change ^ | 2026-07-27T12:15:05+01:00 | Khaled Tarabay | issue-new | New Issue | | 2026-07-27T12:47:49+01:00 | Claude | Assigned To | => Claudine | | 2026-07-27T12:47:52+01:00 | Claude | tag-added | Tag Attached: done-by-claude | | 2026-07-27T12:47:54+01:00 | Claude | note-added | Note Added: 0000044 | | 2026-07-27T12:47:56+01:00 | Claude | Status | new => resolved | ---- Synced automatically from MantisBT issue #85.