draft: AR and AP aging summary report.

This commit is contained in:
a.bouhuolia
2021-01-07 13:48:45 +02:00
parent 7fa6822905
commit 22b2fd5918
17 changed files with 639 additions and 590 deletions

View File

@@ -0,0 +1,29 @@
import {
IAgingPeriod,
IAgingPeriodTotal
} from './AgingReport';
export interface IAPAgingSummaryQuery {
asDate: Date | string;
agingDaysBefore: number;
agingPeriods: number;
numberFormat: {
noCents: boolean;
divideOn1000: boolean;
};
vendorsIds: number[];
noneZero: boolean;
}
export interface IAPAgingSummaryVendor {
vendorName: string,
aging: (IAgingPeriod & IAgingPeriodTotal)[],
total: IAgingPeriodTotal,
}
export interface IAPAgingSummaryData {
vendors: IAPAgingSummaryVendor[],
total: (IAgingPeriod & IAgingPeriodTotal)[],
}
export type IAPAgingSummaryColumns = IAgingPeriod[];

View File

@@ -1,45 +1,29 @@
import {
IAgingPeriod,
IAgingPeriodTotal
} from './AgingReport';
export interface IARAgingSummaryQuery {
asDate: Date | string,
agingDaysBefore: number,
agingPeriods: number,
asDate: Date | string;
agingDaysBefore: number;
agingPeriods: number;
numberFormat: {
noCents: number,
divideOn1000: number,
},
customersIds: number[],
noneZero: boolean,
noCents: number;
divideOn1000: number;
};
customersIds: number[];
noneZero: boolean;
}
export interface IAgingPeriod {
fromPeriod: Date,
toPeriod: Date,
beforeDays: number,
toDays: number,
};
export interface IAgingPeriodClosingBalance extends IAgingPeriod {
closingBalance: number,
};
export interface IAgingPeriodTotal extends IAgingPeriod {
total: number,
};
export interface ARAgingSummaryCustomerPeriod {
export interface IARAgingSummaryCustomer {
customerName: string;
aging: (IAgingPeriodTotal & IAgingPeriod)[];
total: IAgingPeriodTotal;
}
export interface ARAgingSummaryCustomerTotal {
amount: number,
formattedAmount: string,
currencyCode: string,
export interface IARAgingSummaryData {
customers: IARAgingSummaryCustomer[],
total: (IAgingPeriodTotal & IAgingPeriod)[]
}
export interface ARAgingSummaryCustomer {
customerName: string,
aging: IAgingPeriodTotal[],
total: ARAgingSummaryCustomerTotal,
};
export type IARAgingSummaryColumns = IAgingPeriod[];

View File

@@ -0,0 +1,12 @@
export interface IAgingPeriodTotal {
total: number;
formattedTotal: string;
currencyCode: string;
}
export interface IAgingPeriod {
fromPeriod: Date|string;
toPeriod: Date|string;
beforeDays: number;
toDays: number;
}