Hello,
We are trying to figure out why there was a difference in the Discount value when you get the order details via the Orders API and when downloading the Total Sales report (in the shop admin reports).
For the Total Sales report, it shows the Discount value as:
7.26
However, when you check the Order JSON below, the discount_allocations amount is:
8.86
Here are the line item details (fields that refer to the particular store have been removed):
"line_items": [
{
"fulfillable_quantity": 0,
"fulfillment_service": "manual",
"fulfillment_status": "fulfilled",
"gift_card": false,
"grams": 1100,
"price": "88.56",
"price_set": {
"shop_money": { "amount": "88.56", "currency_code": "USD" },
"presentment_money": { "amount": "79.00", "currency_code": "EUR" }
},
"product_exists": true,
"properties": [],
"quantity": 1,
"requires_shipping": true,
"taxable": true,
"total_discount": "0.00",
"total_discount_set": {
"shop_money": { "amount": "0.00", "currency_code": "USD" },
"presentment_money": { "amount": "0.00", "currency_code": "EUR" }
},
"variant_inventory_management": "shopify",
"variant_title": null,
"tax_lines": [
{
"channel_liable": false,
"price": "14.37",
"price_set": {
"shop_money": { "amount": "14.37", "currency_code": "USD" },
"presentment_money": { "amount": "12.82", "currency_code": "EUR" }
},
"rate": 0.22,
"title": "IT IVA"
}
],
"duties": [],
"discount_allocations": [
{
"amount": "8.86",
"amount_set": {
"shop_money": { "amount": "8.86", "currency_code": "USD" },
"presentment_money": { "amount": "7.90", "currency_code": "EUR" }
},
"discount_application_index": 0
}
]
}
],
We think this is related to VAT since this order was shipped in the EU. How would we calculate the correct Discount value in this scenario? Thanks!