Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add profile ID #12

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/xrechnung.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,20 @@ class Document

# Default customization specs
DEFAULT_CUSTOMIZATION_ID = "urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.3"
DEFAULT_PROFILE_ID = "urn:fdc:peppol.eu:2017:poacc:billing:01:1.0"

# Document customization identifier
#
# @!attribute customization_id
# @return [String]
member :customization_id, type: String, default: DEFAULT_CUSTOMIZATION_ID

# Document profile identifier
#
# @!attribute profile_id
# @return [String]
member :profile_id, type: String, default: DEFAULT_PROFILE_ID

# Invoice number BT-1
#
# Eine eindeutige Kennung der Rechnung, die diese im System des Verkäufers identifiziert.
Expand Down Expand Up @@ -265,6 +272,7 @@ def to_xml(indent: 2, target: "")
"xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance",
"xsi:schemaLocation" => "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 http://docs.oasis-open.org/ubl/os-UBL-2.1/xsd/maindoc/UBL-Invoice-2.1.xsd" do
xml.cbc :CustomizationID, customization_id
xml.cbc :ProfileID, profile_id
xml.cbc :ID, id
xml.cbc :IssueDate, issue_date
xml.cbc :DueDate, due_date
Expand Down
1 change: 1 addition & 0 deletions spec/fixtures/xrechnung.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<!-- generated by https://xrechnungsgenerator.nortal.com/ -->
<ubl:Invoice xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 http://docs.oasis-open.org/ubl/os-UBL-2.1/xsd/maindoc/UBL-Invoice-2.1.xsd">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.3</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>0815-99-1-a</cbc:ID>
<cbc:IssueDate>2020-08-21</cbc:IssueDate>
<cbc:DueDate>2020-08-31</cbc:DueDate>
Expand Down
Loading