abo_parser 1.0.7 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bedd61dfabcfdb6282d302036eea42424235150758b28483466cd264b6aceaa2
4
- data.tar.gz: 883e4e3be76cff14c19685ea9a1d0309ed7b92808e8c8c97412732143c13a722
3
+ metadata.gz: b70778381ce6cb664446141f56c05bd6ef5ac3ccdd4da62c5fb6ded1db738adc
4
+ data.tar.gz: d8171bfe6a261ef496d30461f6cdd669da52a9cb61a640cc5b74c8e5206a17b0
5
5
  SHA512:
6
- metadata.gz: c45668baf21904f20f5ebed9d2d87cb8e433ad64387d74dc3f47bdba51c51258c0ddefae07905c843c58248ec92066040b6ad15e63f30e0fc8fdeeee7a6aa679
7
- data.tar.gz: 5c32caa4958cdc9a83d921109bb1e41c10a31809174e623cefee13e6fa3936c9d7896353d8bd70020fd961bf853c799d2b5095ba2b066e626dc3dffba79ab410
6
+ metadata.gz: a01f4e6ffdd5ed1c9eeccc91f7aaaaa6cb6e679c629a03519c74446576c1366dd85bdc84994b2e350c86481e50e0c3cd82ba21fc5ed019cdb9173851c51a1de9
7
+ data.tar.gz: 4d3bdbdd82383ea9bfa2318f432f979fa8df34397e95b72fbe9b24d7240b80a57b991267f743807c0396b3e9370143eab055ff893eee21073e6ca79efc44fe06
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## [Released]
2
2
 
3
+ ## [1.0.9] - 2023-08-14
4
+
5
+ - Fix potential error when passing negative amount from transaction
6
+
7
+ ## [1.0.8] - 2023-08-14
8
+
9
+ - Fix potential error when exprting bank statement with transactions that have no counter bank account
10
+
3
11
  ## [1.0.6] - 2023-06-11
4
12
 
5
13
  - strip empty spaces from bank statement lines
data/lib/abo.rb CHANGED
@@ -112,11 +112,11 @@ class Abo
112
112
  gpc += transaction[:counter_account_prefix_number].to_s.rjust(6, "0")
113
113
  gpc += transaction[:counter_account_number].to_s.rjust(10, "0")
114
114
  gpc += transaction[:document_number].to_s.ljust(13, " ")
115
- gpc += (transaction[:amount] * 100).to_i.to_s.rjust(12, "0")
115
+ gpc += (transaction[:amount] * 100).abs.to_i.to_s.rjust(12, "0")
116
116
  gpc += transaction[:posting_code].to_s
117
117
  gpc += transaction[:variable_symbol].to_s.rjust(10, "0")
118
- gpc += (transaction[:counter_account_bank_code].rjust(4, "0") +
119
- transaction[:constant_symbol].rjust(4, "0")).rjust(
118
+ gpc += (transaction[:counter_account_bank_code].to_s.rjust(4, "0") +
119
+ transaction[:constant_symbol].to_s.rjust(4, "0")).rjust(
120
120
  10, "0"
121
121
  )
122
122
  gpc += transaction[:specific_symbol].to_s.rjust(10, "0")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AboParser
4
- VERSION = "1.0.7"
4
+ VERSION = "1.0.9"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abo_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rhemery
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-14 00:00:00.000000000 Z
11
+ date: 2023-08-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: