Skip to content

SudoSOS Back-end API / internal/reports / ReportService

Abstract Class: ReportService ​

Extends ​

Extended by ​

Constructors ​

Constructor ​

ts
new ReportService(manager?): ReportService;

Parameters ​

ParameterType
manager?EntityManager

Returns ​

ReportService

Inherited from ​

WithManager.constructor

Properties ​

PropertyModifierTypeInherited from
managerprotectedEntityManagerWithManager.manager

Methods ​

addSubTransactionRowFilter() ​

ts
abstract protected addSubTransactionRowFilter<T>(
   query, 
   forId, 
   fromDate, 
tillDate): SelectQueryBuilder<T>;

Type Parameters ​

Type Parameter
T

Parameters ​

ParameterType
querySelectQueryBuilder<T>
forIdnumber
fromDateDate
tillDateDate

Returns ​

SelectQueryBuilder<T>


fetchReportData() ​

ts
fetchReportData(parameters): Promise<IReport>;

Parameters ​

ParameterType
parametersReportParameters

Returns ​

Promise<IReport>


getCategoryEntries() ​

ts
getCategoryEntries(
   forId, 
   fromDate, 
tillDate): Promise<ReportCategoryEntry[]>;

Gets the category report for the given user

Parameters ​

ParameterTypeDescription
forIdnumberThe user ID to get the entries for
fromDateDateThe from date to get the entries for (inclusive)
tillDateDateThe till date to get the entries for (exclusive)

Returns ​

Promise<ReportCategoryEntry[]>

  • The category report

getContainerEntries() ​

ts
getContainerEntries(
   forId, 
   fromDate, 
tillDate): Promise<ReportContainerEntry[]>;

Gets the container report for the given user

Parameters ​

ParameterTypeDescription
forIdnumberThe user ID to get the entries for
fromDateDateThe from date to get the entries for (inclusive)
tillDateDateThe till date to get the entries for (exclusive)

Returns ​

Promise<ReportContainerEntry[]>

  • The container report

getPosEntries() ​

ts
getPosEntries(
   forId, 
   fromDate, 
tillDate): Promise<ReportPosEntry[]>;

Gets the POS report for the given user

Parameters ​

ParameterTypeDescription
forIdnumberThe user ID to get the entries for
fromDateDateThe from date to get the entries for (inclusive)
tillDateDateThe till date to get the entries for (exclusive)

Returns ​

Promise<ReportPosEntry[]>

  • The POS report

getProductEntries() ​

ts
getProductEntries(
   forId, 
   fromDate, 
tillDate): Promise<ReportProductEntry[]>;

Gets the product report for the given user

Parameters ​

ParameterTypeDescription
forIdnumberThe user ID to get the entries for
fromDateDateThe from date to get the entries for (inclusive)
tillDateDateThe till date to get the entries for (exclusive)

Returns ​

Promise<ReportProductEntry[]>

  • The product report

getReport() ​

ts
abstract getReport(parameters): Promise<Report>;

Gets the report for the given user

Parameters ​

ParameterTypeDescription
parametersReportParametersThe parameters to get the report for

Returns ​

Promise<Report>

  • The report

getTotals() ​

ts
getTotals(
   forId, 
   fromDate, 
   tillDate): Promise<{
  totalExclVat: Dinero;
  totalInclVat: Dinero;
  transactionCount: number;
}>;

Gets the totals for the given user

Parameters ​

ParameterTypeDescription
forIdnumberThe user ID to get the totals for
fromDateDateThe from date to get the totals for (inclusive)
tillDateDateThe till date to get the totals for (exclusive)

Returns ​

Promise<{ totalExclVat: Dinero; totalInclVat: Dinero; transactionCount: number; }>

  • The totals

getVatEntries() ​

ts
getVatEntries(
   forId, 
   fromDate, 
tillDate): Promise<ReportVatEntry[]>;

Gets the VAT report for the given user

Parameters ​

ParameterTypeDescription
forIdnumberThe user ID to get the entries for
fromDateDateThe from date to get the entries for (inclusive)
tillDateDateThe till date to get the entries for (exclusive)

Returns ​

Promise<ReportVatEntry[]>

  • The VAT report

reportToResponse() ​

ts
static reportToResponse(report): ReportResponse;

Parameters ​

ParameterType
reportReport

Returns ​

ReportResponse