IO-1552 Autohouse include additional fields.
This commit is contained in:
@@ -113,6 +113,14 @@ exports.default = async (req, res) => {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// for (const xmlObj of allxmlsToUpload) {
|
||||
// fs.writeFileSync(`./logs/${xmlObj.filename}`, xmlObj.xml);
|
||||
// }
|
||||
|
||||
// res.json(allxmlsToUpload);
|
||||
// return;
|
||||
|
||||
let sftp = new Client();
|
||||
sftp.on("error", (errors) =>
|
||||
logger.log("autohouse-sftp-error", "ERROR", "api", null, {
|
||||
@@ -744,7 +752,12 @@ const GenerateDetailLines = (line, statuses) => {
|
||||
IOUPart: 0,
|
||||
LineNumber: line.line_no || 0,
|
||||
MarkUp: null,
|
||||
OrderedOn: null,
|
||||
OrderedOn:
|
||||
(line.parts_order_lines[0] &&
|
||||
moment(line.parts_order_lines[0].parts_order.order_date).format(
|
||||
AhDateFormat
|
||||
)) ||
|
||||
"",
|
||||
OriginalCost: null,
|
||||
OriginalInvoiceNumber: null,
|
||||
PriceEach: (line.billlines[0] && line.billlines[0].retail_price) || 0,
|
||||
@@ -760,7 +773,9 @@ const GenerateDetailLines = (line, statuses) => {
|
||||
VendorPrice: (line.billlines[0] && line.billlines[0].actual_price) || 0,
|
||||
Deleted: null,
|
||||
ExpectedOn: null,
|
||||
ReceivedOn: null,
|
||||
ReceivedOn:
|
||||
line.billlines[0] &&
|
||||
moment(line.billlines[0].bill.date).format(AhDateFormat),
|
||||
OrderedBy: null,
|
||||
ShipVia: null,
|
||||
VendorContact: null,
|
||||
@@ -780,7 +795,7 @@ const generateNullDetailLine = () => {
|
||||
IOUPart: 0,
|
||||
LineNumber: 0,
|
||||
MarkUp: null,
|
||||
OrderedOn: null,
|
||||
OrderedOn: "",
|
||||
OriginalCost: null,
|
||||
OriginalInvoiceNumber: null,
|
||||
PriceEach: 0,
|
||||
|
||||
@@ -642,7 +642,13 @@ exports.AUTOHOUSE_QUERY = `query AUTOHOUSE_EXPORT($start: timestamptz, $bodyshop
|
||||
lbr_op
|
||||
profitcenter_part
|
||||
profitcenter_labor
|
||||
billlines(order_by: {bill: {date: desc_nulls_last}}) {
|
||||
parts_order_lines(order_by: {parts_order: {order_date: desc_nulls_last}} limit: 1){
|
||||
parts_order{
|
||||
id
|
||||
order_date
|
||||
}
|
||||
}
|
||||
billlines(order_by: {bill: {date: desc_nulls_last}} limit: 1) {
|
||||
actual_cost
|
||||
actual_price
|
||||
quantity
|
||||
@@ -651,6 +657,7 @@ exports.AUTOHOUSE_QUERY = `query AUTOHOUSE_EXPORT($start: timestamptz, $bodyshop
|
||||
name
|
||||
}
|
||||
invoice_number
|
||||
date
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -695,8 +702,6 @@ exports.AUTOHOUSE_QUERY = `query AUTOHOUSE_EXPORT($start: timestamptz, $bodyshop
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
`;
|
||||
|
||||
exports.ENTEGRAL_EXPORT = `
|
||||
|
||||
Reference in New Issue
Block a user