Collect Payment

Link. → {base url}/mgramseva/household/details/collectPayment

After the demand is generated for Metered and non-metered connections or if any arrears are present, the Revenue collector uses this screen to collect payments.  

Collect Payment card is available on the home screen to the user role having COLLECTION_OPERATOR permission.

 

User Interaction on Screen

  • Users can pay the total due amount which will be by default set.

  • Or, Users can also pay an advance amount or partial amount by changing the value in Payment amount field to a higher or lower value. If Partial Amount need to be paid , then user need to provide a lower amount than the total due amount, and if Advance amount need to be paid, user need to provide a higher amount than the total due amount.

  • Clicking on Collect Payment, opens a confirmation popup to confirm if the amount entered is correct.

  • Clicking on Confirm navigates the user to the Payment Success screen. The user can download the receipt or share the receipt for the collected amount.

  • Users can also print mini receipts with the help of Bluetooth thermal printers by selecting the Print mini receipt option.

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

Logic Implemented for Arrears Breakup

The Arrears is broken into 'BL_(TaxHeadCode)' which we get from Bill details-->Bill Account details ---> Tax Head Code and the amount of particular arrears is similar to the Bill details--> amount from the Fetch Bill API.

(Eg. if there are two bills with tax head codes is 10101 and 10102, then Arrears break up is represented as BL_10101(Water Charges) with the corresponding amount and BL_10102(Water Charges-Arrears) with the corresponding amount)

Files Path

Primary Files: https://github.com/misdwss/punjab-mgramseva/blob/master/frontend/mgramseva/lib/screeens/common/collect_payment.dart

 

Note

  • The “Penalty” details displayed under “Bill Details“ section will be displayed only if the config flag “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.

 

Field Validations

SL

Fields

Validations

SL

Fields

Validations

1

Payment Amount : Full Amount or Partial Amount or Advance amount

r'^[0-9]+$' , Can not be 0

3

Payment Method

Default to Cash

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

 

Stack

1 → Home Screen. + Search Connection Screen + Household Results + Household Details Screen + Collect Payment Screen

Pop → Household Details Screen

Widgets Utilised from Library