fix: AR/AP aging summary report.

This commit is contained in:
a.bouhuolia
2021-01-14 13:16:32 +02:00
parent 343185b8bd
commit a747750d88
13 changed files with 287 additions and 154 deletions

View File

@@ -1,6 +1,7 @@
import {
IAgingPeriod,
IAgingPeriodTotal
IAgingPeriodTotal,
IAgingAmount
} from './AgingReport';
import {
INumberFormatQuery
@@ -17,14 +18,15 @@ export interface IAPAgingSummaryQuery {
export interface IAPAgingSummaryVendor {
vendorName: string,
current: IAgingPeriodTotal,
aging: (IAgingPeriod & IAgingPeriodTotal)[],
total: IAgingPeriodTotal,
current: IAgingAmount,
aging: IAgingPeriodTotal[],
total: IAgingAmount,
};
export interface IAPAgingSummaryTotal {
current: IAgingPeriodTotal,
aging: (IAgingPeriodTotal & IAgingPeriod)[],
current: IAgingAmount,
aging: IAgingPeriodTotal[],
total: IAgingAmount,
};
export interface IAPAgingSummaryData {

View File

@@ -1,10 +1,5 @@
import {
IAgingPeriod,
IAgingPeriodTotal
} from './AgingReport';
import {
INumberFormatQuery
} from './FinancialStatements';
import { IAgingPeriod, IAgingPeriodTotal, IAgingAmount } from './AgingReport';
import { INumberFormatQuery } from './FinancialStatements';
export interface IARAgingSummaryQuery {
asDate: Date | string;
@@ -17,20 +12,20 @@ export interface IARAgingSummaryQuery {
export interface IARAgingSummaryCustomer {
customerName: string;
current: IAgingPeriodTotal,
aging: (IAgingPeriodTotal & IAgingPeriod)[];
total: IAgingPeriodTotal;
current: IAgingAmount;
aging: IAgingPeriodTotal[];
total: IAgingAmount;
}
export interface IARAgingSummaryTotal {
current: IAgingPeriodTotal,
aging: (IAgingPeriodTotal & IAgingPeriod)[],
total: IAgingPeriodTotal,
};
current: IAgingAmount;
aging: IAgingPeriodTotal[];
total: IAgingAmount;
}
export interface IARAgingSummaryData {
customers: IARAgingSummaryCustomer[],
total: IARAgingSummaryTotal,
};
customers: IARAgingSummaryCustomer[];
total: IARAgingSummaryTotal;
}
export type IARAgingSummaryColumns = IAgingPeriod[];
export type IARAgingSummaryColumns = IAgingPeriod[];

View File

@@ -1,12 +1,22 @@
export interface IAgingPeriodTotal {
total: number;
formattedTotal: string;
export interface IAgingPeriodTotal extends IAgingPeriod {
total: IAgingAmount;
};
export interface IAgingAmount {
amount: number;
formattedAmount: string;
currencyCode: string;
}
export interface IAgingPeriod {
fromPeriod: Date|string;
toPeriod: Date|string;
fromPeriod: Date | string;
toPeriod: Date | string;
beforeDays: number;
toDays: number;
}
}
export interface IAgingSummaryContact {
current: IAgingAmount;
aging: IAgingPeriodTotal[];
total: IAgingAmount;
}