Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pingleware/bestbooks-reports

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pingleware/bestbooks-reports - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

xslt/customer-estimate.xslt

68

index.js
"use strict"
const os = require('os');
const fs = require('fs');
const path = require('path');
function init() {
const { Model } = require('@pingleware/bestbooks-core');
const model = new Model();
model.insertSync(`CREATE TABLE IF NOT EXISTS "report" (
"id" INTEGER,
"txdate" TIMESTAMP,
"name" TEXT,
"contents" TEXT,
PRIMARY KEY("id" AUTOINCREMENT)
)`)
const xslt_list = [
"balance-sheet.xslt",
"customer-estimate.xslt",
"income-statement.xslt",
"note-to-financial-statements.xslt",
"purchase-order.xslt",
"statement-in-change-in-equity.xslt",
"statement-of-cash-flows.xslt",
"trial-balance.xslt",
"retained-earnings.xslt"
];
let copied = 0;
xslt_list.forEach(function(file){
if (!fs.existsSync(path.join(os.homedir(),`.bestbooks/${file}`))) {
try {
fs.copyFileSync(path.join('xslt',file),path.join(os.homedir(),`.bestbooks/${file}`));
copied++;
} catch(error) {
console.error(error);
}
}
});
return copied;
}
function copy(src,dest) {
fs.copyFileSync(path.join('xslt',src),path.join(os.homedir(),`.bestbooks/${dest}`));
}
const BalanceSheet = require('./balance-sheet');

@@ -10,4 +55,17 @@ const IncomeStatement = require('./income-statement');

const RetainedEarnings = require('./retained-earnings');
const PurchaseOrder = require('./purchase-order');
const CustomerEstimate = require('./customer-estimate');
const parseString = require('xml2js').parseString;
const {
getReportFileName,
getReportRootFileName,
transform_xml_xslt,
format,
array2xml
} = require('./formatReport');
module.exports = {
init,
copy,
BalanceSheet,

@@ -19,3 +77,11 @@ IncomeStatement,

StatementChangeInEquity,
RetainedEarnings
RetainedEarnings,
PurchaseOrder,
CustomerEstimate,
parseString,
getReportFileName,
getReportRootFileName,
transform_xml_xslt,
format,
array2xml
}
{
"name": "@pingleware/bestbooks-reports",
"version": "1.0.7",
"version": "1.0.8",
"description": "Reports module for BestBooks Accounting Application Framework",
"main": "index.js",
"files": [
"xslt/**"
],
"scripts": {

@@ -22,7 +25,11 @@ "test": "mocha"

"devDependencies": {
"chai": "^4.3.7",
"mocha": "^10.1.0"
},
"dependencies": {
"@pingleware/bestbooks-core": "^1.1.11"
"@pingleware/bestbooks-core": "^1.1.11",
"js2xmlparser": "^5.0.0",
"xml2js": "^0.4.23",
"xslt-processor": "^0.11.7"
}
}
# BestBooks Accounting Application Framework - Reports
There are no free options for creating reports from content received from a database. jsreports, jasperreports have limited free options.

@@ -9,1 +10,14 @@

During initialization (invoking the init() function)), will copy the xslt template files to the user's home directory in the bestbooks system directory.
The js2xmlparser package is used to convert an object to xml, while the xslt-processor package will transform the XML data and XSLT template to HTML format.
HTML can be converted to other forms like PDF.
## Reporting in Accounting
Reporting is the most important feature of any accounting system, because reporting permits the communication to interested parties. Using test driven development (TDD) allows the implementation of the reports module first.
## GAAP Compliance
There is much discussion concerning GAAP compliance and accounting sofftware with some commentors stating that accounting software can never be GAAP compliance. First, GAAP compliance has to do with reporting and involves an accountant statement or notes added to the financial statements, this where the component noteToFinancialStatements permits the addition of a notes fields to the report XML data, thus making BestBooks GAAP compliance with the addition of a notes field on reports.
balance-sheet.js

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc