mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
feat: format amount rows of financial statemnets.
This commit is contained in:
@@ -1,74 +1,79 @@
|
||||
import {
|
||||
INumberFormatQuery,
|
||||
IFormatNumberSettings,
|
||||
} from './FinancialStatements';
|
||||
|
||||
export interface IBalanceSheetQuery{
|
||||
displayColumnsType: 'total' | 'date_periods',
|
||||
displayColumnsBy: string,
|
||||
fromDate: Date|string,
|
||||
toDate: Date|string,
|
||||
numberFormat: {
|
||||
noCents: boolean,
|
||||
divideOn1000: boolean,
|
||||
},
|
||||
noneZero: boolean,
|
||||
noneTransactions: boolean,
|
||||
basis: 'cash' | 'accural',
|
||||
accountIds: number[],
|
||||
export interface IBalanceSheetQuery {
|
||||
displayColumnsType: 'total' | 'date_periods';
|
||||
displayColumnsBy: string;
|
||||
fromDate: Date | string;
|
||||
toDate: Date | string;
|
||||
numberFormat: INumberFormatQuery;
|
||||
noneZero: boolean;
|
||||
noneTransactions: boolean;
|
||||
basis: 'cash' | 'accural';
|
||||
accountIds: number[];
|
||||
}
|
||||
|
||||
export interface IBalanceSheetFormatNumberSettings
|
||||
extends IFormatNumberSettings {
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface IBalanceSheetStatementService {
|
||||
balanceSheet(tenantId: number, query: IBalanceSheetQuery): Promise<IBalanceSheetStatement>;
|
||||
balanceSheet(
|
||||
tenantId: number,
|
||||
query: IBalanceSheetQuery
|
||||
): Promise<IBalanceSheetStatement>;
|
||||
}
|
||||
|
||||
export interface IBalanceSheetStatementColumns {
|
||||
export interface IBalanceSheetStatementColumns {}
|
||||
|
||||
}
|
||||
|
||||
export interface IBalanceSheetStatementData {
|
||||
|
||||
}
|
||||
export interface IBalanceSheetStatementData {}
|
||||
|
||||
export interface IBalanceSheetStatement {
|
||||
query: IBalanceSheetQuery,
|
||||
columns: IBalanceSheetStatementColumns,
|
||||
data: IBalanceSheetStatementData,
|
||||
query: IBalanceSheetQuery;
|
||||
columns: IBalanceSheetStatementColumns;
|
||||
data: IBalanceSheetStatementData;
|
||||
}
|
||||
|
||||
export interface IBalanceSheetStructureSection {
|
||||
name: string,
|
||||
sectionType?: string,
|
||||
type: 'section' | 'accounts_section',
|
||||
children?: IBalanceSheetStructureSection[],
|
||||
accountsTypesRelated?: string[],
|
||||
alwaysShow?: boolean,
|
||||
name: string;
|
||||
sectionType?: string;
|
||||
type: 'section' | 'accounts_section';
|
||||
children?: IBalanceSheetStructureSection[];
|
||||
accountsTypesRelated?: string[];
|
||||
alwaysShow?: boolean;
|
||||
}
|
||||
|
||||
export interface IBalanceSheetAccountTotal {
|
||||
amount: number,
|
||||
formattedAmount: string,
|
||||
currencyCode: string,
|
||||
date?: string|Date,
|
||||
amount: number;
|
||||
formattedAmount: string;
|
||||
currencyCode: string;
|
||||
date?: string | Date;
|
||||
}
|
||||
|
||||
export interface IBalanceSheetAccount {
|
||||
id: number,
|
||||
index: number,
|
||||
name: string,
|
||||
code: string,
|
||||
parentAccountId: number,
|
||||
type: 'account',
|
||||
hasTransactions: boolean,
|
||||
children?: IBalanceSheetAccount[],
|
||||
total: IBalanceSheetAccountTotal,
|
||||
totalPeriods?: IBalanceSheetAccountTotal[],
|
||||
id: number;
|
||||
index: number;
|
||||
name: string;
|
||||
code: string;
|
||||
parentAccountId: number;
|
||||
type: 'account';
|
||||
hasTransactions: boolean;
|
||||
children?: IBalanceSheetAccount[];
|
||||
total: IBalanceSheetAccountTotal;
|
||||
totalPeriods?: IBalanceSheetAccountTotal[];
|
||||
}
|
||||
|
||||
export interface IBalanceSheetSection {
|
||||
name: string,
|
||||
sectionType?: string,
|
||||
type: 'section' | 'accounts_section',
|
||||
children: IBalanceSheetAccount[] | IBalanceSheetSection[],
|
||||
total: IBalanceSheetAccountTotal,
|
||||
name: string;
|
||||
sectionType?: string;
|
||||
type: 'section' | 'accounts_section';
|
||||
children: IBalanceSheetAccount[] | IBalanceSheetSection[];
|
||||
total: IBalanceSheetAccountTotal;
|
||||
totalPeriods?: IBalanceSheetAccountTotal[];
|
||||
|
||||
accountsTypesRelated?: string[],
|
||||
_forceShow?: boolean,
|
||||
}
|
||||
accountsTypesRelated?: string[];
|
||||
_forceShow?: boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user