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.
data/lib/bankserv/service.rb
CHANGED
@@ -62,7 +62,8 @@ module Bankserv
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def update_transmission_number!
|
65
|
-
|
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
|
|
data/lib/bankserv/version.rb
CHANGED
@@ -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 == "
|
73
|
+
Bankserv::DebitService.last.config[:transmission_number].should == "622"
|
74
74
|
end
|
75
75
|
|
76
76
|
end
|