Consumer Creation
Provides Employees to create Consumer/Connection - Process of Onboarding the End Users.
Link. → {base url}/mgramseva/home/consumercreate.
Create Consumer card is available on the home screen as per the defined user role.
Click on the Consumer Create card navigates the user to the consumer creation screen.
Users enter the required details for the creation of Consumer.
If a user logs in for the first time then a walkthrough is populated following the same logic as in the home screen.
File Path
Primary Files - https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/screeens/ConsumerDetails/ConsumerDetailsWalkThrough/WalkFlowContainer.dart , https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/screeens/ConsumerDetails/ConsumerDetailsWalkThrough/walkthrough.dart
SL | Fields | Validations |
---|---|---|
1 | consumer Name* |
|
2 | Gender* | None |
3 | Spouse/Parent’s Name* |
|
4 | Phone Number* |
|
5 | Old Connection No | None |
6 | Category | None |
7 | Sub Category | None |
8 | Door Number | None |
9 | Street Name/Number | None |
10 | Gram Panchayat Name* | None- Disabled |
11 | Propert Type* | None |
12 | Service Type* | None |
13 | Meter Id |
|
14 | Meter Reading |
|
15 | Billing Cycle | None |
16 | Arrears |
|
17 | Advance |
|
18 | Penalty |
|
Note: All fields are validated on Submit except the Phone number which gets validated on change.
API details
SL | API | Params | Description |
---|---|---|---|
1 |
|
| To get the Property Type and service Type and billing cycle values for the Dropdown |
2 |
|
| To get the values for Locality DropDow |
Consumer creation involves 2 sequential Process
Property Creation
Water connection Creation
After creating a property, the Property ID is linked to the WaterConnection Request JSON.
Water connection creation is of two types:
A metered connection that requires Meter ID and meter installation Date/ Last Meter Reading Date and an optional field to capture meter reading.
Non-Metered Connection which requires the last billing cycle as mandatory params captured in the field as shown below.
Users can switch between connection Type by selecting a desired value from the Service Type DropDown
.
Advance and Penalty
For consumer users can give either Advance or Arrears along with Penalty by selecting the respective option from radio buttons, if user selected Advance field will be shown or else Arrears and Penalty will be shown there user can enter required amount.
The radio button “Advance” will be displayed only if the config flag “Advance enabled” in MDMS billing service.
The “Penalty” field (displayed along with Arrears) on selecting the Arrears Radio button, will be displayed only if the config flag “Penalty enabled” in MDMS billing service, then only arrears field will be shown for user to enter the arrears amount.
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
billing-service/demand/_search
api was using for calculating Penalty amount, we can get the penalty amount from if taxHeadMasterCode
is 'WS_TIME_ADHOC_PENALTY'
, from tax amount property we can get the penalty amount.
Calculating the due date by adding the billexpirtyDate
days with the Demand generation date.
Logic Implemented for First Demand Penalty
If it is the first demand and it is having the taxHeadMasterCode
10201
, we are showing the Penalty place holder in the bill details
SL | API | Description |
---|---|---|
1 |
| Property Creation Request JSON |
2 |
| Water Connection Request JSON defined in https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/model/connection/water_connection.dart |
Role Access Mapping
case Routes.CONSUMER_CREATE:
return ['GP_ADMIN', 'SUPERUSER'];
Components utilised from Widgets Library
SL | Components | File Path |
---|---|---|
1 | TextField Builder | |
2 | RadioButtonField Builder | |
3 | SearchSelectField Builder | |
4 | DatePicker Builder |
Files Path
Model → https://github.com/misdwss/punjab-mgramseva/blob/master/frontend/mgramseva/lib/model/connection/property.dart , https://github.com/misdwss/punjab-mgramseva/blob/master/frontend/mgramseva/lib/model/connection/water_connection.dart
Controller → https://github.com/misdwss/punjab-mgramseva/blob/master/frontend/mgramseva/lib/repository/consumer_details_repo.dart , https://github.com/misdwss/punjab-mgramseva/blob/master/frontend/mgramseva/lib/providers/consumer_details_provider.dart