UNPKG

docparse-supplier-nge

Version:

process ngrid electric utility bill data for use in the docparse system

20 lines (18 loc) 672 B
// function createUploadWithData(data, cb) { // Upload.remove(function (err) { // should.not.exist(err, 'error removing existing uploads: ' + err); // var upload = new Upload(); // upload.account_number = data.account_number; // upload.bill_number = data.bill_number; // upload.text_pages = data.text_pages; // upload.hash = data.hash; // upload.supplier = data.supplier._id; // upload.status = 'ocr complete' // upload.ocr_status.complete = true; // upload.supplier_code = data.supplier.supplier_code; // upload.save(function (err) { // if (err) { return cb(err); } // cb(null, upload); // }); // }); // }