mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
Fix CC issues
This commit is contained in:
parent
df79982881
commit
18aa7e3d63
1 changed files with 6 additions and 8 deletions
|
@ -42,8 +42,7 @@ class BankTransaction < ApplicationRecord
|
|||
return unless autobindable?
|
||||
|
||||
channel = manual ? 'admin_payment' : 'system_payment'
|
||||
create_internal_payment_record(channel: channel, invoice: invoice,
|
||||
registrar: registrar)
|
||||
create_internal_payment_record(channel: channel, invoice: invoice, registrar: registrar)
|
||||
end
|
||||
|
||||
def create_internal_payment_record(channel: nil, invoice:, registrar:)
|
||||
|
@ -92,12 +91,11 @@ class BankTransaction < ApplicationRecord
|
|||
end
|
||||
|
||||
def create_activity(registrar, invoice)
|
||||
activity = AccountActivity.new(
|
||||
account: registrar.cash_account, bank_transaction: self,
|
||||
invoice: invoice, sum: invoice.subtotal,
|
||||
currency: currency, description: description,
|
||||
activity_type: AccountActivity::ADD_CREDIT
|
||||
)
|
||||
activity = AccountActivity.new(account: registrar.cash_account, bank_transaction: self,
|
||||
invoice: invoice, sum: invoice.subtotal,
|
||||
currency: currency, description: description,
|
||||
activity_type: AccountActivity::ADD_CREDIT)
|
||||
|
||||
if activity.save
|
||||
reset_pending_registrar_balance_reload
|
||||
true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue