Please help me with how gross sale money is calculated in the line items of below order. It seems service charge is included in the line item total money. I need to calculate gross sale of this order by category of products excluding service charges.
{
"id": "35YSTWrGiSf4bsm3aqgbTpoeV",
"locationId": "CFDK8M711RK8S",
"lineItems": [
{
"uid": "3996EC26-BC36-4411-B1F2-6CAD9CDA1522",
"name": "Brunch Burrito",
"quantity": "1",
"note": "Bacon ",
"catalogObjectId": "ZNGAZRDU2ZLWDAHNOV26C6B6",
"catalogVersion": 1655060034893,
"variationName": "Regular",
"itemType": "ITEM",
"appliedTaxes": [
{
"uid": "1E3F6FFB-240B-48C4-9DBB-2E078B1BE4C7",
"taxUid": "6EA4845A-2E21-4C5F-BA26-6E4D83AF0EC7",
"appliedMoney": {
"amount": 60,
"currency": "USD"
}
}
],
"basePriceMoney": {
"amount": 600,
"currency": "USD"
},
"variationTotalPriceMoney": {
"amount": 600,
"currency": "USD"
},
"grossSalesMoney": {
"amount": 715,
"currency": "USD"
},
"totalTaxMoney": {
"amount": 60,
"currency": "USD"
},
"totalDiscountMoney": {
"amount": 0,
"currency": "USD"
},
"totalMoney": {
"amount": 711,
"currency": "USD"
}
},
{
"uid": "1F090EC9-3B9A-41CB-82DF-6EBAF0B2A2D2",
"name": "Coffee",
"quantity": "1",
"catalogObjectId": "VX37HMUB5ZPAY33RHRLFXOE5",
"catalogVersion": 1654272643355,
"variationName": "Regular",
"itemType": "ITEM",
"modifiers": [
{
"uid": "D588D381-68DC-4D47-A1AC-210A9ED372EC",
"catalogObjectId": "BFX75LGOBJVWOTUDFWFWJRHG",
"catalogVersion": 1601392006087,
"name": "Hot",
"quantity": "1",
"basePriceMoney": {
"amount": 0,
"currency": "USD"
},
"totalPriceMoney": {
"amount": 0,
"currency": "USD"
}
}
],
"appliedTaxes": [
{
"uid": "FA871FB0-1992-469A-B784-7ADB6D89B7CE",
"taxUid": "6EA4845A-2E21-4C5F-BA26-6E4D83AF0EC7",
"appliedMoney": {
"amount": 35,
"currency": "USD"
}
}
],
"basePriceMoney": {
"amount": 350,
"currency": "USD"
},
"variationTotalPriceMoney": {
"amount": 350,
"currency": "USD"
},
"grossSalesMoney": {
"amount": 465,
"currency": "USD"
},
"totalTaxMoney": {
"amount": 35,
"currency": "USD"
},
"totalDiscountMoney": {
"amount": 0,
"currency": "USD"
},
"totalMoney": {
"amount": 415,
"currency": "USD"
}
},
{
"uid": "D5805745-63D6-4D28-B76E-2F11419A7E68",
"name": "Plain Waffle",
"quantity": "1",
"catalogObjectId": "OMAI567NVGTTGEGUA3UG7ZOU",
"catalogVersion": 1654445276341,
"variationName": "Regular",
"itemType": "ITEM",
"appliedTaxes": [
{
"uid": "7D14F087-5ACF-4507-B8AE-19142E1827B3",
"taxUid": "6EA4845A-2E21-4C5F-BA26-6E4D83AF0EC7",
"appliedMoney": {
"amount": 39,
"currency": "USD"
}
}
],
"basePriceMoney": {
"amount": 395,
"currency": "USD"
},
"variationTotalPriceMoney": {
"amount": 395,
"currency": "USD"
},
"grossSalesMoney": {
"amount": 510,
"currency": "USD"
},
"totalTaxMoney": {
"amount": 39,
"currency": "USD"
},
"totalDiscountMoney": {
"amount": 0,
"currency": "USD"
},
"totalMoney": {
"amount": 468,
"currency": "USD"
}
}
],
"taxes": [
{
"uid": "6EA4845A-2E21-4C5F-BA26-6E4D83AF0EC7",
"catalogObjectId": "LN7JOYZXU45W4NVU7XY24QSE",
"catalogVersion": 1602802401911,
"name": "Sales Tax",
"type": "ADDITIVE",
"percentage": "10",
"appliedMoney": {
"amount": 134,
"currency": "USD"
},
"scope": "LINE_ITEM"
}
],
"serviceCharges": [
{
"uid": "EC62E189-17C2-4B0C-816D-1365575858CD",
"name": "Bagging fee",
"catalogObjectId": "BVEDWWWXXSTGEWWHS5K2KI7A",
"catalogVersion": 1655166702061,
"amountMoney": {
"amount": 75,
"currency": "USD"
},
"appliedMoney": {
"amount": 75,
"currency": "USD"
},
"totalMoney": {
"amount": 75,
"currency": "USD"
},
"totalTaxMoney": {
"amount": 0,
"currency": "USD"
},
"calculationPhase": "APPORTIONED_AMOUNT_PHASE",
"taxable": false,
"type": "CUSTOM"
},
{
"uid": "4BE73DBE-7957-4B08-ACC1-459B8AE001EC",
"name": "Credit card processing fee ",
"catalogObjectId": "PHE675YBPPWB2YYUVFI7C2FG",
"catalogVersion": 1655220964580,
"percentage": "3",
"appliedMoney": {
"amount": 40,
"currency": "USD"
},
"totalMoney": {
"amount": 40,
"currency": "USD"
},
"totalTaxMoney": {
"amount": 0,
"currency": "USD"
},
"calculationPhase": "APPORTIONED_PERCENTAGE_PHASE",
"taxable": false,
"type": "CUSTOM"
}
],
"returnAmounts": {},
"netAmounts": {
"totalMoney": {
"amount": 1881,
"currency": "USD"
},
"taxMoney": {
"amount": 134,
"currency": "USD"
},
"discountMoney": {
"amount": 0,
"currency": "USD"
},
"tipMoney": {
"amount": 287,
"currency": "USD"
},
"serviceChargeMoney": {
"amount": 115,
"currency": "USD"
}
},
"tenders": [
{
"id": "RAo22jiL3BBzEK9KH8iKK4QJvaB",
"locationId": "CFDK8M711RK8S",
"transactionId": "35YSTWrGiSf4bsm3aqgbTpoeV",
"createdAt": "2022-06-19T18:55:59Z",
"amountMoney": {
"amount": 1881,
"currency": "USD"
},
"tipMoney": {
"amount": 287,
"currency": "USD"
},
"processingFeeMoney": {
"amount": 59,
"currency": "USD"
},
"type": "CARD"
}
],
"createdAt": "2022-06-19T18:56:08Z",
"updatedAt": "2022-06-19T18:56:08Z",
"closedAt": "2022-06-19T18:56:08Z",
"state": "COMPLETED",
"totalMoney": {
"amount": 1881,
"currency": "USD"
},
"totalTaxMoney": {
"amount": 134,
"currency": "USD"
},
"totalDiscountMoney": {
"amount": 0,
"currency": "USD"
},
"totalTipMoney": {
"amount": 287,
"currency": "USD"
},
"totalServiceChargeMoney": {
"amount": 115,
"currency": "USD"
},
"square_product": [
"SQUARE_POS"
]
}