mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
feat(server): financial reports meta
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
IAgingSummaryContact,
|
||||
IAgingSummaryData,
|
||||
} from './AgingReport';
|
||||
import { IFinancialSheetCommonMeta } from './FinancialStatements';
|
||||
import { IFinancialTable } from './Table';
|
||||
|
||||
export interface IAPAgingSummaryQuery extends IAgingSummaryQuery {
|
||||
@@ -23,17 +24,22 @@ export interface IAPAgingSummaryData extends IAgingSummaryData {
|
||||
|
||||
export type IAPAgingSummaryColumns = IAgingPeriod[];
|
||||
|
||||
export interface IARAgingSummaryMeta {
|
||||
baseCurrency: string;
|
||||
organizationName: string;
|
||||
export interface IARAgingSummaryMeta extends IFinancialSheetCommonMeta {
|
||||
formattedAsDate: string;
|
||||
}
|
||||
|
||||
export interface IAPAgingSummaryMeta {
|
||||
baseCurrency: string;
|
||||
organizationName: string;
|
||||
export interface IAPAgingSummaryMeta extends IFinancialSheetCommonMeta {
|
||||
formattedAsDate: string;
|
||||
}
|
||||
|
||||
export interface IAPAgingSummaryTable extends IFinancialTable {
|
||||
query: IAPAgingSummaryQuery;
|
||||
meta: IAPAgingSummaryMeta;
|
||||
}
|
||||
|
||||
export interface IAPAgingSummarySheet {
|
||||
data: IAPAgingSummaryData;
|
||||
meta: IAPAgingSummaryMeta;
|
||||
query: IAPAgingSummaryQuery;
|
||||
columns: any;
|
||||
}
|
||||
|
||||
@@ -32,3 +32,11 @@ export interface IARAgingSummaryTable extends IFinancialTable {
|
||||
meta: IARAgingSummaryMeta;
|
||||
query: IARAgingSummaryQuery;
|
||||
}
|
||||
|
||||
export interface IARAgingSummarySheet {
|
||||
data: IARAgingSummaryData;
|
||||
meta: IARAgingSummaryMeta;
|
||||
query: IARAgingSummaryQuery;
|
||||
columns: IARAgingSummaryColumns;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
|
||||
import { INumberFormatQuery } from './FinancialStatements';
|
||||
import {
|
||||
IFinancialSheetCommonMeta,
|
||||
INumberFormatQuery,
|
||||
} from './FinancialStatements';
|
||||
|
||||
export interface IAgingPeriodTotal extends IAgingPeriod {
|
||||
total: IAgingAmount;
|
||||
@@ -42,3 +44,8 @@ export interface IAgingSummaryTotal {
|
||||
export interface IAgingSummaryData {
|
||||
total: IAgingSummaryTotal;
|
||||
}
|
||||
|
||||
export interface IAgingSummaryMeta extends IFinancialSheetCommonMeta {
|
||||
formattedAsDate: string;
|
||||
formattedDateRange: string;
|
||||
}
|
||||
|
||||
@@ -65,8 +65,7 @@ export interface IBalanceSheetQuery extends IFinancialSheetBranchesQuery {
|
||||
|
||||
// Balance sheet meta.
|
||||
export interface IBalanceSheetMeta extends IFinancialSheetCommonMeta {
|
||||
formattedFromDate: string;
|
||||
formattedToDate: string;
|
||||
formattedAsDate: string;
|
||||
formattedDateRange: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
IContactBalanceSummaryPercentage,
|
||||
IContactBalanceSummaryTotal,
|
||||
} from './ContactBalanceSummary';
|
||||
import { IFinancialSheetCommonMeta } from './FinancialStatements';
|
||||
import { IFinancialTable } from './Table';
|
||||
|
||||
export interface ICustomerBalanceSummaryQuery
|
||||
@@ -35,9 +36,15 @@ export interface ICustomerBalanceSummaryData {
|
||||
total: ICustomerBalanceSummaryTotal;
|
||||
}
|
||||
|
||||
export interface ICustomerBalanceSummaryMeta extends IFinancialSheetCommonMeta {
|
||||
formattedAsDate: string;
|
||||
formattedDateRange: string;
|
||||
}
|
||||
|
||||
export interface ICustomerBalanceSummaryStatement {
|
||||
data: ICustomerBalanceSummaryData;
|
||||
query: ICustomerBalanceSummaryQuery;
|
||||
meta: ICustomerBalanceSummaryMeta;
|
||||
}
|
||||
|
||||
export interface ICustomerBalanceSummaryService {
|
||||
@@ -49,4 +56,5 @@ export interface ICustomerBalanceSummaryService {
|
||||
|
||||
export interface ICustomerBalanceSummaryTable extends IFinancialTable {
|
||||
query: ICustomerBalanceSummaryQuery;
|
||||
meta: ICustomerBalanceSummaryMeta;
|
||||
}
|
||||
|
||||
@@ -50,4 +50,5 @@ export interface IFinancialSheetCommonMeta {
|
||||
dateFormat: string;
|
||||
isCostComputeRunning: boolean;
|
||||
sheetName: string;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,92 +1,90 @@
|
||||
import { IFinancialTable } from "./Table";
|
||||
|
||||
import { IFinancialSheetCommonMeta } from './FinancialStatements';
|
||||
import { IFinancialTable } from './Table';
|
||||
|
||||
export interface IGeneralLedgerSheetQuery {
|
||||
fromDate: Date | string,
|
||||
toDate: Date | string,
|
||||
basis: string,
|
||||
fromDate: Date | string;
|
||||
toDate: Date | string;
|
||||
basis: string;
|
||||
numberFormat: {
|
||||
noCents: boolean,
|
||||
divideOn1000: boolean,
|
||||
},
|
||||
noneTransactions: boolean,
|
||||
accountsIds: number[],
|
||||
noCents: boolean;
|
||||
divideOn1000: boolean;
|
||||
};
|
||||
noneTransactions: boolean;
|
||||
accountsIds: number[];
|
||||
branchesIds?: number[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IGeneralLedgerSheetAccountTransaction {
|
||||
id: number,
|
||||
id: number;
|
||||
|
||||
amount: number,
|
||||
runningBalance: number,
|
||||
credit: number,
|
||||
debit: number,
|
||||
amount: number;
|
||||
runningBalance: number;
|
||||
credit: number;
|
||||
debit: number;
|
||||
|
||||
formattedAmount: string,
|
||||
formattedCredit: string,
|
||||
formattedDebit: string,
|
||||
formattedRunningBalance: string,
|
||||
formattedAmount: string;
|
||||
formattedCredit: string;
|
||||
formattedDebit: string;
|
||||
formattedRunningBalance: string;
|
||||
|
||||
currencyCode: string,
|
||||
note?: string,
|
||||
currencyCode: string;
|
||||
note?: string;
|
||||
|
||||
transactionType?: string,
|
||||
transactionNumber: string,
|
||||
transactionType?: string;
|
||||
transactionNumber: string;
|
||||
|
||||
referenceId?: number,
|
||||
referenceType?: string,
|
||||
referenceId?: number;
|
||||
referenceType?: string;
|
||||
|
||||
date: Date|string,
|
||||
date: Date | string;
|
||||
dateFormatted: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IGeneralLedgerSheetAccountBalance {
|
||||
date: Date|string,
|
||||
amount: number,
|
||||
formattedAmount: string,
|
||||
currencyCode: string,
|
||||
date: Date | string;
|
||||
amount: number;
|
||||
formattedAmount: string;
|
||||
currencyCode: string;
|
||||
}
|
||||
|
||||
export interface IGeneralLedgerSheetAccount {
|
||||
id: number,
|
||||
name: string,
|
||||
code: string,
|
||||
index: number,
|
||||
parentAccountId: number,
|
||||
transactions: IGeneralLedgerSheetAccountTransaction[],
|
||||
openingBalance: IGeneralLedgerSheetAccountBalance,
|
||||
closingBalance: IGeneralLedgerSheetAccountBalance,
|
||||
id: number;
|
||||
name: string;
|
||||
code: string;
|
||||
index: number;
|
||||
parentAccountId: number;
|
||||
transactions: IGeneralLedgerSheetAccountTransaction[];
|
||||
openingBalance: IGeneralLedgerSheetAccountBalance;
|
||||
closingBalance: IGeneralLedgerSheetAccountBalance;
|
||||
}
|
||||
|
||||
export type IGeneralLedgerSheetData = IGeneralLedgerSheetAccount[];
|
||||
|
||||
export interface IAccountTransaction {
|
||||
id: number,
|
||||
index: number,
|
||||
draft: boolean,
|
||||
note: string,
|
||||
accountId: number,
|
||||
transactionType: string,
|
||||
referenceType: string,
|
||||
referenceId: number,
|
||||
contactId: number,
|
||||
contactType: string,
|
||||
credit: number,
|
||||
debit: number,
|
||||
date: string|Date,
|
||||
createdAt: string|Date,
|
||||
updatedAt: string|Date,
|
||||
id: number;
|
||||
index: number;
|
||||
draft: boolean;
|
||||
note: string;
|
||||
accountId: number;
|
||||
transactionType: string;
|
||||
referenceType: string;
|
||||
referenceId: number;
|
||||
contactId: number;
|
||||
contactType: string;
|
||||
credit: number;
|
||||
debit: number;
|
||||
date: string | Date;
|
||||
createdAt: string | Date;
|
||||
updatedAt: string | Date;
|
||||
}
|
||||
|
||||
export interface IGeneralLedgerMeta {
|
||||
isCostComputeRunning: boolean,
|
||||
organizationName: string,
|
||||
baseCurrency: string,
|
||||
fromDate: string;
|
||||
toDate: string;
|
||||
};
|
||||
export interface IGeneralLedgerMeta extends IFinancialSheetCommonMeta {
|
||||
formattedFromDate: string;
|
||||
formattedToDate: string;
|
||||
formattedDateRange: string;
|
||||
}
|
||||
|
||||
export interface IGeneralLedgerTableData extends IFinancialTable {
|
||||
meta: IGeneralLedgerMeta;
|
||||
query: IGeneralLedgerSheetQuery;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import { INumberFormatQuery } from './FinancialStatements';
|
||||
import {
|
||||
IFinancialSheetCommonMeta,
|
||||
INumberFormatQuery,
|
||||
} from './FinancialStatements';
|
||||
import { IFinancialTable } from './Table';
|
||||
|
||||
export interface IInventoryValuationReportQuery {
|
||||
@@ -13,10 +16,10 @@ export interface IInventoryValuationReportQuery {
|
||||
branchesIds?: number[];
|
||||
}
|
||||
|
||||
export interface IInventoryValuationSheetMeta {
|
||||
organizationName: string;
|
||||
baseCurrency: string;
|
||||
isCostComputeRunning: boolean;
|
||||
export interface IInventoryValuationSheetMeta
|
||||
extends IFinancialSheetCommonMeta {
|
||||
formattedAsDate: string;
|
||||
formattedDateRange: string;
|
||||
}
|
||||
|
||||
export interface IInventoryValuationItem {
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import { INumberFormatQuery } from './FinancialStatements';
|
||||
import {
|
||||
IFinancialSheetCommonMeta,
|
||||
INumberFormatQuery,
|
||||
} from './FinancialStatements';
|
||||
import { IFinancialTable } from './Table';
|
||||
|
||||
export interface IInventoryDetailsQuery {
|
||||
@@ -79,10 +82,10 @@ export type IInventoryDetailsNode =
|
||||
| IInventoryDetailsItemTransaction;
|
||||
export type IInventoryDetailsData = IInventoryDetailsItem[];
|
||||
|
||||
export interface IInventoryItemDetailMeta {
|
||||
isCostComputeRunning: boolean;
|
||||
organizationName: string;
|
||||
baseCurrency: string;
|
||||
export interface IInventoryItemDetailMeta extends IFinancialSheetCommonMeta {
|
||||
formattedFromDate: string;
|
||||
formattedToDay: string;
|
||||
formattedDateRange: string;
|
||||
}
|
||||
|
||||
export interface IInvetoryItemDetailDOO {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { IFinancialSheetCommonMeta } from './FinancialStatements';
|
||||
import { IJournalEntry } from './Journal';
|
||||
import { IFinancialTable } from './Table';
|
||||
|
||||
@@ -32,10 +33,10 @@ export interface IJournalReport {
|
||||
entries: IJournalReportEntriesGroup[];
|
||||
}
|
||||
|
||||
export interface IJournalSheetMeta {
|
||||
isCostComputeRunning: boolean;
|
||||
organizationName: string;
|
||||
baseCurrency: string;
|
||||
export interface IJournalSheetMeta extends IFinancialSheetCommonMeta {
|
||||
formattedDateRange: string;
|
||||
formattedFromDate: string;
|
||||
formattedToDate: string;
|
||||
}
|
||||
|
||||
export interface IJournalTable extends IFinancialTable {
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import { INumberFormatQuery } from './FinancialStatements';
|
||||
import {
|
||||
IFinancialSheetCommonMeta,
|
||||
INumberFormatQuery,
|
||||
} from './FinancialStatements';
|
||||
import { IFinancialTable } from './Table';
|
||||
|
||||
export interface IPurchasesByItemsReportQuery {
|
||||
@@ -10,9 +13,10 @@ export interface IPurchasesByItemsReportQuery {
|
||||
onlyActive: boolean;
|
||||
}
|
||||
|
||||
export interface IPurchasesByItemsSheetMeta {
|
||||
organizationName: string;
|
||||
baseCurrency: string;
|
||||
export interface IPurchasesByItemsSheetMeta extends IFinancialSheetCommonMeta {
|
||||
formattedFromDate: string;
|
||||
formattedToDate: string;
|
||||
formattedDateRange: string;
|
||||
}
|
||||
|
||||
export interface IPurchasesByItemsItem {
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import { INumberFormatQuery } from './FinancialStatements';
|
||||
import {
|
||||
IFinancialSheetCommonMeta,
|
||||
INumberFormatQuery,
|
||||
} from './FinancialStatements';
|
||||
import { IFinancialTable } from './Table';
|
||||
|
||||
export interface ISalesByItemsReportQuery {
|
||||
@@ -10,9 +13,10 @@ export interface ISalesByItemsReportQuery {
|
||||
onlyActive: boolean;
|
||||
}
|
||||
|
||||
export interface ISalesByItemsSheetMeta {
|
||||
organizationName: string;
|
||||
baseCurrency: string;
|
||||
export interface ISalesByItemsSheetMeta extends IFinancialSheetCommonMeta {
|
||||
formattedFromDate: string;
|
||||
formattedToDate: string;
|
||||
formattedDateRange: string;
|
||||
}
|
||||
|
||||
export interface ISalesByItemsItem {
|
||||
@@ -51,4 +55,4 @@ export interface ISalesByItemsSheet {
|
||||
export interface ISalesByItemsTable extends IFinancialTable {
|
||||
query: ISalesByItemsReportQuery;
|
||||
meta: ISalesByItemsSheetMeta;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { IFinancialSheetCommonMeta } from "./FinancialStatements";
|
||||
import { IFinancialTable } from "./Table";
|
||||
|
||||
export interface SalesTaxLiabilitySummaryQuery {
|
||||
@@ -47,9 +48,10 @@ export type SalesTaxLiabilitySummarySalesById = Record<
|
||||
{ taxRateId: number; credit: number; debit: number }
|
||||
>;
|
||||
|
||||
export interface SalesTaxLiabilitySummaryMeta {
|
||||
organizationName: string;
|
||||
baseCurrency: string;
|
||||
export interface SalesTaxLiabilitySummaryMeta extends IFinancialSheetCommonMeta {
|
||||
formattedFromDate: string;
|
||||
formattedToDate: string;
|
||||
formattedDateRange: string;
|
||||
}
|
||||
|
||||
export interface ISalesTaxLiabilitySummaryTable extends IFinancialTable {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { IFinancialSheetCommonMeta } from './FinancialStatements';
|
||||
import { IFinancialTable, ITableData } from './Table';
|
||||
import {
|
||||
ITransactionsByContactsAmount,
|
||||
@@ -40,3 +41,9 @@ export interface ITransactionsByCustomersService {
|
||||
filter: ITransactionsByCustomersFilter
|
||||
): Promise<ITransactionsByCustomersStatement>;
|
||||
}
|
||||
export interface ITransactionsByCustomersMeta
|
||||
extends IFinancialSheetCommonMeta {
|
||||
formattedFromDate: string;
|
||||
formattedToDate: string;
|
||||
formattedDateRange: string;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { IFinancialSheetCommonMeta } from './FinancialStatements';
|
||||
import { IFinancialTable } from './Table';
|
||||
import {
|
||||
ITransactionsByContactsAmount,
|
||||
@@ -27,6 +28,8 @@ export type ITransactionsByVendorsData = ITransactionsByVendorsVendor[];
|
||||
|
||||
export interface ITransactionsByVendorsStatement {
|
||||
data: ITransactionsByVendorsData;
|
||||
query: ITransactionsByVendorsFilter;
|
||||
meta: ITransactionsByVendorMeta;
|
||||
}
|
||||
|
||||
export interface ITransactionsByVendorsService {
|
||||
@@ -38,4 +41,10 @@ export interface ITransactionsByVendorsService {
|
||||
|
||||
export interface ITransactionsByVendorTable extends IFinancialTable {
|
||||
query: ITransactionsByVendorsFilter;
|
||||
}
|
||||
meta: ITransactionsByVendorMeta;
|
||||
}
|
||||
export interface ITransactionsByVendorMeta extends IFinancialSheetCommonMeta {
|
||||
formattedFromDate: string;
|
||||
formattedToDate: string;
|
||||
formattedDateRange: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import { INumberFormatQuery } from './FinancialStatements';
|
||||
import {
|
||||
IFinancialSheetCommonMeta,
|
||||
INumberFormatQuery,
|
||||
} from './FinancialStatements';
|
||||
import { IFinancialTable } from './Table';
|
||||
|
||||
export interface IVendorBalanceSummaryQuery {
|
||||
@@ -39,8 +42,9 @@ export interface IVendorBalanceSummaryData {
|
||||
|
||||
export interface IVendorBalanceSummaryStatement {
|
||||
data: IVendorBalanceSummaryData;
|
||||
columns: {};
|
||||
query: IVendorBalanceSummaryQuery;
|
||||
meta: IVendorBalanceSummaryMeta;
|
||||
|
||||
}
|
||||
|
||||
export interface IVendorBalanceSummaryService {
|
||||
@@ -52,4 +56,9 @@ export interface IVendorBalanceSummaryService {
|
||||
|
||||
export interface IVendorBalanceSummaryTable extends IFinancialTable {
|
||||
query: IVendorBalanceSummaryQuery;
|
||||
meta: IVendorBalanceSummaryMeta;
|
||||
}
|
||||
|
||||
export interface IVendorBalanceSummaryMeta extends IFinancialSheetCommonMeta {
|
||||
formattedAsDate: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user