Resolve date issue on qbxml creation.

This commit is contained in:
Patrick Fic
2021-02-10 08:14:49 -08:00
parent ebfc139a21
commit ff2f536b3a

View File

@@ -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 || ""