> 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/access/local-governance-stack/mcollect-mcs/mcollect-service-configuration/receipt-cancellation-ui-flow.md).

# Receipt Cancellation UI Flow

## **Search Receipt**

## **Overview**

Provide employees with the option to search receipts specific to a module, download receipts, check the current status and cancel selected receipts.

## Workflow Details

Once the user logins with the **CR\_PT** role, the system displays the Receipts module card along with the  Total Receipts count.

![](/files/-MgiGgKlIY_MDsf9OXcb)

Clicking on the Search Receipts redirects users to the Inbox/search receipt screen.

Route -[ ![](https://cdn.jsdelivr.net/npm/@egovernments/digit-ui-css/img/browser-icon.png)mSeva](https://qa.digit.org/digit-ui/employee/receipts/inbox)

![](/files/-MgiGgKntRRbFZhmJ4ZO)

Inbox File details\
<https://github.com/egovernments/digit-ui-internals/blob/main/packages/modules/receipts/src/pages/ReceiptInbox.js>

## Technical Implementation

MDMS Configs used in this inbox screen `ReceiptStatus` show the required status in the inbox similarly `uiCommonPay` fetches the service categories.

```
    MdmsCriteria: {
      tenantId: tenantId,
      moduleDetails: [
        {
          moduleName: "common-masters",
          masterDetails: [
            {
              name: "uiCommonPay"
            }
            {
              name: "ReceiptStatus"
            }
           ]
        },
      ]
    }
```

The Search and Cancel Receipts option is available only for enabled services. This is configured in uiCommonPay config by setting **true** the `cancelReceipt.`

```
arrears: true
billKey: "property-bill"
cancelReceipt: true
code: "PT"
headerBandLabel: "PT_COMMON_TABLE_COL_PT_ID"
receiptKey: "property-receipt"
```

**Table Structure**

* Uses the same table component similar to other modules.

#### Data fetch <a href="#data-fetch" id="data-fetch"></a>

* Once the data is fetched using `collection-services/payments/{selectedbusinessService}/_search` API is used to search and get the required receipt details.
* The Same API `collection-services/payments/{selectedbusinessService}/_search` with a flag `isCountRequest` to get the required count of total receipts.

## **Cancel Receipt**

On the search results page, users can click on the receipt number to cancel any receipt. The details of this are available in the following document - [View Receipt and Cancel](/local-governance/access/local-governance-stack/mcollect-mcs/mcollect-service-configuration/receipt-cancellation-ui-flow/view-receipt-cancel-ui-flow.md)

**Localisation Modules used**

rainmaker-common\
rainmaker-receipts

**To enable multiple business services -**

1. MDMS needs to be updated as`cancelReceipt : true`for that specific business service.
2. Role Actions, update the payment search and workflow API for the new USER Role.
3. Function logic should be updated to support multiple services. `getDefaultReceiptService = () => { return RECEIPTS_DEFAULT_SERVICE;}` <https://github.com/egovernments/digit-ui-internals/blob/main/packages/modules/receipts/src/utils/index.js>

## **Role Action Mapping**

Only the CR\_PT role is allowed to use this module.

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


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.digit.org/local-governance/access/local-governance-stack/mcollect-mcs/mcollect-service-configuration/receipt-cancellation-ui-flow.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
