mirror of
https://github.com/internetee/registry.git
synced 2025-07-30 22:46:22 +02:00
protected public method account activity create
This commit is contained in:
parent
c33dff517f
commit
e88db960da
2 changed files with 10 additions and 9 deletions
|
@ -88,7 +88,16 @@ class BankTransaction < ApplicationRecord
|
|||
errors.add(:base, I18n.t('invoice_and_transaction_sums_do_not_match')) if invoice.total != sum
|
||||
end
|
||||
|
||||
def parsed_ref_number
|
||||
reference_no || ref_number_from_description
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def create_activity(registrar, invoice)
|
||||
validate_invoice_data(invoice)
|
||||
return if errors.any?
|
||||
|
||||
activity = AccountActivity.new(account: registrar.cash_account, bank_transaction: self,
|
||||
invoice: invoice, sum: invoice.subtotal,
|
||||
currency: currency, description: description,
|
||||
|
@ -102,12 +111,6 @@ class BankTransaction < ApplicationRecord
|
|||
end
|
||||
end
|
||||
|
||||
def parsed_ref_number
|
||||
reference_no || ref_number_from_description
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def reset_pending_registrar_balance_reload(registrar)
|
||||
return unless registrar.settings['balance_auto_reload']
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue