View Household Details

Link → {base url}/mgramseva/home/householddetails?applicationNo=WS/7374/2022-23/3545&Mode=collect

Users are redirected to this screen in two ways from Household Register and Search Connection

 

User Interaction on Screen

  • Users can see the details of their respective consumer.

  • if it is metered means the user can generate a new bill by tapping on Generate New bill button, it will navigate the user to the Generate consumer bill screen.

  • Users can download, share and print the mini receipts.

  • Users can collect the existing and advance payment if there is bill or demand

 

Logic Implemented for Advance

billing-service/demand/_search api was using for calculating the advance amount for current bill, we can get the advance amount from if taxHeadMasterCode is 'WS_ADVANCE_CARRYFORWARD', here we have two properties, collection amount and tax amount, tax amount is advance amount which is collected and collection amount is how we consumed from the advance amount, we can get the current advance from the taxAmount - collectionAmount

Logic Implemented for Time Penalty

ws-calculator/waterCalculator/_getPenaltyDetails api was using for calculating Time Penalty amount, we can get the time penalty amount from if taxHeadMasterCode is 'WS_TIME_PENALTY' , from tax amount property of the latest demand we can get the time penalty amount.

Calculating the due date by adding the billexpirtyDate days with the Demand generation date.

If due date is crossed, billing-service/demand/_search API will give us the Time Penalty that was applied.

Logic Implemented for First Demand Penalty

billing-service/demand/_search API will give us the Normal Penalty i.e. If it is the first demand and it is having the taxHeadMasterCode 10201 , we are showing the Penalty place holder in the bill details

Note

  • The “Penalty” details displayed under “Bill Details“ section will be displayed only if the config flag from MDMS, “Penalty enabled” is set as required true. If it is set as false, then the penalty details is not displayed.

  • The “Advance” details displayed under “Bill Details“ section will be displayed only if the config flag “Advance enabled” is set as required true. If it is set as false, then the advance details is not displayed.

 

Files Path

Primary Files: https://github.com/misdwss/punjab-mgramseva/blob/master/frontend/mgramseva/lib/screeens/HouseholdDetail/HouseholdDetail.dart https://github.com/misdwss/punjab-mgramseva/blob/master/frontend/mgramseva/lib/providers/household_details_provider.dart

https://github.com/misdwss/punjab-mgramseva/blob/master/frontend/mgramseva/lib/model/connection/water_connection.dart

Secondary Files: https://github.com/misdwss/punjab-mgramseva/blob/master/frontend/mgramseva/lib/components/HouseConnectionandBill/NewConsumerBill.dart https://github.com/misdwss/punjab-mgramseva/blob/master/frontend/mgramseva/lib/components/HouseConnectionandBill/ConsumerBillPayments.dart https://github.com/misdwss/punjab-mgramseva/blob/master/frontend/mgramseva/lib/components/HouseConnectionandBill/GenerateNewBill.dart

 

Stack

1 → Home Screen + Search Connection Screen +Household Results + Household Details Screen

Pop → Household Result

 

API Details

API EndPoint

Input Params (Modules)

Description

 

API EndPoint

Input Params (Modules)

Description

 

egov-mdms-service/v1/_search

 

 [{"moduleName":"BillingService","masterDetails":[{"name":"BusinessService","filter":"[?(@.code=='WS')]"}]}]

To get the billGeneiURL, Calculation of Water services and collectionModesNotAllowed

 

billing-service/bill/v2/_fetchbill

consumerCode : {}

businessService : WS

tenantId : {}

 

To fetch the bills of the connection/Consumer

 

billing-service/demand/_search

consumerCode, businessService, tenantId

To Fetch Demand Details

 

ws-calculator/waterCalculator/_getPenaltyDetails

{ "tenantId": "", "consumerCodes": "", "isGetPenaltyEstimate": "true"},

{

"GetBillCriteria":

{"tenantId": "", "isGetPenaltyEstimate": true, "consumerCodes": [""] }

}

 

To get the Time Penalty Amount

 

collection-services/payments/WS/_search

consumerCode, businessService, tenantId

tenantId : {}

To fetch payment details

 

ws-calculator/meterConnection/_search

tenantId, consumerCode

To fetch meter reading details

 

 

Widgets Utilised from Library