【Convenience Retail - Transaction Items】The relationship between columns UNIT_PRICE, DISCOUNT_AMOUNT, TAXABLE_AMOUNT and GRAND_TOTAL_AMOUNT

Hi, I’m trying to use the Transaction Items dataset in Convenience Retail (https://app.deweydata.io/products/5d474ecc-389c-4057-b105-fd5d079e4a5c/structure). However, the values shown in the 2023-12-01 dataset are confusing. Could you give a detailed explanation for the columns and their relationship: columns UNIT_PRICE, DISCOUNT_AMOUNT, TAXABLE_AMOUNT, and GRAND_TOTAL_AMOUNT

From the above picture, it seems like that TAXABLE_AMOUNT = UNIT_PRICE * UNIT_QUANTITY - DISCOUNT_AMOUNT and GRAND_TOTAL_AMOUNT = UNIT_PRICE * UNIT_QUANTITY. I’m a bit confused about which of these amounts represents the actual amount that consumers have to pay. Also, the table structure indicates that UNIT_PRICE refers to the price of an individual unit sold. In that case, why is the discount being subtracted from the UNIT_PRICE when calculating the TAXABLE_AMOUNT?

I looked up some additional documentation and found this:
Screenshot 2024-01-25 at 7.04.30 PM

None of the attributes provided formulas for how they were calculated.