Resolve Qb Export not separating for QBO.

This commit is contained in:
Patrick Fic
2021-09-27 16:50:37 -07:00
parent 1f2bec06ef
commit 8ec5bc049b
2 changed files with 17 additions and 8 deletions

View File

@@ -312,15 +312,24 @@ module.exports = function ({
}
}
//Convert the hash to an array.
Object.keys(invoiceLineHash).forEach((key) => {
Object.keys(invoiceLineHash[key]).forEach((key2) => {
InvoiceLineAdd.push({
...invoiceLineHash[key][key2],
Amount: invoiceLineHash[key][key2].Amount.toFormat(DineroQbFormat),
if (qbo) {
Object.keys(invoiceLineHash).forEach((key) => {
Object.keys(invoiceLineHash[key]).forEach((key2) => {
InvoiceLineAdd.push({
...invoiceLineHash[key][key2],
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.