SudoSOS Back-end API / internal/reports / BuyerReportService
Class: BuyerReportService ​
Extends ​
Constructors ​
Constructor ​
new BuyerReportService(manager?): BuyerReportService;Parameters ​
| Parameter | Type |
|---|---|
manager? | EntityManager |
Returns ​
BuyerReportService
Inherited from ​
Properties ​
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
manager | protected | EntityManager | ReportService.manager |
Methods ​
addSubTransactionRowFilter() ​
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>
Overrides ​
ReportService.addSubTransactionRowFilter
fetchReportData() ​
fetchReportData(parameters): Promise<IReport>;Parameters ​
| Parameter | Type |
|---|---|
parameters | ReportParameters |
Returns ​
Promise<IReport>
Inherited from ​
getCategoryEntries() ​
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
Inherited from ​
ReportService.getCategoryEntries
getContainerEntries() ​
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
Inherited from ​
ReportService.getContainerEntries
getPosEntries() ​
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
Inherited from ​
getProductEntries() ​
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
Inherited from ​
ReportService.getProductEntries
getReport() ​
getReport(parameters): Promise<BuyerReport>;Gets the report for the given user
Parameters ​
| Parameter | Type | Description |
|---|---|---|
parameters | ReportParameters | The parameters to get the report for |
Returns ​
Promise<BuyerReport>
- The report
Overrides ​
getTotals() ​
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
Inherited from ​
getVatEntries() ​
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
Inherited from ​
reportToResponse() ​
static reportToResponse(report): ReportResponse;Parameters ​
| Parameter | Type |
|---|---|
report | Report |