Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "medici", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Simple double-entry accounting for Node + Mongoose", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -20,6 +20,2 @@ [![Build Status](https://travis-ci.org/koresar/medici.png?branch=master)](https://travis-ci.org/koresar/medici) | ||
## Coding Standards | ||
Medici is written in CoffeeScript but obviously is compatible with straight JavaScript as well. All database queries return promise objects instead of using the traditional node `function(err, result)`callback. | ||
## Writing journal entries | ||
@@ -40,6 +36,6 @@ | ||
// You can specify a Date object as the second argument in the book.entry() method if you want the transaction to be for a different date than today | ||
myBook.entry('Received payment') | ||
const journal = await myBook.entry('Received payment') | ||
.debit('Assets:Cash', 1000) | ||
.credit('Income', 1000, {client: 'Joe Blow'}) | ||
.write().then(function(journal) { }); | ||
.commit(); | ||
``` | ||
@@ -196,2 +192,2 @@ | ||
* Fixed a [bug](https://github.com/koresar/medici/issues/4). Transaction meta data was not voided correctly. | ||
* This module maintainer is now [koresar](https://github.com/koresar) instead of the original author [jraede](http://github.com/jraede). | ||
* This module maintainer is now [koresar](https://github.com/koresar) instead of the original author [jraede](http://github.com/jraede). |
@@ -136,3 +136,3 @@ module.exports = class Entry { | ||
// Hello JavaScript. Your math rounding skill is mesmerising. | ||
if (total < 1e-10) total = 0; | ||
if (total > -1e-10 && total < 1e-10) total = 0; | ||
@@ -139,0 +139,0 @@ if (total > 0 || total < 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
25481
191