docparse-add-invoice
v1.1.1
Published
After saving an invoice, add the _id to the container bill
Downloads
24
Readme
Docparse Add Invoice
After saving an invoice, add the _id to the container bill
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