mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 03:30:33 +02:00
parent
3d107bd198
commit
b68fe6e312
16 changed files with 110 additions and 92 deletions
|
@ -47,7 +47,7 @@ class BankTransaction < ActiveRecord::Base
|
|||
return if invoice.binded?
|
||||
return if invoice.cancelled?
|
||||
|
||||
return if invoice.sum != sum
|
||||
return if invoice.total != sum
|
||||
create_activity(registrar, invoice)
|
||||
end
|
||||
# rubocop: enable Metrics/PerceivedComplexity
|
||||
|
@ -76,7 +76,7 @@ class BankTransaction < ActiveRecord::Base
|
|||
return
|
||||
end
|
||||
|
||||
if invoice.sum != sum
|
||||
if invoice.total != sum
|
||||
errors.add(:base, I18n.t('invoice_and_transaction_sums_do_not_match'))
|
||||
return
|
||||
end
|
||||
|
@ -88,7 +88,7 @@ class BankTransaction < ActiveRecord::Base
|
|||
create_account_activity(
|
||||
account: registrar.cash_account,
|
||||
invoice: invoice,
|
||||
sum: invoice.sum_without_vat,
|
||||
sum: invoice.subtotal,
|
||||
currency: currency,
|
||||
description: description,
|
||||
activity_type: AccountActivity::ADD_CREDIT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue