> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/local-governance/v2.8/platform/configure-digit/configuring-digit-services/mcs-service-configuration/receipt-cancellation-ui-flow/view-receipt-cancel-ui-flow.md).

# View Receipt - Cancel UI Flow

## **Overview**

Provide employees with the option to Cancel a Receipt for a specific receipt number.

## Workflow Details

Route -[ ![](https://cdn.jsdelivr.net/npm/@egovernments/digit-ui-css/img/browser-icon.png)mSeva](https://qa.digit.org/digit-ui/employee/receipts/details/PT/PT%2F107%2F2021-22%2F226438)

![](https://1885278393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYtUmELy66UydIQtJOn5%2Fuploads%2FlURTnIT2tKTzTUD5ZEbF%2Fimage%20\(236\).png?alt=media)

## **View Receipt**

The search page displays the receipts. Click on the specific receipt number navigates the user to view the receipt details.

View receipt details are available here <https://github.com/egovernments/digit-ui-internals/blob/main/packages/modules/receipts/src/pages/ReceiptDetails.js>

## **Technical Implementation**&#x20;

The initial MDMS call is made on page load. CancelReceiptReason MDMS is used to display multiple reasons for cancelling.

```
     moduleDetails: [
        {
          moduleName: "common-masters",
          masterDetails: [
            {
              name: "CancelReceiptReason"
            }
          ]
        }
      ]
```

## **Cancel Receipt**

Action modal - This appears with the click of Cancel Receipt.\
The cancel receipt action is shown only for the following state of receipt.

`Receipt?.paymentStatus !== "CANCELLED" && Receipt?.paymentStatus !== "DEPOSITED" && (Receipt?.instrumentStatus == "APPROVED" || Receipt?.instrumentStatus == "REMITTED"`

![](https://1885278393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYtUmELy66UydIQtJOn5%2Fuploads%2FgFa6YpodzIIlGf8AGa2G%2Fimage%20\(224\).png?alt=media)

**Data fetch, load and render**

Once the Receipt is searched using `collection-services/payments/{selectedbusinessService}/_search` API, the user can cancel the receipt using `/collection-services/payments/{selectedbusinessService}/_workflow` API

**Acknowledgement screen**\
It gets shown once the cancel receipt is clicked.\
File details - <https://github.com/egovernments/digit-ui-internals/blob/main/packages/modules/receipts/src/pages/ReceiptAcknowledgement.js>

## **Role Action Mapping**

| API                                          | Roles   | Action ID |
| -------------------------------------------- | ------- | --------- |
| `egov-mdms-service/v1/_search`               | `CR_PT` | `954`     |
| `collection-services/payments/PT/_search`    | `CR_PT` | `2029`    |
| `/collection-services/payments/PT/_workflow` | `CR_PT` | `2028`    |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.digit.org/local-governance/v2.8/platform/configure-digit/configuring-digit-services/mcs-service-configuration/receipt-cancellation-ui-flow/view-receipt-cancel-ui-flow.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
