moov-io / accounts

accounts - General Ledger and financial account service with an HTTP API
https://moov.io
Apache License 2.0
48 stars 14 forks source link

cmd/server: calculate transactions with only positive amounts #59

Closed adamdecaf closed 4 years ago

adamdecaf commented 4 years ago

Sum transactions (and update balances) according to debit/credit rather than sometimes pass negative numbers around and sometimes not.

codecov-io commented 4 years ago

Codecov Report

Merging #59 into master will increase coverage by 0.44%. The diff coverage is 80.64%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #59      +/-   ##
==========================================
+ Coverage   63.39%   63.84%   +0.44%     
==========================================
  Files          11       11              
  Lines         806      827      +21     
==========================================
+ Hits          511      528      +17     
- Misses        222      224       +2     
- Partials       73       75       +2
Impacted Files Coverage Δ
cmd/server/transactions.go 84.55% <100%> (+0.51%) :arrow_up:
cmd/server/transaction_storage_qledger.go 86.84% <100%> (+0.92%) :arrow_up:
cmd/server/transaction_storage_sqlite.go 61.18% <60%> (+0.46%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 96b7c02...549df85. Read the comment docs.