Skip to content

Commit

Permalink
Fix invoice generation by removing EffectiveSpecifiedPeriod
Browse files Browse the repository at this point in the history
EffectiveSpecifiedPeriod is only part of EXTENDED schema and also has only one date field.
  • Loading branch information
halfbyte committed Nov 27, 2024
1 parent fe0c1c6 commit 785ab8a
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions lib/secretariat/invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,20 +147,7 @@ def to_xml(version: 1, validate: true)
xml.text(issue_date.strftime("%Y%m%d"))
end
end
if service_period_start && service_period_end && version == 1
xml['ram'].EffectiveSpecifiedPeriod do
xml['ram'].StartDateTime do
xml['udt'].DateTimeString(format: '102') do
xml.text(service_period_start.strftime("%Y%m%d"))
end
end
xml['ram'].EndDateTime do
xml['udt'].DateTimeString(format: '102') do
xml.text(service_period_end.strftime("%Y%m%d"))
end
end
end
end

end
transaction = by_version(version, 'SpecifiedSupplyChainTradeTransaction', 'SupplyChainTradeTransaction')
xml['rsm'].send(transaction) do
Expand Down

0 comments on commit 785ab8a

Please sign in to comment.