Hi Donald,
Here is the output of the “get estimate from quickbook” module. It’s from a sample order with a few lines that are for similar items. I want to group these lines and keep only:
“Id”: “47228”,
“Description”: “a620778316624”, (that’s the SKU)
“name”: “#Spiraea japonica ‘Golden Princess’ 2 gal” (that’s the name)
“Qty”: 4 (that’s the field that should be a sum of every lines with the same SKU and description)
Let’s assume that my google sheet is only 4 columns.
Many thanks for your help.
Here is the complete output:
[
{
“domain”: “QBO”,
“sparse”: false,
“Id”: “47228”,
“SyncToken”: “8”,
“MetaData”: {
“CreateTime”: “2023-11-11T03:13:08.000Z”,
“LastUpdatedTime”: “2023-11-11T04:04:52.000Z”
},
“CustomField”: [
{
“DefinitionId”: “1”,
“Name”: “Temps resté sur place”,
“Type”: “StringType”
}
],
“DocNumber”: “9158”,
“TxnDate”: “2023-11-10T05:00:00.000Z”,
“CurrencyRef”: {
“value”: “CAD”,
“name”: “Dollar canadien”
},
“ExchangeRate”: 1,
“TxnStatus”: “Pending”,
“Line”: [
{
“Id”: “2”,
“LineNum”: 1,
“Description”: “a620778316624”,
“Amount”: 7.6,
“DetailType”: “SalesItemLineDetail”,
“SalesItemLineDetail”: {
“ItemRef”: {
“value”: “2775”,
“name”: “#Spiraea japonica ‘Golden Princess’ 2 gal”
},
“UnitPrice”: 7.6,
“Qty”: 1,
“ItemAccountRef”: {
“value”: “367”,
“name”: “4060 Ventes de produits”
},
“TaxCodeRef”: {
“value”: “8”
}
}
},
{
“Id”: “1”,
“LineNum”: 2,
“Description”: “a620778327668”,
“Amount”: 207.2,
“DetailType”: “SalesItemLineDetail”,
“SalesItemLineDetail”: {
“ItemRef”: {
“value”: “1772”,
“name”: “#Hydrangea Paniculata Quick fire PW tige”
},
“UnitPrice”: 51.8,
“Qty”: 4,
“ItemAccountRef”: {
“value”: “367”,
“name”: “4060 Ventes de produits”
},
“TaxCodeRef”: {
“value”: “8”
}
}
},
{
“Id”: “3”,
“LineNum”: 3,
“Description”: “a620778327668”,
“Amount”: 51.8,
“DetailType”: “SalesItemLineDetail”,
“SalesItemLineDetail”: {
“ItemRef”: {
“value”: “1772”,
“name”: “#Hydrangea Paniculata Quick fire PW tige”
},
“UnitPrice”: 51.8,
“Qty”: 1,
“ItemAccountRef”: {
“value”: “367”,
“name”: “4060 Ventes de produits”
},
“TaxCodeRef”: {
“value”: “8”
}
}
},
{
“Id”: “4”,
“LineNum”: 4,
“Description”: “a620778316624”,
“Amount”: 7.6,
“DetailType”: “SalesItemLineDetail”,
“SalesItemLineDetail”: {
“ItemRef”: {
“value”: “2775”,
“name”: “#Spiraea japonica ‘Golden Princess’ 2 gal”
},
“UnitPrice”: 7.6,
“Qty”: 1,
“ItemAccountRef”: {
“value”: “367”,
“name”: “4060 Ventes de produits”
},
“TaxCodeRef”: {
“value”: “8”
}
}
},
{
“Id”: “7”,
“LineNum”: 5,
“Description”: “b620778333744”,
“Amount”: 59,
“DetailType”: “SalesItemLineDetail”,
“SalesItemLineDetail”: {
“ItemRef”: {
“value”: “4020”,
“name”: “Acer Ginella 200 cm”
},
“UnitPrice”: 59,
“Qty”: 1,
“ItemAccountRef”: {
“value”: “367”,
“name”: “4060 Ventes de produits”
},
“TaxCodeRef”: {
“value”: “8”
}
}
},
{
“Amount”: 333.2,
“DetailType”: “SubTotalLineDetail”,
“SubTotalLineDetail”: {}
}
],
“TxnTaxDetail”: {
“TotalTax”: 49.91,
“TaxLine”: [
{
“Amount”: 16.66,
“DetailType”: “TaxLineDetail”,
“TaxLineDetail”: {
“TaxRateRef”: {
“value”: “8”
},
“PercentBased”: true,
“TaxPercent”: 5,
“NetAmountTaxable”: 333.2
}
},
{
“Amount”: 33.25,
“DetailType”: “TaxLineDetail”,
“TaxLineDetail”: {
“TaxRateRef”: {
“value”: “23”
},
“PercentBased”: true,
“TaxPercent”: 9.975,
“NetAmountTaxable”: 333.2
}
}
]
},
“CustomerRef”: {
“value”: “1582”,
“name”: “Julien Pepin (perso)”
},
“BillAddr”: {
“Id”: “13842”
},
“ShipAddr”: {
“Id”: “16098”,
“Line1”: “Julien Pepin (perso)”
},
“FreeFormAddress”: true,
“GlobalTaxCalculation”: “TaxExcluded”,
“TotalAmt”: 383.11,
“HomeTotalAmt”: 383.11,
“PrintStatus”: “NotSet”,
“EmailStatus”: “NotSet”
}
]