Order refund amounts must be stored, not calculated properties #89411

Closed
opened 2021-06-24 17:58:27 +02:00 by Anna Sirota · 2 comments
Owner

Currently, Order has no columns that store any data about refunds, that data has to be computed based on order's transactions, which makes the following problematic/slow/near impossible:

  • filtering for orders with refunds;
  • aggregating orders refunds (which is necessary for running reports, such as tax reports);
  • having consistent refund amounts in the future (relying on consistent rounding arithmetic in Python is destined to backfire).

Order should get extra columns to store refunded amounts (the actual sum of Transaction.amount_refunded and the refunded tax, if applicable).

Currently, `Order` has no columns that store any data about refunds, that data has to be computed based on order's transactions, which makes the following problematic/slow/near impossible: * filtering for orders with refunds; * aggregating orders refunds (which is necessary for running reports, such as tax reports); * having consistent refund amounts in the future (relying on consistent rounding arithmetic in Python is destined to backfire). `Order` should get extra columns to store refunded amounts (the actual sum of `Transaction.amount_refunded` and the refunded tax, if applicable).
Anna Sirota self-assigned this 2021-06-24 17:58:27 +02:00
Author
Owner

Added subscriber: @railla

Added subscriber: @railla
Author
Owner

Changed status from 'Needs Triage' to: 'Resolved'

Changed status from 'Needs Triage' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: infrastructure/looper#89411
No description provided.