From daaf0d354bc1975917960f1d60192c388fa31a1e Mon Sep 17 00:00:00 2001 From: Dhiraj Mishra Date: Tue, 11 Sep 2018 20:18:58 +0530 Subject: [PATCH] CL-13157 Added receiver's code --- lib/baldr/builder.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/baldr/builder.rb b/lib/baldr/builder.rb index 34c5a54..dc9a07d 100644 --- a/lib/baldr/builder.rb +++ b/lib/baldr/builder.rb @@ -11,6 +11,7 @@ def initialize(params = {}) end @functional_groups_control_numbers = params[:functional_groups_control_numbers] || {} + @receiver_code = params[:receiver_code] end def ST(&block) @@ -42,7 +43,7 @@ def build_functional_groups group = Baldr::FunctionalGroup.new group.functional_identifier_code = group_id group.application_senders_code = @envelope.sender_id - group.application_receivers_code = @envelope.receiver_id + group.application_receivers_code = @receiver_code.present? ? @receiver_code : @envelope.receiver_id group.version_release_industry_code = "#{@envelope.standard_version_number}0" group.date_time = @envelope.date_time group.group_control_number = @functional_groups_control_numbers[group_id]