mirror of
https://github.com/internetee/registry.git
synced 2025-07-27 13:06:18 +02:00
update state machine
This commit is contained in:
parent
d28afca00f
commit
06d34e30a8
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ class InvoiceStateMachine
|
|||
end
|
||||
|
||||
def mark_as_unpaid
|
||||
return push_error if invoice.paid? && invoice.payment_orders.last.payment_reference? || invoice.cancelled?
|
||||
return push_error if invoice.paid? && invoice.payment_orders&.last&.payment_reference? || invoice.cancelled?
|
||||
return true unless invoice.paid?
|
||||
|
||||
invoice.cancel_manualy
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue