Expense calculator

The expense calculator is an implementation-specific service that works in tandem with the expense service. This service holds all the specific business logic in computing expenses and calls the billing service with the correct payload to create a bill. Once the bill is generated Excel and Pdf are generated by the calculator service.

There are three types of bills in HCM:

  • Wage bill - generated from an approved muster roll and to be paid to wage seekers on completion of work

Dependency

  • DIGIT backbone services

  • Persister

  • MDMS

  • Attendance

  • Muster roll

  • Project

  • Individual

  • Expense

  • Localization

  • PdfService

  • Filestore

Functionality

Calculate api: This API fetches the attendance registers and creates calculates the amount to be paid based on the rates and roles present in MDMS and individual skills respectively.

Deployment Details

Here is a list of variables that needs to be configured in the Helm environment file before deploying the muster roll service. This file can typically be found under a specific directory or location as given below:

https://github.com/{{ORG}}/DIGIT-DevOps/deploy-as-code/helm/environments/{{EnvironmentFile}}.yaml

Refer to the sample here.

Configuration Details

Configure Actions

Add all the APIs exposed (refer to the table below for actual APIs) to the actions.json file in MDMS

Module name: ACCESSCONTROL-ACTIONS-TEST

Master name: actions-test

Configure Roles

Configure roles based on the roles column below in roles.json file.

Module name: ACCESSCONTROL-ROLES

Master name: roles

Configure Role-Action

Role-action mapping is configured in MDMS per the table below.

Module name: ACCESSCONTROL-ROLEACTIONS

Master name: roleactions.json

Roles
API Endpoints

CAMPAIGN_SUPERVISOR

/health-expense-calculator/v1/_calculator

Other masters to be added

Other muster roll masters are configured in the common-masters folder:

workerRates.json

Last updated

Was this helpful?