IO-1687 Add payable due date.

This commit is contained in:
Patrick Fic
2022-02-08 11:07:31 -08:00
parent 46731975e6
commit ffb39bbee7
5 changed files with 13 additions and 6 deletions

View File

@@ -181,7 +181,12 @@ async function InsertBill(oauthClient, qbo_realmId, req, bill, vendor) {
TxnDate: moment(bill.date)
.tz(bill.job.bodyshop.timezone)
.format("YYYY-MM-DD"),
//DueDate: bill.due_date && moment(bill.due_date).format("YYYY-MM-DD"),
...(bill.vendor.due_date && {
DueDate: moment(bill.date)
.tz(bill.job.bodyshop.timezone)
.add(bill.vendor.due_date, "days")
.format("YYYY-MM-DD"),
}),
DocNumber: bill.invoice_number,
//...(bill.job.class ? { ClassRef: { Id: classes[bill.job.class] } } : {}),