SudoSOS Back-end API / internal/reports / ReportService
Abstract Class: ReportService ​
Extends ​
Extended by ​
Constructors ​
Constructor ​
ts
new ReportService(manager?): ReportService;Parameters ​
| Parameter | Type |
|---|---|
manager? | EntityManager |
Returns ​
ReportService
Inherited from ​
Properties ​
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
manager | protected | EntityManager | WithManager.manager |
Methods ​
addSubTransactionRowFilter() ​
ts
abstract protected addSubTransactionRowFilter<T>(
query,
forId,
fromDate,
tillDate): SelectQueryBuilder<T>;Type Parameters ​
| Type Parameter |
|---|
T |
Parameters ​
| Parameter | Type |
|---|---|
query | SelectQueryBuilder<T> |
forId | number |
fromDate | Date |
tillDate | Date |
Returns ​
SelectQueryBuilder<T>
fetchReportData() ​
ts
fetchReportData(parameters): Promise<IReport>;Parameters ​
| Parameter | Type |
|---|---|
parameters | ReportParameters |
Returns ​
Promise<IReport>
getCategoryEntries() ​
ts
getCategoryEntries(
forId,
fromDate,
tillDate): Promise<ReportCategoryEntry[]>;Gets the category report for the given user
Parameters ​
| Parameter | Type | Description |
|---|---|---|
forId | number | The user ID to get the entries for |
fromDate | Date | The from date to get the entries for (inclusive) |
tillDate | Date | The 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 ​
| Parameter | Type | Description |
|---|---|---|
forId | number | The user ID to get the entries for |
fromDate | Date | The from date to get the entries for (inclusive) |
tillDate | Date | The 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 ​
| Parameter | Type | Description |
|---|---|---|
forId | number | The user ID to get the entries for |
fromDate | Date | The from date to get the entries for (inclusive) |
tillDate | Date | The 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 ​
| Parameter | Type | Description |
|---|---|---|
forId | number | The user ID to get the entries for |
fromDate | Date | The from date to get the entries for (inclusive) |
tillDate | Date | The 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 ​
| Parameter | Type | Description |
|---|---|---|
parameters | ReportParameters | The 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 ​
| Parameter | Type | Description |
|---|---|---|
forId | number | The user ID to get the totals for |
fromDate | Date | The from date to get the totals for (inclusive) |
tillDate | Date | The 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 ​
| Parameter | Type | Description |
|---|---|---|
forId | number | The user ID to get the entries for |
fromDate | Date | The from date to get the entries for (inclusive) |
tillDate | Date | The till date to get the entries for (exclusive) |
Returns ​
Promise<ReportVatEntry[]>
- The VAT report
reportToResponse() ​
ts
static reportToResponse(report): ReportResponse;Parameters ​
| Parameter | Type |
|---|---|
report | Report |