Calculating the discount amount with UK taxes

Hello,

Could someone please help me understand how to calculate the effective discount amount for this particular line item (with UK VAT). The line item data is below:

{
  "id": 13976006394078,
  "current_quantity": 1,
  "fulfillable_quantity": 0,
  "fulfillment_status": "fulfilled",
  "gift_card": false,
  "price": "12.50",
  "price_set": {
    "shop_money": { "amount": "12.50", "currency_code": "GBP" },
    "presentment_money": { "amount": "12.50", "currency_code": "GBP" }
  },
  "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": "GBP" },
    "presentment_money": { "amount": "0.00", "currency_code": "GBP" }
  },
  "variant_inventory_management": "shopify",
  "tax_lines": [
    {
      "channel_liable": false,
      "price": "0.72",
      "price_set": {
        "shop_money": { "amount": "0.72", "currency_code": "GBP" },
        "presentment_money": { "amount": "0.72", "currency_code": "GBP" }
      },
      "rate": 0.2,
      "title": "GB VAT"
    }
  ],
  "duties": [],
  "discount_allocations": [
    {
      "amount": "8.19",
      "amount_set": {
        "shop_money": { "amount": "8.19", "currency_code": "GBP" },
        "presentment_money": { "amount": "8.19", "currency_code": "GBP" }
      },
      "discount_application_index": 0
    }
  ]
}

The discount applications is:

{
  "discount_applications": [
    {
      "target_type": "line_item",
      "type": "discount_code",
      "value": "20.0",
      "value_type": "fixed_amount",
      "allocation_method": "across",
      "target_selection": "all"
    }
  ]
}

Since the discount is “fixed_amount”, I assumed it should be based on the amount from the “discount_allocations” field, which is 8.19. However, in the Sales report that was generated, the discount amount is 6.82.

If we use a 20% tax rate for the 8.19 amount, it only equates to 6.55. Do you know the calculation that is needed to arrive at the 6.82 value?

Thanks!