Resolve Qb Export not separating for QBO.
This commit is contained in:
@@ -312,15 +312,24 @@ module.exports = function ({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Convert the hash to an array.
|
if (qbo) {
|
||||||
Object.keys(invoiceLineHash).forEach((key) => {
|
Object.keys(invoiceLineHash).forEach((key) => {
|
||||||
Object.keys(invoiceLineHash[key]).forEach((key2) => {
|
Object.keys(invoiceLineHash[key]).forEach((key2) => {
|
||||||
InvoiceLineAdd.push({
|
InvoiceLineAdd.push({
|
||||||
...invoiceLineHash[key][key2],
|
...invoiceLineHash[key][key2],
|
||||||
Amount: invoiceLineHash[key][key2].Amount.toFormat(DineroQbFormat),
|
Amount: invoiceLineHash[key][key2].Amount.toFormat(DineroQbFormat),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
} else {
|
||||||
|
Object.keys(invoiceLineHash).forEach((key) => {
|
||||||
|
InvoiceLineAdd.push({
|
||||||
|
...invoiceLineHash[key],
|
||||||
|
Amount: invoiceLineHash[key].Amount.toFormat(DineroQbFormat),
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//Convert the hash to an array.
|
||||||
|
|
||||||
//Add Towing, storage and adjustment lines.
|
//Add Towing, storage and adjustment lines.
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ exports.default = async (req, res) => {
|
|||||||
"error",
|
"error",
|
||||||
req.user.email,
|
req.user.email,
|
||||||
req.body.jobIds,
|
req.body.jobIds,
|
||||||
error
|
{error: (error)}
|
||||||
);
|
);
|
||||||
res.status(400).send(JSON.stringify(error));
|
res.status(400).send(JSON.stringify(error));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user