Skip to main content

logFinancialCalculation

chainalign-backend


chainalign-backend / services/financialAuditService / logFinancialCalculation

Function: logFinancialCalculation()

logFinancialCalculation(tenantId, userId, calculationType, inputs, result, details?): Promise<void>

Defined in: services/financialAuditService.js:14

Logs a financial calculation event for audit purposes. This function integrates with the existing auditService to create a detailed audit trail for financial impact calculations.

Parameters

tenantId

UUID

The ID of the tenant.

userId

UUID

The ID of the user performing the action (if applicable).

calculationType

string

A descriptive name for the calculation (e.g., 'Revenue_at_Risk', 'NPV_Calculation').

inputs

any

The key inputs used for the calculation.

result

number

The numerical result of the calculation.

details?

string = ''

Optional additional details or context for the audit log.

Returns

Promise<void>