> 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/current-bill-cancellation-ui-flow.md).

# Current Bill Cancellation UI Flow

## Overview

Once the user logs in with `WS_CEMP` **or** `SW_CEMP` roles the BillGenie tree option is available on the left panel of the screen.

## Workflow Details

<div align="left"><img src="/files/-MgiGgYdsgtJHQ3hjOw-" alt=""></div>

Clicking on the BillGenie displays two options as seen in the screenshot below.

<div align="left"><img src="/files/-MgiGgYic4Fxrcn9Fi8-" alt=""></div>

Click on the Bill Cancellation option. This routes the user to the search bill screen.

### **Search Bill**

**Objective:** This option allows employees to search for active bills, download bills, or cancel bills.

For instance, a bill can be cancelled if the tax head information is entered wrong in a bill.&#x20;

Route -[ mSeva](https://qa.digit.org/employee/bills/billSearch)

![](/files/-MgiGgYm1Ahjq4bZlfl1)

## Technical Implementation

* Initial page - [<img src="https://github.com/fluidicon.png" alt="" data-size="line">frontend/billSearch.js at master · egovernments/frontend](https://github.com/egovernments/frontend/blob/master/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/bills/billSearch.js)
* Initial MDMS call is made on page load

<div align="left"><img src="/files/-MgiGgYsiCaFNICx5X50" alt=""></div>

{% hint style="info" %}
Note: The search, cancel bill and service category options are available only for enabled services. This is configured in uiCommonPay config by marking the following`cancelBill` path as **true**.

[<img src="https://github.com/fluidicon.png" alt="" data-size="line">egov-mdms-data/uiCommonPay.json at QA · egovernments/egov-mdms-data](https://github.com/egovernments/egov-mdms-data/blob/QA/data/pb/common-masters/uiCommonPay.json)
{% endhint %}

Example:

```
{
   "code": "WS",
   "headerBandLabel": "PAYMENT_COMMON_CONSUMER_CODE",
   "pdfModule":"WNS",
   "receiptKey": "ws-onetime-receipt",
   "cancelReceipt":false,
   "cancelBill": true,
   "billKey": "ws-bill",
   "arrears": true,
   "buttons": [
    {
      "label": "COMMON_BUTTON_HOME",
      "citizenUrl": "/wns-citizen/home",
      "employeeUrl": "/wns/search"
    }
  ]
}
```

* Form rendering details available in[ <img src="https://github.com/fluidicon.png" alt="" data-size="line">frontend/billSearchCard.js at master · egovernments/frontend](https://github.com/egovernments/frontend/blob/master/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/bills/billSearchResources/billSearchCard.js)
* Table rendering details available in[ <img src="https://github.com/fluidicon.png" alt="" data-size="line">frontend/searchResults.js at master · egovernments/frontend](https://github.com/egovernments/frontend/blob/master/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/bills/billSearchResources/searchResults.js)
* The Bill Search API and formatting data is available in[ <img src="https://github.com/fluidicon.png" alt="" data-size="line">frontend/function.js at master · egovernments/frontend](https://github.com/egovernments/frontend/blob/master/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/bills/billSearchResources/function.js)

**Table Structure**

* `MUIDataTable` is used to implement the table component.
* Every column entry is treated as an object.

```
{
   labelName: "Bill No.",
   labelKey: "ABG_COMMON_TABLE_COL_BILL_NO"
}
```

* Any customizations at column level are done through the `customBodyRender` hook available with the *option* property of the columns.

![](/files/-MgiGgZ1akOcfUBqoV0v)

#### Data fetch, load and render <a href="#data-fetch-load-and-render" id="data-fetch-load-and-render"></a>

Once the data is fetched using `egov-searcher/bill-genie/billswithaddranduser/_get` API, the returned data is formatted and dispatched to redux.

[<img src="https://github.com/fluidicon.png" alt="" data-size="line">frontend/function.js at master · egovernments/frontend](https://github.com/egovernments/frontend/blob/master/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/bills/billSearchResources/function.js)![](blob:https://digit-discuss.atlassian.net/d7d401f7-90dc-4940-8293-37c3c8fd2a08#media-blob-url=true\&id=379cbc6b-f53c-43ed-8a5b-e3922078b84d\&collection=contentId-1847263265\&contextId=1847263265\&mimeType=image%2Fpng\&name=image-20210727-103850.png\&size=111637\&width=947\&height=491)

![](/files/-MgiGgZ4PhHcJaUf5pS8)

As seen in the above screenshot, the data is assigned to a specific path inside props.

[<img src="https://github.com/fluidicon.png" alt="" data-size="line">frontend/searchResults.js at master · egovernments/frontend](https://github.com/egovernments/frontend/blob/master/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/bills/billSearchResources/searchResults.js)

![](/files/-MgiGgZPW1D-LUxxWdhu)

The table component now fetches the data from its props as shown below.

![](/files/-MgiGgZYofihf4-ors8x)

To cancel bills, employees have to click on the Cancel Bill option. The system navigates to the Bill Details page that displays the bill amount and other details. The bill can be cancelled from this page.[ ](https://github.com/egovernments/frontend/blob/master/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/bills/viewBill.js)

[<img src="https://github.com/fluidicon.png" alt="" data-size="line">frontend/viewBill.js at master · egovernments/frontend](https://github.com/egovernments/frontend/blob/master/web/rainmaker/dev-packages/egov-abg-dev/src/ui-config/screens/specs/bills/viewBill.js)

For bill details refer to the document here - [Bill Details](/local-governance/access/local-governance-stack/mcollect-mcs/mcollect-service-configuration/current-bill-cancellation-ui-flow/bill-details-ui-flow.md).

#### **API Used**

1. `egov-mdms-service/v1/_search,`
2. `egov-searcher/bill-genie/billswithaddranduser/_get`

## **Role Action Mapping**

| API                                                  | Roles                    | Action ID |
| ---------------------------------------------------- | ------------------------ | --------- |
| `egov-mdms-service/v1/_search`                       |                          | `954`     |
| `egov-searcher/bill-genie/billswithaddranduser/_get` | `SUPERUSER` , `EMPLOYEE` | `1804`    |


---

# 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/current-bill-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.
