bank-statement-balance-review 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6e6a47610d1fd595139c7c82b8bf9591b5e089cc345cceb57f7d81afe3e2d2b6
4
+ data.tar.gz: cacd683ad52dbbec5623f93ecbfad69850bdbf2c8d95491411ed69ff44c690c0
5
+ SHA512:
6
+ metadata.gz: 9dfd3d3c08543c9ed25e5985562d8bb9b4c607c6808c975aece5098bb9f86de289779ea6b106cff01d50ed79f64d1997656cc0a5ddba410bb2a35536b9faa288
7
+ data.tar.gz: d0ba5f923263e2107e1dd6392d089289afe68fef23a266e923841e42f2ad4ac7dd1fe35e425f9767dc964a537c8a607aafa461536ca0c01ea8fcc569dea75791
data/README.md ADDED
@@ -0,0 +1,9 @@
1
+ # Bank Statement Balance Review
2
+
3
+ Reconcile an opening balance and signed transactions locally. After conversion, compare the calculated balance with the original statement and review transaction dates, signs and missing rows. This helper works with integer minor units to avoid floating-point rounding.
4
+
5
+ For the related workflow, see [bank statement converter](https://bankfiletool.com/). This library is a local review helper; it does not upload data or perform conversion or enhancement.
6
+
7
+ ## Usage
8
+
9
+ Require `bank_statement_balance_review` and call the documented module method with locally decoded data. Ruby 2.6 or later is required.
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Reconcile an opening balance and signed transactions locally.
4
+ module BankStatementBalanceReview
5
+ # Reconcile signed transactions in integer minor units (for example, cents).
6
+ # Returns the expected closing balance and its difference from the reported one.
7
+ def self.reconcile(opening, transactions, reported_closing)
8
+ raise ArgumentError, 'use integer minor units' unless opening.is_a?(Integer) && reported_closing.is_a?(Integer) && transactions.is_a?(Array) && transactions.all? { |v| v.is_a?(Integer) }
9
+ expected = opening + transactions.sum
10
+ { expected: expected, difference: reported_closing - expected }
11
+ end
12
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bank-statement-balance-review
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Content True
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2026-12-04 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email:
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - README.md
20
+ - lib/bank_statement_balance_review.rb
21
+ homepage: https://bankfiletool.com/
22
+ licenses:
23
+ - MIT
24
+ metadata: {}
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '2.6'
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ requirements: []
40
+ rubygems_version: 3.0.3.1
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Reconcile an opening balance and signed transactions locally.
44
+ test_files: []