Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 selected service category is either Water or Sewerage then Consumer ID is used

...

https://github.com/egovernments/DIGIT-Dev/blob/bf020806a6b9acf15598c7146076c58ce7d5e34b/frontend/micro-ui/web/micro-ui-internals/packages/modules/bills/src/components/GroupBill/index.js

Hooks/Utils Used:

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

https://github.com/egovernments/DIGIT-Dev/blob/db572b868bad5af8564452606be4690c25041419/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/pdf.js

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

 

  1. To Search a bill → A hook named useBillSearch is used to search bills which is defined in this file

https://github.com/egovernments/DIGIT-Dev/blob/b24905db78ba453cfdb606cf8069cde0e5025de6/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/bills/useBillSearch.js

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

Code Block
Digit.PaymentService.generatePdf() // To fetch all the bills(inside reuslt there are filestore ids)

Digit.UploadServices.Filefetch() // filestore ids are used to fetch all these bills pdf

...

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.

Code Block
Digit.WSService.wnsGroupBill()

...

API Endpoint

API description

Access Roles

/egov-searcher/bill-genie/billswithaddranduser

→ Bills search API

Employee, Bill Genie EmployeeEMPLOYEE, CEMP roles ex : PT_CEMP,WS_CEMP,SW_CEMP etc

/egov-pdf/download/BILL/consolidatedbill

→ Bill Download APIEmployee, Bill Genie Employee

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

/pdf-service/v1/_create

→ Merge & Download(other than Water/Sewerage)

Employee, Bill Genie EmployeeEMPLOYEE, CEMP roles ex : PT_CEMP,WS_CEMP,SW_CEMP etc

/egov-pdf/download/WNS/wnsgroupbill

→ Merge & Download (Water and Sewerage Bills)

Employee, Bill Genie EmployeeEMPLOYEE, CEMP roles ex : PT_CEMP,WS_CEMP,SW_CEMP etc