Create new invoice document in the database only if needed Dependency tracking by David
Usage
see check.js for the required fields
var saveInvoice = var inspect = var data = db: <cradle db connection> loginID: 'fooLoginID' customerID: 'fooCustomerID' billingSupplierCode: 'FGS' billingSupplierID: supplierID supplierCode: 'FGS' supplierID: supplierID billID: 'fooBillID' billNumber: 'foo bill number' billNumberPrinted: true dataType: 'pdf' accountNumber: 'foo account number' fromDate: toDate: readType: 'ACTUAL' days: 30 costOther: total: '0' costs: costSupply: '10.99' costDelivery: '21.63' use: 546 demandKw: 564 invoiceType: commodity: 'electricity' type: 'utility' capacityCharge: '0' capacityChargeUse: '0' capacityChargeAdjustment: '0' toPay: '32.63'