docparse-bill-number

Generate a bill number by sha1 hashing the account number and bill date for invoices which do not have bill number printed

npm install docparse-bill-number
2 downloads in the last week
8 downloads in the last month

Generate a bill number by sha1 hashing the account number and bill date for invoices which do not have bill number printed

Installation

npm install -S docparse-bill-number

Usage

Pass in an account number and a bill date.

var getBillNumber = require('docparse-bill-number')
var accountNumber = 'foo account number'
billDate = '2012-01-05 00:00:00 +00:00'
var billNumber = getBillNumber(accountNumber, billDate)
console.log('billNumber', billNumber)

Date Format

The bill date should be a utc start of day iso-8061 formatted date string.

Format String YYYY-MM-DD HH:mm Z Sample String 2012-01-05 00:00:00 +00:00

npm loves you