mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 04:10:32 +00:00
feat: code review notes
This commit is contained in:
@@ -31,7 +31,6 @@ export const BalanceSheetNetIncome = (Base: any) =>
|
||||
/**
|
||||
* Retrieves the closing balance of income accounts.
|
||||
* @returns {number}
|
||||
*
|
||||
*/
|
||||
private getIncomeTotal = () => {
|
||||
const closeingBalance = this.repository.incomeLedger.getClosingBalance();
|
||||
|
||||
@@ -41,13 +41,14 @@ export default class BalanceSheetTable extends R.compose(
|
||||
BalanceSheetBase
|
||||
)(FinancialSheet) {
|
||||
/**
|
||||
* @param {}
|
||||
* Balance sheet data.
|
||||
* @param {IBalanceSheetStatementData}
|
||||
*/
|
||||
private reportData: IBalanceSheetStatementData;
|
||||
|
||||
/**
|
||||
* Balance sheet query.
|
||||
* @parma {}
|
||||
* @parma {BalanceSheetQuery}
|
||||
*/
|
||||
private query: BalanceSheetQuery;
|
||||
|
||||
|
||||
@@ -61,14 +61,14 @@ export const FinancialSheetStructure = (Base: Class) =>
|
||||
});
|
||||
};
|
||||
|
||||
findNodeDeep = (nodes, callback) => {
|
||||
public findNodeDeep = (nodes, callback) => {
|
||||
return findValueDeep(nodes, callback, {
|
||||
childrenPath: 'children',
|
||||
pathFormat: 'array',
|
||||
});
|
||||
};
|
||||
|
||||
mapAccNodesDeep = (nodes, callback) => {
|
||||
public mapAccNodesDeep = (nodes, callback) => {
|
||||
return reduceDeep(
|
||||
nodes,
|
||||
(acc, value, key, parentValue, context) => {
|
||||
@@ -97,11 +97,11 @@ export const FinancialSheetStructure = (Base: Class) =>
|
||||
});
|
||||
};
|
||||
|
||||
getTotalOfChildrenNodes = (node) => {
|
||||
public getTotalOfChildrenNodes = (node) => {
|
||||
return this.getTotalOfNodes(node.children);
|
||||
};
|
||||
|
||||
getTotalOfNodes = (nodes) => {
|
||||
public getTotalOfNodes = (nodes) => {
|
||||
return sumBy(nodes, 'total.amount');
|
||||
};
|
||||
};
|
||||
|
||||
@@ -40,11 +40,4 @@ export class ProfitLossSheetExportInjectable {
|
||||
|
||||
return tableCsv;
|
||||
}
|
||||
|
||||
public async pdf(
|
||||
tenantId: number,
|
||||
query: IProfitLossSheetQuery
|
||||
): Promise<Buffer> {
|
||||
const table = await this.profitLossSheetTable.table(tenantId, query);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ export class TableSheetPdf {
|
||||
landscape,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the table columns to pdf columns.
|
||||
* @param {ITableColumn[]} columns
|
||||
|
||||
Reference in New Issue
Block a user