mGramSeva Penalty Changes
Overview
Water Connection Penalty changes are added to get the penalty amount after due date. The due date is configurable and penalty enable and disable is also configurable. If we want to have the penalty we can enable or we can disable it through configuration.
Pre-requisites
Before you proceed with the documentation, make sure the following pre-requisites are met -
Java 8
Kafka server is up and running
egov-persister service is running and has water service persister configs path added in it
PSQL server is running and database is created to store water connection / application data
Following services should be up and running:
egov-perister
egov-mdms
ws-services
billing-service
Key Functionalities
Calculate water charge and taxes based on billing slab.
Calculate meter reading charge for water connection
Generate demand for penalty feature
Scheduler for generating the demand(for non metered connection)
Deployment Details
Deploy the latest version of ws-service and ws-calculator
Add water-persist.yml & water-meter.yml file in config folder in git and add that path in persister . (The file path is to be added in environment yaml file in param called
persist-yml-path
)
Configuration Details
MDMS Configuration
Billing Service tax head configuration
{
"category": "PENALTY",
"service": "WS",
"name": "Penalty",
"code": "10201",
"isDebit": false,
"isActualDemand": true,
"order": "3",
"isRequired": false,
"IsBillamend": true
},
{
"category": "TAX",
"service": "WS",
"name": "Water adhoc penalty",
"code": "WS_TIME_ADHOC_PENALTY",
"isDebit": false,
"isActualDemand": true,
"order": "6",
"isRequired": false,
"IsBillamend": false
},
ws Calculator penalty configuration:
Use case 1 : Fixed percentage on outstanding without penalty
Use case 2 : Fixed percentage on current month
Use case 3 : Fixed percentage on outstanding including penalty
Note : All above are applied to the running month only.
Use case 4 : Fixed percentage on outstanding applied for every month on the outstanding amount respectively (not implemented)
Tech configs:
Use case 1:
"type": "Fixed",
"subType": "outstandingWithoutPenalty"
Use case 2:
"type": "Fixed",
"subType": "currentMonth",
Use Case 3:
"type": "Fixed",
"subType": "outstanding",
We have Total 4 types of penalty in the system:
Fixed - Current month: This is the penalty will be applied on the current month amount based on the rate (%) given in the configuration.
{
"tenantId": "pb",
"moduleName": "ws-services-calculation",
"Penalty": [
{
"type": "FIXED",
"subType": "currentMonth",
"rate": 10,
"amount":null,
"minAmount": null,
"applicableAfterDays": 10,
"flatAmount": null,
"fromFY": "2022-23",
"startingDay": "1/01/2022"
}
]
}
Fixed - outstanding: This is the penalty applied on the total outstanding amount including previously applied penalties based on the rate (%) given in the configuration.
{
"tenantId": "pb",
"moduleName": "ws-services-calculation",
"Penalty": [
{
"type": "FIXED",
"subType": "outstanding",
"rate": 10,
"amount":null,
"minAmount": null,
"applicableAfterDays": 10,
"flatAmount": null,
"fromFY": "2022-23",
"startingDay": "1/01/2022"
}
]
}
Fixed - outstandingWithoutPenalty: This is the penalty applied on the total outstanding amount excluding previously applied penalties based on the rate (%) given in the configuration.
Flat - Current month: This is the penalty will be applied on the current month amount based on the amount given in the configuration.
Flat - outstanding: This is the penalty applied on the total pending amount till the current month amount based on the amount given in the configuration.
Curl to create: