Compare adjustments in deterministic order for invoices

The comparator would sometimes compare two different adjustments when it
should have compared two versions of the same adjustment.
This commit is contained in:
Maikel Linke
2023-09-21 16:33:50 +10:00
parent ee1611904b
commit 6386a997d3

View File

@@ -16,7 +16,7 @@ class Invoice
has_many :all_eligible_adjustments, serializer: Invoice::AdjustmentSerializer
def all_eligible_adjustments
object.all_adjustments.eligible
object.all_adjustments.eligible.order(:id)
end
def completed_at