Retail Sale Return Day Limit and Approval - hmislk/hmis GitHub Wiki
Pharmacy retail sale returns are now protected by a time limit. A return can be processed freely for a short period after the original sale. After that, it can still be processed, but only with supervisor approval. After a longer outer limit, the return can no longer be processed at all.
This protects the pharmacy from very old, stale returns (where stock costing, batch pricing, or item pricing may have already changed) while still allowing genuine late returns to go through with proper oversight.
Note: The exact number of days for each stage is set by your administrator and can differ between hospitals โ see Configuration (Admin) below. The screenshots in this article use example values for illustration.
This applies automatically whenever you try to return a pharmacy retail sale, through either return path:
- Return Items and Payments (single-step return with refund) โ see Pharmacy Return โ Items and Payments
- Return Items Only, followed by a separate cash refund at the cashier โ see Pharmacy Return โ Items Only
You don't need to do anything differently for a normal, recent return โ the limit only comes into play once a sale is older than the configured "no approval needed" period.
| Stage | Bill age | What happens |
|---|---|---|
| 1. Within the normal window | Up to the first limit (e.g. 3 days) | Return proceeds as usual โ no extra steps. |
| 2. Approval required | Between the first and second limit (e.g. 4โ7 days) | The return is blocked until a supervisor approves a request for it. |
| 3. Beyond the outer limit | Older than the second limit (e.g. beyond 7 days) | The return is permanently blocked. There is no approval option. |
Search for the bill and click Accept Return Items & Refund (or Return Item Only) as normal. If the sale is within the configured no-approval window, the return proceeds exactly as before.
If the sale is older than the no-approval window but still within the outer limit, the search results row shows a message and a Request Approval button next to the return button:

- Click Request Approval
- A dialog opens with a Reason for Return Approval Request box
- Enter a clear reason for the late return (e.g. "Patient returned unused medication, verified by pharmacist")
- Click Submit Request
- You'll see the message "Approval request submitted."
The Accept Return Items & Refund button stays disabled until the request is approved. If you click it before approval, you'll see an error message explaining how many days old the bill is and that approval is required.
A staff member with the return-approval permission reviews and approves the request:
- Go to Common โ Requests (or wherever your hospital's request list is accessed) and open the pending request
- Click To Approve on the request row
- Review the patient, bill, and request details on the approval page
- Click Approve (or Reject with a reason, if the return should not proceed)

Once approved, the pharmacist can return to the search page and process the return normally โ the Request Approval button disappears and Accept Return Items & Refund becomes available again.

If the sale is older than the outer limit, only the return button is shown, and it stays disabled โ there is no Request Approval option and no way to override it. Contact your administrator if a return genuinely needs to be processed this late; the day limits themselves are configurable (see below).

The same rule applies identically on the Return Item Only search page for the two-step return flow:

Note: Once you've completed the item-return step, the follow-up cash refund step at the cashier is not re-checked against the day limit โ so a slow cashier won't accidentally block a refund that was already properly started by the pharmacist.
| Message | Meaning |
|---|---|
| "Approval request submitted." | Your request has been sent for review. The return cannot proceed until it is approved. |
| "Successfully Approved" | The reviewer has approved the return request. The original pharmacist can now complete the return. |
| "Successfully Returned" | The return has been completed. |
| Message | Meaning | What To Do |
|---|---|---|
| "This bill is N days old. Returns after X days require an approved request. Please request approval." | The sale is older than the no-approval window but still within the outer limit. | Click Request Approval and submit a reason. |
| "This bill is N days old. Returns are not allowed after X days." | The sale is older than the outer limit. | The return cannot be processed through this workflow. Contact your administrator. |
| "You are not authorized to approve pharmacy retail sale return requests." | You don't have the permission needed to approve this type of request. | Ask an administrator to grant you the approval permission, or have someone else approve it. |
| "Comment is Missing" (when rejecting) | A reason is required to reject a request. | Enter a reason before rejecting. |
- Return promptly. Processing returns within the no-approval window avoids the extra approval step entirely.
- Write a clear reason when requesting approval โ the reviewer only sees this text to decide whether to approve.
- Don't wait until the outer limit to request approval โ if the approval process takes a day or two, request it as soon as you know a late return is needed, not right at the deadline.
- Reviewers should check the bill details (patient, bill date, net total) shown on the approval page before approving, not just the reason text.
Cause: Either the bill is still within the no-approval window (no request needed โ just return normally), or it's already past the outer limit (no approval is possible at all).
Solution: Check the error message shown when you try to return โ it tells you exactly how old the bill is and which limit applies.
Cause: The pharmacist may be looking at a cached search results page from before the approval.
Solution: Have them re-search for the bill so the page re-checks the current approval status.
Cause: You may not have selected the right date range, or the request was created in a different department.
Solution: Widen the search date range and confirm you're searching from the same department the return was requested from.
Two settings control the thresholds, both configured under Application Options:
| Setting | Default | Meaning |
|---|---|---|
| Pharmacy Retail Sale Return - Days Allowed Without Approval | 3 days | Returns within this many days of the sale need no approval. |
| Pharmacy Retail Sale Return - Days Allowed With Approval | 7 days | Returns within this many days of the sale are still possible, but require an approved request. Beyond this, returns are permanently blocked. |
Both values can be changed per hospital under Administration โ Application Options by searching for the setting name and editing its value.
| Task | Required Permission |
|---|---|
| Approve or reject a return approval request | Pharmacy Retail Sale Return Approval |
An administrator must grant this permission to any staff member who needs to review and approve these requests.
Q: Does this apply to returns of items issued to wards or other departments? A: No โ this limit applies only to retail (walk-in/OPD) sale returns processed through the retail sale return pages.
Q: What happens if my approval request is rejected? A: The return cannot proceed. You can submit a new request with additional information if the circumstances change, or discuss with your supervisor.
Q: Can the cashier's cash-refund step also get blocked by this rule? A: No. Once the item-return step has been allowed (either directly, or after approval), the follow-up cash refund step is not re-checked.
Q: Who decides the day limits for our hospital? A: Your system administrator sets these under Application Options โ see Configuration (Admin).
- Pharmacy Return โ Items and Payments โ the single-step return workflow this limit applies to
- Pharmacy Return โ Items Only โ the first step of the two-step return workflow
- Pharmacy Navigation Guide โ full pharmacy module navigation