@pingleware/bestbooks-reports
Advanced tools
Comparing version 1.0.4 to 1.0.5
"use strict" | ||
const { Model } = require('@pingleware/bestbooks-core'); | ||
const Report = require('./report'); | ||
const BaseReport = require('./report'); | ||
class BalanceSheet extends Report { | ||
class BalanceSheet extends BaseReport { | ||
constructor() { | ||
@@ -8,0 +8,0 @@ super(); |
"use strict" | ||
const { Model } = require('@pingleware/bestbooks-core'); | ||
const Report = require('./report'); | ||
const BaseReport = require('./report'); | ||
class IncomeStatement extends Report { | ||
class IncomeStatement extends BaseReport { | ||
constructor() { | ||
@@ -8,0 +8,0 @@ super(); |
"use strict" | ||
const { Model } = require('@pingleware/bestbooks-core'); | ||
const Report = require('./report'); | ||
const BaseReport = require('./report'); | ||
class NoteToFinancialStatements extends Report { | ||
class NoteToFinancialStatements extends BaseReport { | ||
constructor() { | ||
@@ -8,0 +8,0 @@ super(); |
{ | ||
"name": "@pingleware/bestbooks-reports", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Reports module for BestBooks Accounting Application Framework", | ||
@@ -25,4 +25,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"@pingleware/bestbooks-core": "^1.1.8" | ||
"@pingleware/bestbooks-core": "^1.1.9" | ||
} | ||
} |
"use strict" | ||
class Report { | ||
class BaseReport { | ||
constructor() {} | ||
createReport(startDate,endDate,format) {} | ||
retrieveReportData(startDate,endDate) {} | ||
} | ||
} | ||
module.exports = BaseReport; |
@@ -17,5 +17,5 @@ "use strict" | ||
const { Model } = require('@pingleware/bestbooks-core'); | ||
const Report = require('./report'); | ||
const BaseReport = require('./report'); | ||
class StatementCashFlows extends Report { | ||
class StatementCashFlows extends BaseReport { | ||
constructor() { | ||
@@ -22,0 +22,0 @@ super(); |
"use strict" | ||
const { Model } = require('@pingleware/bestbooks-core'); | ||
const Report = require('./report'); | ||
const BaseReport = require('./report'); | ||
class StatementChangeInEquity extends Report { | ||
class StatementChangeInEquity extends BaseReport { | ||
constructor() { | ||
@@ -8,0 +8,0 @@ super(); |
"use strict" | ||
const { Model } = require('@pingleware/bestbooks-core'); | ||
const Report = require('./report'); | ||
const { Report } = require('@pingleware/bestbooks-core'); | ||
const BaseReport = require('./report'); | ||
class TrialBalance extends Report { | ||
class TrialBalance extends BaseReport { | ||
constructor() { | ||
@@ -12,18 +12,17 @@ super(); | ||
createReport(startDate,endDate,format) { | ||
var data = this.retrieveReportData(startDate, endDate); | ||
if (format == "array") { | ||
return data; | ||
} else { | ||
// process other formats | ||
} | ||
this.retrieveReportData(startDate, endDate).then(function(data){ | ||
if (format == "array") { | ||
return data; | ||
} else { | ||
// process other formats | ||
} | ||
}); | ||
} | ||
retrieveReportData(startDate,endDate) { | ||
var sql = `SSELECT account_code AS code, account_name AS name,accounts.base_type AS type,debit,credit, | ||
CASE WHEN (SELECT SUM(debit)=SUM(credit) FROM ledger) | ||
THEN 'in_balance' ELSE 'out_of_balance' END AS trial_balance | ||
FROM ledger JOIN accounts ON accounts.name=ledger.account_name;`; | ||
const model = new Model(); | ||
return model.querySync(sql); | ||
var report = new Report(); | ||
report.trialBalance(startDate,endDate,function(results){ | ||
console.log(results); | ||
return results; | ||
}); | ||
} | ||
@@ -30,0 +29,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7058
17
169