fix financial transaction type not found
This commit is contained in:
parent
219b5f2de8
commit
bcc647dabb
2 changed files with 2 additions and 3 deletions
|
|
@ -41,7 +41,7 @@ class GroupOrderInvoice < ApplicationRecord
|
|||
def init
|
||||
self.invoice_date = Time.now unless invoice_date
|
||||
self.invoice_number = generate_invoice_number(1) unless self.invoice_number
|
||||
self.payment_method = FoodsoftConfig[:group_order_invoices]&.[](:payment_method) || I18n.t('activerecord.attributes.group_order_invoice.payment_method') unless self.payment_method
|
||||
self.payment_method = group_order&.financial_transaction&.financial_transaction_type&.name || FoodsoftConfig[:group_order_invoices]&.[](:payment_method) || I18n.t('activerecord.attributes.group_order_invoice.payment_method') unless self.payment_method
|
||||
end
|
||||
|
||||
def name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue