Employee Group Bills

Objective: Provide employees with the capability to search group bills using filters.

Workflow Details

On the employee home screen, the Bill Genie module card contains the links related to Bill Genie screens.

Group Bills Screen

Parameters required for searching a bill:

  1. Service Category → It is a mandatory parameter

  2. Locality → It is a mandatory parameter

  3. Consumer ID/Property ID → It is a dynamic ID which is dependent on the selection of Service Category.

    • If the selected service category is either Water or Sewerage then Consumer ID is used

    • In all the other services Property ID is used

Search Results

  • Search Results are shown in a Tabular format with the columns as displayed above.

  • When the user clicks on a bill number cell that bill is downloaded as a pdf

Merge & Download

There is a download button at the top right of the Group Bill screen. Clicking on this button opens a download menu.

The download options in the menu are dependent on the Service Category selected by the user

  • If the selected service is Water/Sewerage Connection then the download options will have 2 options to download Water, Water and Sewerage bills or Sewerage, Sewerage and Water Bills respectively.

Clicking on these options displays an appropriate toast message and a job is started at the backend side to consolidate these bills as a single pdf. This job is done in the background. The single pdf can be downloaded from the download bill screen. Download bill screen also shows the status of these jobs such as completion percentage, success, and failure and also has the option to retry if the job fails at the backend.

If other services are selected then only one option is shown which is merge & download which consolidates and downloads all the bills as a single pdf

Technical Implementation Details

Group Bill Screen’s implementation file:

SearchFields i.e., input parameters implementation details file:

Results table implementation details file:

Hooks/Utils Used

To Download a bill → A util function named downloadBill is used and defined in this file

This util function is inside Digit Utils hence it can be called anywhere throughout the application like this Digit.Utils.downloadBill(consumerCode, businessService, "consolidatedreceipt")

To search a bill → A hook named useBillSearch is used to search bills and defined in this file here:

Merge & Download (other than water/sewerage) → Two hooks are used in combination to accomplish this task which is shown below

Usage of these hooks can be found in this file: Hooks

  1. Merge & Download(water/sewerage) → The following hook is used to accomplish this task.

API Curls

  • Search Bill

  • Download Bill pdf

  • Merge & Download(other than Water/Sewerage)

  • Merge & Download (Water & Sewerage)

API(s) Used

API Endpoint

API description

Access Roles

/egov-searcher/bill-genie/billswithaddranduser

→ Bills search API

EMPLOYEE, CEMP roles ex : PT_CEMP,WS_CEMP,SW_CEMP etc

/egov-pdf/download/BILL/consolidatedbill

→ Bill Download API

EMPLOYEE, CEMP roles ex : PT_CEMP,WS_CEMP,SW_CEMP etc

/pdf-service/v1/_create

→ Merge & Download(other than Water/Sewerage)

EMPLOYEE, CEMP roles ex : PT_CEMP,WS_CEMP,SW_CEMP etc

/egov-pdf/download/WNS/wnsgroupbill

→ Merge & Download (Water and Sewerage Bills)

EMPLOYEE, CEMP roles ex : PT_CEMP,WS_CEMP,SW_CEMP etc

Last updated

Was this helpful?