Skip to content

SudoSOS Back-end API / internal/reports / BuyerReportService

Class: BuyerReportService ​

Extends ​

Constructors ​

Constructor ​

ts
new BuyerReportService(manager?): BuyerReportService;

Parameters ​

ParameterType
manager?EntityManager

Returns ​

BuyerReportService

Inherited from ​

ReportService.constructor

Properties ​

PropertyModifierTypeInherited from
managerprotectedEntityManagerReportService.manager

Methods ​

addSubTransactionRowFilter() ​

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

Type Parameters ​

Type Parameter
T

Parameters ​

ParameterType
querySelectQueryBuilder<T>
forIdnumber
fromDateDate
tillDateDate

Returns ​

SelectQueryBuilder<T>

Overrides ​

ReportService.addSubTransactionRowFilter


fetchReportData() ​

ts
fetchReportData(parameters): Promise<IReport>;

Parameters ​

ParameterType
parametersReportParameters

Returns ​

Promise<IReport>

Inherited from ​

ReportService.fetchReportData


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

Inherited from ​

ReportService.getCategoryEntries


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

Inherited from ​

ReportService.getContainerEntries


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

Inherited from ​

ReportService.getPosEntries


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

Inherited from ​

ReportService.getProductEntries


getReport() ​

ts
getReport(parameters): Promise<BuyerReport>;

Gets the report for the given user

Parameters ​

ParameterTypeDescription
parametersReportParametersThe parameters to get the report for

Returns ​

Promise<BuyerReport>

  • The report

Overrides ​

ReportService.getReport


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

Inherited from ​

ReportService.getTotals


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

Inherited from ​

ReportService.getVatEntries


reportToResponse() ​

ts
static reportToResponse(report): ReportResponse;

Parameters ​

ParameterType
reportReport

Returns ​

ReportResponse

Inherited from ​

ReportService.reportToResponse