From ff2f536b3a310b3103c93fc73e6a52c34088c2c5 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Wed, 10 Feb 2021 08:14:49 -0800 Subject: [PATCH] Resolve date issue on qbxml creation. --- server/accounting/qbxml/qbxml-payables.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/accounting/qbxml/qbxml-payables.js b/server/accounting/qbxml/qbxml-payables.js index f120dddd5..72b8ca583 100644 --- a/server/accounting/qbxml/qbxml-payables.js +++ b/server/accounting/qbxml/qbxml-payables.js @@ -5,6 +5,8 @@ const queries = require("../../graphql-client/queries"); const Dinero = require("dinero.js"); var builder = require("xmlbuilder"); const QbXmlUtils = require("./qbxml-utils"); +import moment from "moment"; + require("dotenv").config({ path: path.resolve( process.cwd(), @@ -58,8 +60,8 @@ const generateBill = (bill) => { VendorRef: { FullName: bill.vendor.name, }, - TxnDate: bill.date, - DueDate: bill.due_date, + TxnDate: moment(bill.date).format("YYYY-MM-DD"), + DueDate: moment(bill.due_date).format("YYYY-MM-DD"), RefNumber: bill.bill_number, Memo: `RO ${bill.job.ro_number || ""} OWNER ${ bill.job.ownr_fn || ""