mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(QuickBooks Node): Add optional Tax item field (#3404)
* Added tax refs * Nodelinter fixes
This commit is contained in:
committed by
GitHub
parent
f02421b5f3
commit
c341b45396
@@ -138,7 +138,7 @@ export async function quickBooksApiRequestAllItems(
|
||||
responseData = await quickBooksApiRequest.call(this, method, endpoint, qs, body);
|
||||
try {
|
||||
const nonResource = originalQuery.split(' ')?.pop();
|
||||
if (nonResource === 'CreditMemo' || nonResource === 'Term') {
|
||||
if (nonResource === 'CreditMemo' || nonResource === 'Term' || nonResource === 'TaxCode') {
|
||||
returnData.push(...responseData.QueryResponse[nonResource]);
|
||||
} else {
|
||||
returnData.push(...responseData.QueryResponse[capitalCase(resource)]);
|
||||
@@ -334,18 +334,27 @@ export function processLines(
|
||||
ItemRef: {
|
||||
value: line.itemId,
|
||||
},
|
||||
TaxCodeRef : {
|
||||
value: line.TaxCodeRef,
|
||||
},
|
||||
};
|
||||
delete line.itemId;
|
||||
delete line.TaxCodeRef;
|
||||
}
|
||||
|
||||
|
||||
} else if (resource === 'invoice') {
|
||||
if (line.DetailType === 'SalesItemLineDetail') {
|
||||
line.SalesItemLineDetail = {
|
||||
ItemRef: {
|
||||
value: line.itemId,
|
||||
},
|
||||
TaxCodeRef : {
|
||||
value: line.TaxCodeRef,
|
||||
},
|
||||
};
|
||||
delete line.itemId;
|
||||
delete line.TaxCodeRef;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user