Closing a receipt
Use this page when receiving is finished. Closing seals the document. It cannot be undone.
Before you start
- Select one receipt. The receipt is
Open,InProgressorOnHold. The buttonClose Receiptis grey for other statuses. - You have the web action
receipt_closeand the API rightreceipt_close. By default onlyADMINandMANAGERhave them. See Who can do what. - Every serial-capture session on the receipt is finished or cancelled.
- Every damage record has a final disposition. See Reporting damage.
- If the receipt has a discrepancy, a supervisor must agree. See "Discrepancy" below.
Steps
- Open
Inbound > Receipts. - Tick one receipt.
- Click
Close Receipt. The windowClose Receiptopens. It saysClosing a receipt is final. Any shortage or excess is recorded in the close summary. - Click
Close Receiptin the window. ClickNot Nowto leave without closing. - If the window now says
A supervisor must authorise this. Ask one to enter their username and password., the fieldsSupervisor usernameandSupervisor passwordappear. A supervisor types them on your screen. ClickClose Receiptagain.
The window has no other fields. The screen sends the version of the receipt that you saw when you ticked it (crates/services/web-ui-server/src/extensions/customization/receipt/lifecycle_action.rs:433-438).
Discrepancy
The receipt has a discrepancy when:
- the completion is
Partial, or - the completion is
OverorPendingand the lines expected some quantity.
A receipt with no plan (blind receiving, returns) that is Over, and a receipt that is Full, close with no question.
Source: crates/libs/wms-inbound/src/repo/completion_compute.rs:236-245.
For a discrepancy two things must be true:
- The system setting
ALLOW_CLOSE_WITH_DISCREPANCYis on. It is on in a new database (value1,wms-appmigration001_baseline.sql). When it is off the close is refused for everyone (code 71, not overridable). - Someone with the right agrees. Either the user who presses the button holds the right
receipt.override_close_discrepancy(by default onlySUPERVISOR), or a supervisor types a username and a password in the window. The supervisor's password is used once and is not stored.
Source: crates/libs/wms-inbound/src/service/receipt/lifecycle/close_receipt.rs:195-262.
What the screen says
| Result | Message |
|---|---|
| Closed | Receipt closed |
| A supervisor is needed | The window shows the supervisor fields and the text of the refusal. |
| Refused | The message of the refusal, see below. |
After success the window closes and the list is read again.
What changes
| What | Change |
|---|---|
| Receipt | status becomes Closed. completion is calculated again. close_date is set. close_summary is written. The version goes up. |
| Lines | Every line that is not Cancelled becomes Closed. |
| Events | process.receipt.closed and process.receipt.ready_for_putaway. |
| Stock | Nothing changes. Stock was made when you received. |
The summary also records who agreed to a discrepancy. See Summary tab.
Closing a receipt that is already Closed does nothing and gives no error (crates/libs/wms-inbound/src/domain/receipt/aggregate.rs:206-207).
What can go wrong
| Code | Message | Meaning | Fix |
|---|---|---|---|
| 71 | Receipt {number} is Partial — supervisor override required to close (also Over, Pending) | There is a discrepancy. | Ask a supervisor to enter their username and password. |
| 71 | You don't have permission to close receipt {number} with a discrepancy. Ask a supervisor. | You tried to agree to a discrepancy without the right. | Ask a supervisor. |
| 71 | Cannot close receipt {number}: completion is {completion} and ALLOW_CLOSE_WITH_DISCREPANCY is off | The setting forbids it. | Receive the missing goods, or ask an administrator to change the setting. |
| 73 | Receipt {number} has {n} unresolved serial-capture episode(s): {list}. {hint} | A serial capture is not finished. | Finish or cancel it. See Capturing serial numbers. |
| 77 | Receipt {number} has {n} damage record(s) awaiting final disposition | A damage record has no disposition. | Set the disposition on the Damage Records tab. |
| 40 | A version conflict. The exact text is not confirmed, see the note below. | The receipt changed after you ticked it. | Refresh the list and try again. |
| 70 | Receipt {number} is Cancelled — it cannot be closed. | The receipt is finished. | None possible. |
| 70 | Receipt {number} is {status} — it cannot be closed. | The status does not allow it. | None possible. |
Code 73 and code 77 cannot be overridden, not even by a supervisor.
The messages with {number} use the receipt number in this window. The messages of putting on hold use the internal id.
Sources: close_receipt.rs:131-176, crates/services/web-ui-server/src/extensions/customization/receipt/error_message.rs:105-135.
Not confirmed by code: the exact text the window shows for a version conflict (code 40). To verify: open the list in two browsers, change the receipt in one (put on hold), then press
Close Receiptin the other.
Related pages
- Cancelling a receipt
- Summary tab
- Receipt statuses and transitions
- Return codes
- API:
receipt_close. It is a stateful command. The version of the receipt goes indata. - RF terminal: none.