mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
WIP: customer balance report.
This commit is contained in:
50
server/src/interfaces/CustomerBalanceSummary.ts
Normal file
50
server/src/interfaces/CustomerBalanceSummary.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
import { INumberFormatQuery } from './FinancialStatements';
|
||||
|
||||
export interface ICustomerBalanceSummaryQuery {
|
||||
asDate: Date;
|
||||
numberFormat: INumberFormatQuery;
|
||||
comparison: {
|
||||
percentageOfColumn: boolean;
|
||||
};
|
||||
noneTransactions: boolean;
|
||||
noneZero: boolean;
|
||||
}
|
||||
|
||||
export interface ICustomerBalanceSummaryAmount {
|
||||
amount: number;
|
||||
formattedAmount: string;
|
||||
currencyCode: string;
|
||||
}
|
||||
export interface ICustomerBalanceSummaryPercentage {
|
||||
amount: number;
|
||||
formattedAmount: string;
|
||||
}
|
||||
|
||||
export interface ICustomerBalanceSummaryCustomer {
|
||||
customerName: string;
|
||||
total: ICustomerBalanceSummaryAmount;
|
||||
percentageOfColumn?: ICustomerBalanceSummaryPercentage;
|
||||
}
|
||||
|
||||
export interface ICustomerBalanceSummaryTotal {
|
||||
total: ICustomerBalanceSummaryAmount;
|
||||
percentageOfColumn?: ICustomerBalanceSummaryPercentage;
|
||||
}
|
||||
|
||||
export interface ICustomerBalanceSummaryData {
|
||||
customers: ICustomerBalanceSummaryCustomer[];
|
||||
total: ICustomerBalanceSummaryTotal;
|
||||
}
|
||||
|
||||
export interface ICustomerBalanceSummaryStatement {
|
||||
data: ICustomerBalanceSummaryData;
|
||||
columns: {};
|
||||
query: ICustomerBalanceSummaryQuery;
|
||||
}
|
||||
|
||||
export interface ICustomerBalanceSummaryService {
|
||||
customerBalanceSummary(
|
||||
tenantId: number,
|
||||
query: ICustomerBalanceSummaryQuery,
|
||||
): Promise<ICustomerBalanceSummaryStatement>;
|
||||
}
|
||||
45
server/src/interfaces/TransactionsByCustomers.ts
Normal file
45
server/src/interfaces/TransactionsByCustomers.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import { INumberFormatQuery } from './FinancialStatements';
|
||||
|
||||
export interface ITransactionsByCustomersAmount {
|
||||
amount: number;
|
||||
formattedAmount: string;
|
||||
}
|
||||
|
||||
export interface ITransactionsByCustomersTransaction {
|
||||
date: string|Date,
|
||||
credit: ITransactionsByCustomersAmount;
|
||||
debit: ITransactionsByCustomersAmount;
|
||||
runningBalance: ITransactionsByCustomersAmount;
|
||||
referenceNumber: string;
|
||||
transactionNumber: string;
|
||||
}
|
||||
|
||||
export interface ITransactionsByCustomersCustomer {
|
||||
customerName: string;
|
||||
openingBalance: any;
|
||||
closingBalance: any;
|
||||
transactions: ITransactionsByCustomersTransaction[];
|
||||
}
|
||||
|
||||
export interface ITransactionsByCustomersFilter {
|
||||
fromDate: Date;
|
||||
toDate: Date;
|
||||
numberFormat: INumberFormatQuery;
|
||||
noneTransactions: boolean;
|
||||
noneZero: boolean;
|
||||
}
|
||||
|
||||
export interface ITransactionsByCustomersData {
|
||||
customers: ITransactionsByCustomersCustomer[];
|
||||
}
|
||||
|
||||
export interface ITransactionsByCustomersStatement {
|
||||
data: ITransactionsByCustomersData;
|
||||
}
|
||||
|
||||
export interface ITransactionsByCustomersService {
|
||||
transactionsByCustomers(
|
||||
tenantId: number,
|
||||
filter: ITransactionsByCustomersFilter
|
||||
): Promise<ITransactionsByCustomersStatement>;
|
||||
}
|
||||
@@ -42,4 +42,6 @@ export * from './Mailable';
|
||||
export * from './InventoryAdjustment';
|
||||
export * from './Setup'
|
||||
export * from './IInventoryValuationSheet';
|
||||
export * from './SalesByItemsSheet';
|
||||
export * from './SalesByItemsSheet';
|
||||
export * from './CustomerBalanceSummary';
|
||||
export * from './TransactionsByCustomers';
|
||||
Reference in New Issue
Block a user