mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat: format amount rows of financial statemnets.
This commit is contained in:
@@ -2,15 +2,15 @@ import {
|
||||
IAgingPeriod,
|
||||
IAgingPeriodTotal
|
||||
} from './AgingReport';
|
||||
import {
|
||||
INumberFormatQuery
|
||||
} from './FinancialStatements';
|
||||
|
||||
export interface IAPAgingSummaryQuery {
|
||||
asDate: Date | string;
|
||||
agingDaysBefore: number;
|
||||
agingPeriods: number;
|
||||
numberFormat: {
|
||||
noCents: boolean;
|
||||
divideOn1000: boolean;
|
||||
};
|
||||
numberFormat: INumberFormatQuery;
|
||||
vendorsIds: number[];
|
||||
noneZero: boolean;
|
||||
}
|
||||
|
||||
@@ -2,15 +2,15 @@ import {
|
||||
IAgingPeriod,
|
||||
IAgingPeriodTotal
|
||||
} from './AgingReport';
|
||||
import {
|
||||
INumberFormatQuery
|
||||
} from './FinancialStatements';
|
||||
|
||||
export interface IARAgingSummaryQuery {
|
||||
asDate: Date | string;
|
||||
agingDaysBefore: number;
|
||||
agingPeriods: number;
|
||||
numberFormat: {
|
||||
noCents: boolean;
|
||||
divideOn1000: boolean;
|
||||
};
|
||||
numberFormat: INumberFormatQuery;
|
||||
customersIds: number[];
|
||||
noneZero: boolean;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -1,2 +1,19 @@
|
||||
export interface INumberFormatQuery {
|
||||
precision: number;
|
||||
divideOn1000: boolean;
|
||||
showZero: boolean;
|
||||
formatMoney: 'total' | 'always' | 'none';
|
||||
negativeFormat: 'parentheses' | 'mines';
|
||||
}
|
||||
|
||||
|
||||
export interface IFormatNumberSettings {
|
||||
precision?: number;
|
||||
divideOn1000?: boolean;
|
||||
excerptZero?: boolean;
|
||||
negativeFormat?: 'parentheses' | 'mines';
|
||||
thousand?: string;
|
||||
decimal?: string;
|
||||
zeroSign?: string;
|
||||
symbol?: string;
|
||||
money?: boolean,
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ export interface IJournalEntry {
|
||||
referenceType: string,
|
||||
referenceId: number,
|
||||
|
||||
referenceTypeFormatted: string,
|
||||
|
||||
transactionType?: string,
|
||||
note?: string,
|
||||
userId?: number,
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
|
||||
import {
|
||||
INumberFormatQuery,
|
||||
} from './FinancialStatements';
|
||||
|
||||
export interface IProfitLossSheetQuery {
|
||||
basis: string,
|
||||
fromDate: Date | string,
|
||||
toDate: Date | string,
|
||||
numberFormat: {
|
||||
noCents: boolean,
|
||||
divideOn1000: boolean,
|
||||
},
|
||||
numberFormat: INumberFormatQuery,
|
||||
noneZero: boolean,
|
||||
noneTransactions: boolean,
|
||||
accountsIds: number[],
|
||||
@@ -34,8 +33,8 @@ export interface IProfitLossSheetAccount {
|
||||
};
|
||||
|
||||
export interface IProfitLossSheetAccountsSection {
|
||||
sectionTitle: string,
|
||||
entryNormal: 'credit',
|
||||
name: string,
|
||||
entryNormal: 'credit' | 'debit',
|
||||
accounts: IProfitLossSheetAccount[],
|
||||
total: IProfitLossSheetTotal,
|
||||
totalPeriods?: IProfitLossSheetTotal[],
|
||||
|
||||
@@ -1,38 +1,41 @@
|
||||
import { INumberFormatQuery } from './FinancialStatements';
|
||||
|
||||
export interface ITrialBalanceSheetQuery {
|
||||
fromDate: Date|string,
|
||||
toDate: Date|string,
|
||||
numberFormat: {
|
||||
noCents: boolean,
|
||||
divideOn1000: boolean,
|
||||
},
|
||||
basis: 'cash' | 'accural',
|
||||
noneZero: boolean,
|
||||
noneTransactions: boolean,
|
||||
accountIds: number[],
|
||||
fromDate: Date | string;
|
||||
toDate: Date | string;
|
||||
numberFormat: INumberFormatQuery;
|
||||
basis: 'cash' | 'accural';
|
||||
noneZero: boolean;
|
||||
noneTransactions: boolean;
|
||||
accountIds: number[];
|
||||
}
|
||||
|
||||
export interface ITrialBalanceAccount {
|
||||
id: number,
|
||||
parentAccountId: number,
|
||||
name: string,
|
||||
code: string,
|
||||
accountNormal: string,
|
||||
hasTransactions: boolean,
|
||||
export interface ITrialBalanceTotal {
|
||||
credit: number;
|
||||
debit: number;
|
||||
balance: number;
|
||||
currencyCode: string;
|
||||
|
||||
credit: number,
|
||||
debit: number,
|
||||
balance: number,
|
||||
currencyCode: string,
|
||||
|
||||
formattedCredit: string,
|
||||
formattedDebit: string,
|
||||
formattedBalance: string,
|
||||
formattedCredit: string;
|
||||
formattedDebit: string;
|
||||
formattedBalance: string;
|
||||
}
|
||||
|
||||
export type ITrialBalanceSheetData = IBalanceSheetSection[];
|
||||
export interface ITrialBalanceAccount extends ITrialBalanceTotal {
|
||||
id: number;
|
||||
parentAccountId: number;
|
||||
name: string;
|
||||
code: string;
|
||||
accountNormal: string;
|
||||
hasTransactions: boolean;
|
||||
}
|
||||
|
||||
export type ITrialBalanceSheetData = {
|
||||
accounts: ITrialBalanceAccount[];
|
||||
total: ITrialBalanceTotal;
|
||||
};
|
||||
|
||||
export interface ITrialBalanceStatement {
|
||||
data: ITrialBalanceSheetData,
|
||||
query: ITrialBalanceSheetQuery,
|
||||
}
|
||||
data: ITrialBalanceSheetData;
|
||||
query: ITrialBalanceSheetQuery;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user