aba-generate
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -15,2 +15,7 @@ const moment = require('moment'); | ||
const format = bsb => { | ||
const value = bsb.replace(/(\s|-)+/, ''); | ||
return `${value.slice(0, 3)}-${value.slice(3, 6)}`; | ||
}; | ||
const PAYMENT_FORMAT = [ | ||
@@ -71,2 +76,3 @@ '1', | ||
amount: toCents(transaction.amount), | ||
bsb: format(transaction.bsb), | ||
taxAmount: toCents(transaction.taxAmount), | ||
@@ -73,0 +79,0 @@ }) |
{ | ||
"name": "aba-generate", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "ABA file generation", | ||
@@ -10,4 +10,13 @@ "main": "index.js", | ||
"devDependencies": { | ||
"eslint": "^4.10.0", | ||
"eslint-config-ordermentum": "^0.0.2", | ||
"babel-eslint": "^8.0.2", | ||
"eslint": "^4.11.0", | ||
"eslint-config-airbnb": "^16.1.0", | ||
"eslint-config-ordermentum": "^0.0.3", | ||
"eslint-config-prettier": "^2.7.0", | ||
"eslint-plugin-flowtype": "^2.39.1", | ||
"eslint-plugin-import": "^2.8.0", | ||
"eslint-plugin-jsx-a11y": "^6.0.2", | ||
"eslint-plugin-mocha": "^4.11.0", | ||
"eslint-plugin-prettier": "^2.3.1", | ||
"eslint-plugin-react": "^7.4.0", | ||
"flow": "flow check", | ||
@@ -18,3 +27,4 @@ "flow-bin": "^0.57.3", | ||
"jest": "^21.2.1", | ||
"lint-staged": "^4.3.0" | ||
"lint-staged": "^4.3.0", | ||
"prettier": "^1.8.2" | ||
}, | ||
@@ -21,0 +31,0 @@ "scripts": { |
@@ -202,3 +202,3 @@ const moment = require('moment'); | ||
const defaults = { | ||
bsb: '666-1337', | ||
bsb: '666-133', | ||
account: '123456', | ||
@@ -205,0 +205,0 @@ accountTitle: 'Transfer', |
@@ -16,3 +16,3 @@ const ABA = require('../index'); | ||
const aba = new ABA({ | ||
bsb: '', | ||
bsb: '123123', | ||
account: '', | ||
@@ -37,4 +37,7 @@ bank: '', | ||
}; | ||
expect(aba.generate([transaction])).not.toBe(undefined); | ||
const file = aba.generate([transaction]); | ||
expect(file).not.toBe(undefined); | ||
const lines = file.split('\r\n'); | ||
expect(lines[1].slice(0, 3)).toBe('106'); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
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
158335
415
18