IO-233 CDK Shop Config
This commit is contained in:
@@ -6,6 +6,7 @@ const Dinero = require("dinero.js");
|
||||
var builder = require("xmlbuilder2");
|
||||
const QbXmlUtils = require("./qbxml-utils");
|
||||
const moment = require("moment");
|
||||
const logger = require("../../utils/logger");
|
||||
|
||||
require("dotenv").config({
|
||||
path: path.resolve(
|
||||
@@ -45,7 +46,13 @@ exports.default = async (req, res) => {
|
||||
|
||||
res.status(200).json(QbXmlToExecute);
|
||||
} catch (error) {
|
||||
console.log("error", error);
|
||||
logger.log(
|
||||
"qbxml-payable-error",
|
||||
"error",
|
||||
req.body.user,
|
||||
req.body.billsToQuery,
|
||||
error
|
||||
);
|
||||
res.status(400).send(JSON.stringify(error));
|
||||
}
|
||||
};
|
||||
@@ -89,7 +96,6 @@ const generateBill = (bill) => {
|
||||
.end({ pretty: true });
|
||||
|
||||
const billQbxml_Full = QbXmlUtils.addQbxmlHeader(billQbxml_partial);
|
||||
console.log("generateBill -> billQbxml_Full", billQbxml_Full);
|
||||
|
||||
return billQbxml_Full;
|
||||
};
|
||||
@@ -131,7 +137,6 @@ const findTaxCode = (billLine, taxcode) => {
|
||||
!!t.federal === !!federal
|
||||
);
|
||||
if (t.length === 1) {
|
||||
console.log(t);
|
||||
return t[0].code;
|
||||
} else if (t.length > 1) {
|
||||
return "Multiple Tax Codes Match";
|
||||
|
||||
Reference in New Issue
Block a user