docparse-add-invoice

After saving an invoice, add the _id to the container bill

npm install docparse-add-invoice
6 downloads in the last week
24 downloads in the last month

Docparse Add Invoice

After saving an invoice, add the _id to the container bill

Build Status Dependency Status Dependency tracking by David

Usage

var eyespect = require('eyespect').inspector()
var mongoose = require('mongoose');
var ObjectId = mongoose.Types.ObjectId;
var createInvoice = require('docparse-default-upload');
var createBill = require('docparse-default-bill');
var addInvoice = require('docparse-add-invoice');

var invoice = createInvoice();
var bill = createBill();
var addData = {
  invoiceID: invoice._id,
  bill: bill
}
addInvoice(addData, function(err, bill) {
  if (err) {
    inspect(err, 'error adding invoice ids to upload')
    return;
  }
  inspect(bill.toObject(), 'bill after adding invoice ids');
});

Installation

npm install docparse-add-invoice

Example Installation

npm install docparse-add-invoice docparse-default-bill docparse-default-invoice eyespect
npm loves you