IO-233 CDK Shop Config
This commit is contained in:
@@ -7,6 +7,8 @@ var builder = require("xmlbuilder2");
|
||||
const moment = require("moment");
|
||||
const QbXmlUtils = require("./qbxml-utils");
|
||||
const QbxmlReceivables = require("./qbxml-receivables");
|
||||
const logger = require("../../utils/logger");
|
||||
|
||||
require("dotenv").config({
|
||||
path: path.resolve(
|
||||
process.cwd(),
|
||||
@@ -80,13 +82,18 @@ exports.default = async (req, res) => {
|
||||
|
||||
res.status(200).json(QbXmlToExecute);
|
||||
} catch (error) {
|
||||
console.log("error", error);
|
||||
logger.log(
|
||||
"qbxml-payments-error",
|
||||
"error",
|
||||
req.body.user,
|
||||
req.body.paymentsToQuery,
|
||||
error
|
||||
);
|
||||
res.status(400).send(JSON.stringify(error));
|
||||
}
|
||||
};
|
||||
|
||||
const generatePayment = (payment, isThreeTier, twoTierPref) => {
|
||||
console.log("generatePayment -> payment", payment);
|
||||
let paymentQbxmlObj;
|
||||
if (payment.amount > 0) {
|
||||
paymentQbxmlObj = {
|
||||
@@ -194,7 +201,6 @@ const generatePayment = (payment, isThreeTier, twoTierPref) => {
|
||||
.end({ pretty: true });
|
||||
|
||||
const paymentQbxmlFull = QbXmlUtils.addQbxmlHeader(paymentQbxmlPartial);
|
||||
console.log("generateBill -> paymentQbxmlFull", paymentQbxmlFull);
|
||||
|
||||
return paymentQbxmlFull;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user