Question

Looking into my Magento database inside the sales_flat_order table, I find - since the day I updated from the 1.4 to the 1.5 version - the values of discount_amount being negative (e.g. -5 EUR for a 5 EUR coupon code).

Before that date (in the database), all the discount_amount values are positive (e.g. 5 EUR for a 5 EUR coupon code).

Now I'm puzzled. Does Magento by standard store positive or negative values into the sales_flat_order table?

I assume that there should be a positive number in that field and the negative number has been introduced in error. However gaining some clarification through feedback by others would be great.

Additional notes:

  • The database design itself allows to store both negative and positive values in that column.
  • In the admin, orders with both a positive or negative discount_amount (and base_discount_amount) do behave exactly the same with the only difference having the number displayed as negative or positive. But negative numbers magically get multiplied by -1 in the calculation.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top