Skip to content

[Prod][Invoice] Possibly inconsistent/inaccurate aasm_states #12319

@garyhtou

Description

@garyhtou

While working on #11847 (review), I discovered:

Invoice.where.not(manually_marked_as_paid_at: nil).pluck(:aasm_state).tally
#=> {"deposited_v2" => 152, "paid_v2" => 32, "void_v2" => 24}

^ There is a chance in state behavior when someone manually marks an invoice as paid. I think we used to make them deposited, but now they're voided.

v = Invoice.void_v2.or(Invoice.refunded_v2).select(&:deposited?)
v.count
#=> 33

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions