1.1.1 • Published 11 years ago

docparse-save-bill v1.1.1

Weekly downloads
4
License
-
Repository
github
Last release
11 years ago

Docparse Save Bill

Save new a docparse bill in the database with given data

Build Status Dependency Status Dependency tracking by David

Usage

var saveBill = require('docparse-save-bill');
var moment = require('moment');
var mongoose = require('mongoose');
var ObjectId = mongoose.Types.ObjectId;
var data = {
  supplierID: new ObjectId(),
  customerID: new ObjectId(),
  loginID: new ObjectId(),
  hash: 'foo hash',
  supplierCode: 'FGS',
  billNumber: 'foo bill number',
  dataType: 'pdf',
  billDate: moment(),
  accountNumber: 'foo account number',
  textPages: ['foo page 1 text', 'bar page 2 text']
};

saveBill(queryParams, function(err, bill) {
  if (err) {
    inspect(err, 'error saveing bill')
    return;
  }
  if (!bill) {
    inspect('no bill found');
    return cb();
  }
  inspect(bill.toObject(), 'found bill');
});

Installation

npm install docparse-save-bill

Example Installation

npm install docparse-save-bill mongoose moment eyespect

1.1.1

11 years ago

1.1.0

11 years ago

1.0.9

11 years ago

1.0.8

11 years ago

1.0.7

11 years ago

1.0.6

11 years ago

1.0.5

11 years ago

1.0.4

11 years ago

1.0.3

11 years ago

1.0.2

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago