Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
The expense calculator is an implementation specific services 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.
There are three types of bills in Mukta:
Wage bill - auto-generated from an approved muster roll and to be paid to wage seekers on completion of work
Purchase bill - submitted by a JE or ME on behalf of the vendor
Supervision bill - computed on top of wage and purchase bills to be paid to the CBO (community based organisation).
The calculator performs the calculation for all three types of bills and creates a bill.
DIGIT backbone services
Persister
MDMS
IDgen
Expense
Listens for muster roll approval on a Kafka topic and creates a wage bill based on the muster roll.
Calculates supervision bill (if required) on any bills that have not been included so far and submits it to expense service
Allows update of purchase bill.
Search of meta information related to bills
HeadCodes
ApplicableCharges
LabourCharges
BusinessService
PayerList
API spec
Postman collection
Works-PDF is a service that can work between pdf-service and client requests. In works-pdf, there have multiple APIs to generate multiple PDFs. The service fetches data from multiple services, combines them, and sends the request to the PDF service to generate PDF.
It also has the functionality to generate an Excel file when payment is initiated. It listens to expense-payment-create
topic and payment data.
MDMS
Project
Estimates
Muster Roll
Contract
Organization
Localization
Expense
Expense calculator
Bankaccount
Filestore
It fetches data from multiple Create multiple PDFs like estimate, muster, project, etc.
When a payment is created it generates excel files based on the payment bills, because listening to payment create topic.
User can regenerate the payment excel using the same payment id.
Add all pdf configurations under pdf-service data config and format config
Add file type 'application/zip' under xlsx
format in egov-filestore
allowed-file-formats-map
.
Estimates PDF - Data Config, Format Config
Muster Roll PDF - Data Config, Format Config
Project PDF - Data Config, Format Config
Work order PDF - Data Config, Format Config
/egov-pdf/download/estimate/estimates
ESTIMATE_CREATOR
ESTIMATE_VERIFIER
TECHNICAL_SANCTIONER
ESTIMATE_APPROVER
ESTIMATE_VIEWER
/egov-pdf/download/musterRoll/muster-roll
MUSTER_ROLL_APPROVER
ORG_ADMIN
MUSTER_ROLL_VERIFIER
/egov-pdf/download/project/project-details
PROJECT_VIEWER
/egov-pdf/download/workOrder/work-order
ORG_ADMIN
WORK_ORDER_VIEWER
WORK_ORDER_APPROVER
/egov-pdf/bill/_generate
BILL_ACCOUNTANT
/egov-pdf/bill/_search
BILL_ACCOUNTANT
Create accounts for purchase and wage bills, for head codes where category is deduction.
E.g. this is the head code object
And tenantId is pg.citya
The format of referenceId is Deduction_{tanentId}_{headcode}
Then create a bank account with the field referenceId
value Deduction_pg.citya_LC
This bill scheduler is a cronjob scheduler for calculating the supervision bill. It runs based on environment configuration. It triggers multiple APIs to generate the supervision bill.
MDMS
User
Contract
Expense Calculator
It creates supervision bills based on ACTIVE contracts using expense-calculate service /v1/_calculate API.
Create a role in ACCESSCONTROL-ROLES/roles.json
MDMS like .
Create a SYSTEM
user with BILL_CREATOR and SYSTEM
roles. Find the curl below.
The same username will be used to generate bills BILL_GEN_CRONJOB, it’s defined in the environment config.
Cron job duration will be configured using environment variables from .
You can update the configuration of scheduler in two ways
Add the config in the DevOps environment file, and restart the service it will trigger the scheduler based on the updated environment configuration, and restart the expense-cronjob
service.
Using commands Change schedule - kubectl patch cronjobs expense-cronjob -p '{"spec" : {"schedule": "*/10 * * * *" }}'
Pause cron job -
kubectl patch cronjobs expense-cronjob -p '{"spec" : {"suspend" : true }}' Resume cron job -
kubectl patch cronjobs expense-cronjob -p '{"spec" : {"suspend" : false}}' Create new cronjob scheduler - kubectl create job --from=cronjob/expense-cronjob expense-cronjob
MUKTASoft UI Tech design
Works UI