bankserv 0.7.1 → 0.7.2

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.
@@ -62,7 +62,8 @@ module Bankserv
62
62
  end
63
63
 
64
64
  def update_transmission_number!
65
- config[:transmission_number] = (config[:transmission_number].to_i + 1).to_s
65
+ last_successful_submission = Bankserv::Document.where(type: 'input', client_code: self.client_code, reply_status: "ACCEPTED").last
66
+ config[:transmission_number] = (last_successful_submission.transmission_number.to_i + 1).to_s #(config[:transmission_number].to_i + 1).to_s
66
67
  save!
67
68
  end
68
69
 
@@ -1,3 +1,3 @@
1
1
  module Bankserv
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
3
3
  end
@@ -70,7 +70,7 @@ describe Bankserv::ReplyDocument do
70
70
 
71
71
  it "should update the tranmission number of the service" do
72
72
  @reply_document.process!
73
- Bankserv::DebitService.last.config[:transmission_number].should == "2"
73
+ Bankserv::DebitService.last.config[:transmission_number].should == "622"
74
74
  end
75
75
 
76
76
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 7
8
- - 1
9
- version: 0.7.1
8
+ - 2
9
+ version: 0.7.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jeffrey van Aswegen