diff --git a/app/models/bank_transaction.rb b/app/models/bank_transaction.rb index 339d9ab9b..1a2ec5568 100644 --- a/app/models/bank_transaction.rb +++ b/app/models/bank_transaction.rb @@ -75,7 +75,7 @@ class BankTransaction < ActiveRecord::Base create_account_activity( account: registrar.cash_account, invoice: invoice, - sum: sum, + sum: invoice.sum_without_vat, currency: currency, description: description ) diff --git a/spec/models/bank_statement_spec.rb b/spec/models/bank_statement_spec.rb index 84f81aebf..ed9a0218e 100644 --- a/spec/models/bank_statement_spec.rb +++ b/spec/models/bank_statement_spec.rb @@ -63,7 +63,7 @@ describe BankStatement do AccountActivity.count.should == 1 - r.cash_account.balance.should == 240.0 + r.cash_account.balance.should == 200.0 bs.bank_transactions.unbinded.count.should == 1 bs.partially_binded?.should == true diff --git a/spec/models/bank_transaction_spec.rb b/spec/models/bank_transaction_spec.rb index f7e8a3c65..06face618 100644 --- a/spec/models/bank_transaction_spec.rb +++ b/spec/models/bank_transaction_spec.rb @@ -45,7 +45,7 @@ describe BankTransaction do bt.bind_invoice(invoice.number) invoice.receipt_date.should_not be_blank - r.cash_account.balance.should == 240.0 + r.cash_account.balance.should == 200.0 end it 'should not bind transaction with mismatching sums' do