Increase account balance without vat #2663

This commit is contained in:
Martin Lensment 2015-06-12 12:56:49 +03:00
parent a437ef3ed9
commit 863f32a026
3 changed files with 3 additions and 3 deletions

View file

@ -75,7 +75,7 @@ class BankTransaction < ActiveRecord::Base
create_account_activity( create_account_activity(
account: registrar.cash_account, account: registrar.cash_account,
invoice: invoice, invoice: invoice,
sum: sum, sum: invoice.sum_without_vat,
currency: currency, currency: currency,
description: description description: description
) )

View file

@ -63,7 +63,7 @@ describe BankStatement do
AccountActivity.count.should == 1 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.bank_transactions.unbinded.count.should == 1
bs.partially_binded?.should == true bs.partially_binded?.should == true

View file

@ -45,7 +45,7 @@ describe BankTransaction do
bt.bind_invoice(invoice.number) bt.bind_invoice(invoice.number)
invoice.receipt_date.should_not be_blank invoice.receipt_date.should_not be_blank
r.cash_account.balance.should == 240.0 r.cash_account.balance.should == 200.0
end end
it 'should not bind transaction with mismatching sums' do it 'should not bind transaction with mismatching sums' do