Refund
- Code: PUR-RF
- Module: Purchasing
- Type: Transaction
1. Overview
A Refund is the record of money actually returned by a supplier to the store against a Credit Note. A Refund stands in relation to a Credit Note exactly as a payment stands in relation to a bill: where a payment records money going out from the store to the supplier, a Refund records money coming in from the supplier to the store. Every Refund states the person in charge who received the money and may be accompanied by proof. A Refund has no page of its own — it is recorded and read from inside the detail of its parent Credit Note.
Expected outcome: “the supplier recognizes the credit” and “the supplier has returned the money” become two separate facts that are both visible, so the remaining credit still hanging with the supplier is always a figure, not an estimate.
2. Problem
Without recording Refunds, a Credit Note can only state that the supplier recognizes credit, without being able to state whether the money has come back. The two things get mixed into one, even though in practice they are often weeks apart and frequently paid in installments. As a result:
- Credit that has been paid out and credit still hanging read the same, so finance staff chase suppliers who have actually already paid.
- Installment returns cannot be recorded, so staff record them outside the system and the figures never match.
- There is no limit keeping the amount of money recorded as received from exceeding the credit the supplier recognizes.
- It is unclear who received the money from the supplier and what the proof is, so cash differences are hard to trace.
3. Goals & Non-goals
3.1 Goals
- Money returned by a supplier is recorded as an event of its own, whether in full or in installments, and may happen more than once for one Credit Note.
- The remaining credit is always calculated from the difference between the Credit Note value and the money already received, so there are never two figures that contradict each other.
- The amount of money recorded as received never exceeds the credit the supplier recognizes.
- Every Refund has a clear person in charge, and its proof is stored attached to its record.
- Typing mistakes can be cleaned up without leaving false figures in the remaining credit or the Credit Note status.
3.2 Non-goals
- Replacement goods from the supplier; those come in through the Purchase Order and Goods Receipt flow, not Refunds.
- Deducting the remaining credit from a later bill; that is the Credit Note’s business and has not been built.
- Automatic reconciliation against bank account transactions.
- Expiry rules for credit that is never returned.
- Correcting the amount of a Refund already recorded; one that is wrong is deleted, not edited.
4. Business Rules
Business rules are the set of provisions and constraints that apply to Refunds throughout the application, on every screen and action that involves it, whoever performs it. These rules are the single source of truth: if another part of this PRD appears to differ, the rules here prevail.
- BR-01 A Refund can only be recorded on a Credit Note in Submitted or Partially Refunded status. A Draft Credit Note is rejected because its credit has not been recognized yet, and a Refunded Credit Note is rejected because its credit has already been returned in full.
- BR-02 The amount of every Refund must be greater than zero with at most 2 decimal places, and the sum of all Refunds on one Credit Note must not exceed the Credit Note Total. This limit is checked against the unrounded Credit Note Total before a new Refund is accepted.
- BR-03 The Remaining Credit is derived from the Credit Note Total minus the sum of all Refunds. If stored, its value is only a copy recalculated from all remaining Refunds by the single writer, never partially added to or subtracted from. Every time a Refund is recorded, the Credit Note status becomes Partially Refunded if the Remaining Credit is still above zero, or Refunded if the Remaining Credit is zero. A Credit Note Total with more than 2 decimal places cannot reach a Remaining Credit of zero through 2-decimal Refunds, so a remainder below Rp 0.01 keeps the Credit Note Partially Refunded; how to settle it Needs confirmation.
- BR-04 Partial Refunds are allowed, and one Credit Note may have more than one Refund, limited only by BR-02.
- BR-05 A Credit Note that never receives a Refund is a legitimate state and is not considered an error; it means the supplier is still holding the credit.
- BR-06 A Refund is Submitted from the moment it is recorded, and its content cannot be changed afterwards, except the Person in Charge. The amount, method, time, note, and proof stay fixed; the Person in Charge may be corrected by a holder of the assign permission in any Credit Note status, because correcting who handled the money is not a movement of money. Recording a Refund means declaring that the money has come in, not submitting a proposal to be approved.
- BR-07 A Refund recorded incorrectly is deleted, not corrected, including on a Credit Note that is already Refunded. Deletion requires a reason, and a deleted Refund stays stored as an uncounted, hidden trace, not gone. Deleting means the money never actually came in: the Remaining Credit is recalculated, then the Credit Note status becomes Partially Refunded if Refunds remain, or returns to Submitted if there are none left.
- BR-08 Every recording, deletion, and Person in Charge change of a Refund is recorded in the activity log of its parent Credit Note along with the actor, time, and the reason for deletion.
- BR-09 The Refund amount limit is checked against the Credit Note’s state at save time, not against the figure shown on screen. Recording and deleting Refunds on the same Credit Note are processed one at a time, so two simultaneous recordings cannot both pass if their sum exceeds the Credit Note Total, and the status and Remaining Credit are always calculated from the Refunds that actually remain. Deleting a Refund that has already been deleted changes nothing.
- BR-10 Every Refund must state at least one person in charge from the Credit Note store’s employees, namely the person who received or handled the money from the supplier.
- BR-11 A Refund may attach proof of return as more than one file, or attach nothing; attachments are only evidence and do not affect the Remaining Credit or status. At most 10 files, each at most 2 MB, of type PDF, JPG, JPEG, PNG, or WEBP.
- BR-12 Resubmitting the same Refund recording, due to a double click or a dropped connection, never produces a second Refund. Every form submission carries a unique marker, and a marker already accepted for the same Credit Note returns the Refund already recorded.
5. Flow
5.1 Main Flowchart
- Credit Note in Submitted or Partially Refunded status — A Refund can only be recorded on a Credit Note whose credit has been recognized and is not yet settled (BR-01). The details are explained in a separate PRD.
- Record Refund — Finance staff fill in the date, method, the amount of money received from the supplier, and the person in charge, and may attach proof (BR-10, BR-11).
- Validate Amount — The new amount plus all earlier Refunds is checked against the Credit Note Total. Anything exceeding the limit is rejected before saving (BR-02, BR-09).
- Submitted — The only Refund status, set from the moment of recording. Its content can no longer be changed (BR-06).
- Recalculate Remaining Credit and Credit Note Status — Every time a Refund is recorded or deleted, the Remaining Credit on the Credit Note is recalculated from the difference between its total and all Refunds still recorded, then the Credit Note status is set again (BR-03, BR-07).
- Remaining Credit? — The calculation result determines the Credit Note’s next status.
- Credit Note Submitted — No Refunds remain recorded because all have been deleted; the Credit Note returns to how it was when newly submitted (BR-07).
- Credit Note Partially Refunded — Credit remains, and further Refunds can still be recorded (BR-04).
- Credit Note Refunded — The remaining credit is used up, so the Credit Note stops accepting new Refunds.
- Deleted — A Refund recorded incorrectly is deleted along with its reason, from a Credit Note that is Partially Refunded or Refunded, then the Remaining Credit and Credit Note status are recalculated as in step 5 (BR-07).
5.2 Status Lifecycle
| Status | Description | Next |
|---|---|---|
Submittedsubmitted | The money has been received from the supplier and counts as reducing the Remaining Credit | — |
A Refund has no Draft or Cancelled status: one recorded incorrectly is deleted, not moved to another status (BR-06, BR-07).
6. Document Structure
This section defines the content of the Refund document itself: which fields it has, their type, which are required, their initial values, and their value rules. The provisions here apply wherever the Refund is recorded and are enforced on save, regardless of how the field is displayed. A Refund has no product lines and no calculations of its own; its derived figure is the Remaining Credit calculated on the Credit Note.
6.1 General
| Field | Type | Required | Default | Rules |
|---|---|---|---|---|
| Refund Number | Text | — | Generated on save | Set by the system in the format RFD/{Store Code}/{Year}/{000000}, cannot be changed |
| Credit Note | Ref. Credit Note | — | The Credit Note the Refund is recorded on | Set by the system; must be in Submitted or Partially Refunded status (BR-01) |
| Store | Ref. Store | — | The Credit Note’s store | Set by the system, cannot be changed |
| Refund Date & Time | Date & Time | Yes | Now | — |
| Refund Method | Enum | Yes | — | Cash, Bank Transfer, Giro, Credit Card, or Other |
| Refund Amount | Currency | Yes | The Credit Note’s Remaining Credit | Greater than 0, at most 2 decimal places, and not exceeding the Remaining Credit (BR-02) |
| Person in Charge | Ref. Employee, multiple | Yes | The logged-in user’s employee record, if they are an employee of the Credit Note’s store | At least one employee of the Credit Note’s store (BR-10) |
| Refund Proof | File, multiple | No | — | Images or documents, for example proof of transfer; at most 10 files, 2 MB each, PDF/JPG/JPEG/PNG/WEBP (BR-11) |
| Notes | Text | No | — | — |
| Deletion Reason | Text | Yes, when deleted | — | Required on the Delete action (BR-07) |
| Status | Enum | — | Submitted | Set by the system; see Status Lifecycle |
7. UI Structure
This section defines how Refunds are displayed and operated. A Refund has no list page, filters, or PDF of its own: its entire surface lives inside the Refunds tab on the Credit Note detail, and reading it follows the view Credit Note detail permission. This section only governs display and interaction; content and value rules still follow Document Structure.
7.1 Refund Card
| Column | Sample Value | Component |
|---|---|---|
| Title | Refund 1 | Text |
| Refund Number | RFD/CBI/2026/000031 | Text |
| Refund Date & Time | 24 Sep 2026, 10:15 | Date |
| Refund Method | Bank Transfer | Badge |
| Refund Amount | Rp 200,000 | Currency |
| Person in Charge | Andi, Sari | Text |
| Refund Proof | transfer-proof.jpg | Thumbnail, Link |
| Notes | Received in the store’s bank account | Text |
| Actions | Delete | Action Menu |
7.2 Form
| Field | Control | Options Source | Behavior |
|---|---|---|---|
| Refund Date & Time | Date Time Picker | — | Defaults to now |
| Refund Method | Single Select | Refund method enum | — |
| Refund Amount | Currency Input | — | Defaults to the Remaining Credit; exceeding the Remaining Credit → error on the field |
| Person in Charge | Multi Select | The Credit Note store’s employees | Defaults to the logged-in user’s employee record, if they are an employee of that store |
| Refund Proof | File Uploader, multiple | — | Optional |
| Notes | Textarea | — | — |
The form opens as a dialog from the Add Refund button in the Refunds tab, and that button only appears while the Credit Note is in Submitted or Partially Refunded status. The Save button is disabled while saving is in progress.
7.3 Delete Dialog
| Field | Control | Options Source | Behavior |
|---|---|---|---|
| Deletion Reason | Textarea | — | Empty → the confirm button is disabled |
8. User Stories
US-01 - Record a full refund
As finance staff, I want to record the return of money equal to the whole credit note value, so that the credit is closed and no longer appears as a claim against the supplier.
| ID | Acceptance criteria |
|---|---|
| AC-01.1 | The Add Refund button only appears on Credit Notes in Submitted or Partially Refunded status for users with the create permission in the active store (BR-01). |
| AC-01.2 | The Refund amount is filled in by default with the Remaining Credit truncated to 2 decimal places, and can be changed to a smaller value (BR-02). |
| AC-01.3 | The form requires the date & time, method, amount, and at least one person in charge (default the logged-in user); refund proof and notes are optional (BR-10, BR-11). |
| AC-01.4 | After saving, the Refund is immediately Submitted and the Remaining Credit becomes Rp 0 (BR-03, BR-06). |
| AC-01.5 | The Credit Note moves to Refunded status without a separate action, and the Add Refund button disappears (BR-03). |
US-02 - Record a partial refund
As finance staff, I want to record installment returns, so that money already received is visible without waiting for the supplier to settle everything.
| ID | Acceptance criteria |
|---|---|
| AC-02.1 | After the Refund is saved, the Remaining Credit equals the Credit Note Total minus the sum of all Refunds (BR-03). |
| AC-02.2 | The Credit Note moves to Partially Refunded status without a separate action as long as the Remaining Credit is still above zero (BR-03). |
| AC-02.3 | A second, third, and further Refund can still be recorded as long as their total stays within the limit (BR-02, BR-04). |
| AC-02.4 | Each Refund appears as its own card in order of the time it was recorded, along with its person in charge and proof preview. |
US-03 - Reject refunds exceeding the remaining credit
As the system, I want to reject a Refund whose amount exceeds the remaining credit, so that the money recorded as received is never greater than the credit the supplier recognizes.
| ID | Acceptance criteria |
|---|---|
| AC-03.1 | A Refund is rejected when its new amount plus all earlier Refunds exceeds the Credit Note Total, before saving (BR-02). |
| AC-03.2 | The error message appears on the Refund Amount field, not as a general page error. |
| AC-03.3 | A Refund on a Credit Note in Draft or Refunded status is rejected (BR-01). |
| AC-03.4 | A Refund amount of zero or negative is rejected (BR-02). |
| AC-03.5 | A Refund without a person in charge is rejected (BR-10). |
| AC-03.6 | Two Refunds are recorded on the same Credit Note at the same time — only one passes if their sum exceeds the Credit Note Total (BR-09). |
| AC-03.7 | The same form is submitted twice due to a double click or dropped connection — only one Refund is recorded, and the second submission shows the Refund that already exists (BR-12). |
| AC-03.8 | A Refund is recorded at the same time as another Refund on the same Credit Note is deleted — both are processed in sequence, and the final Remaining Credit and status match the Refunds that actually remain (BR-03, BR-09). |
US-04 - Leave credit without a refund
As finance staff, I want a Credit Note without a Refund to still be considered normal, so that credit the supplier deliberately holds is not read as a data error.
| ID | Acceptance criteria |
|---|---|
| AC-04.1 | A Credit Note with its full Remaining Credit and no Refund stays valid and in Submitted status with no time limit (BR-05). |
| AC-04.2 | The Refunds tab appears empty with the Remaining Credit summary still filled in. |
US-05 - Delete a refund recorded incorrectly
As finance staff, I want to delete a Refund with a typing mistake, so that the remaining credit and the Credit Note status return to the correct state.
| ID | Acceptance criteria |
|---|---|
| AC-05.1 | The Delete action is available on every Refund card for users with the delete permission in the active store, including on a Credit Note in Refunded status; the confirmation dialog requires a deletion reason (BR-07). |
| AC-05.2 | After deletion, the Remaining Credit is recalculated without that Refund (BR-03, BR-07). |
| AC-05.3 | Other Refunds are still recorded — the Credit Note is in Partially Refunded status and can receive Refunds again (BR-07). |
| AC-05.4 | No other Refunds are recorded — the Credit Note returns to Submitted status (BR-07). |
| AC-05.5 | A Refund’s amount, method, time, note, and proof cannot be changed; the only correction is to delete and record again (BR-06). |
| AC-05.6 | The deletion, its reason, and the Credit Note status transition are recorded in the Credit Note’s activity log along with the actor and time (BR-08). |
| AC-05.7 | The same Refund is deleted twice, for example due to a double click — the second deletion changes neither the Remaining Credit nor the status (BR-09). |
| AC-05.8 | A deleted Refund no longer appears as a card and is not counted, but can still be traced through the Credit Note’s activity log (BR-07). |
| AC-05.9 | A user with the assign permission in the active store can change the Person in Charge of a Refund, including on a Credit Note in Refunded status; the choices are limited to the Credit Note store’s employees, and the change is recorded in the Credit Note’s activity log (BR-06, BR-08, BR-10). |
9. User Scenarios
| Role | Scenario |
|---|---|
| Finance Staff | Receives a transfer from the supplier for the whole value of the Credit Note, records it as one Refund with the proof of transfer attached, and sees the Credit Note move by itself to Refunded |
| Finance Staff | Records two cash returns from the supplier’s salesperson during two different visits on the same Credit Note, with the cashier who received the money as the person in charge |
| Finance Staff | Mistypes the amount on the settlement Refund, deletes it so the Credit Note returns to Partially Refunded, then records it again with the correct figure |
| Owner | Sees a two-month-old Credit Note without a single Refund, then asks finance staff to chase the supplier |
10. Permissions & Actions
10.1 Permission by Action
| Action | Permission | Condition |
|---|---|---|
| View Refund | — | Follows the view Credit Note detail permission |
| Record Refund | purchase:refund:create:store | Store is active |
| Change Person in Charge | purchase:refund:assign:store | Store is active |
| Download Refund Proof | — | Follows the view Credit Note detail permission |
| Delete Refund | purchase:refund:delete:store | Store is active |
There are no separate list and view permissions: Refunds are read through their parent Credit Note, not from a list page. There are no submit or update permissions: recording a Refund already means submitting it (BR-06), and its content cannot be changed except the Person in Charge, which uses the assign permission.
10.2 Action by Status
| Action | Submitted |
|---|---|
| View Refund | ✓ |
| Download Refund Proof | ✓ |
| Change Person in Charge | ✓ |
| Delete Refund | ✓ |
Record Refund is not in this matrix because it depends on the parent Credit Note’s status, not the Refund’s status; see Action by Status in Credit Note. A Refund’s activity log is read from its parent Credit Note’s log (BR-08).
11. Notifications
This feature does not trigger any notifications.
12. Dependencies
Related PRDs
- Credit Note — the mandatory parent, the determinant of the Refund amount limit, where the Remaining Credit is calculated, and the document whose status follows the Refunds (BR-01, BR-02, BR-03, BR-07).
- Purchase Return — an indirect relation: a Return whose Credit Note has been submitted cannot be cancelled, so a Refund never loses its parent.
Master data
- Stores — the active store, active status, and employees (persons in charge) (BR-10).
- File Manager — storage for attached refund proof (BR-11).
Effects on other modules
- Credit Note — the Remaining Credit decreases when a Refund is recorded and is recalculated when it is deleted; the Credit Note moves between Submitted, Partially Refunded, and Refunded because of it (BR-03, BR-07).
- A Refund does not change stock, does not change any Bill, and does not change any Return.
- Finance — the Refund amount becomes the basis for matching money coming in from suppliers.
- Every recording and deletion is recorded in the Credit Note’s activity log (BR-08).