Skip to content

Omit discout reason if blank#48

Merged
halfbyte merged 1 commit intohalfbyte:mainfrom
valii2334:omit_discout_reason_if_blank
Apr 22, 2026
Merged

Omit discout reason if blank#48
halfbyte merged 1 commit intohalfbyte:mainfrom
valii2334:omit_discout_reason_if_blank

Conversation

@valii2334
Copy link
Copy Markdown
Contributor

@valii2334 valii2334 commented Feb 18, 2026

Some validators throw a warning if discount_reason is blank.
We shouldn't add it if it's blank.

Copy link
Copy Markdown
Owner

@halfbyte halfbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi. Thanks for the PR, this looks good, I have two small changes I'd like you to make.

Comment thread lib/secretariat/version.rb Outdated

module Secretariat
VERSION = "3.8.1"
VERSION = "3.8.2"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this change. Incrementing version numbers happens during the release process.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated 😄

Comment thread test/invoice_test.rb Outdated
assert_match(/<ram:ExemptionReason>Reverse Charge<\/ram:ExemptionReason>/, xml)
assert_match(/<ram:RateApplicablePercent>/, xml)
assert_match(%r{<ram:BuyerTradeParty>\s*<ram:ID>Kunde 4711</ram:ID>}, xml)
assert_equal xml.include?('<ram:Reason>'), false
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would prefer refute xml.include?('<ram:Reason>') or even a refute_match` here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated 😄

@valii2334 valii2334 force-pushed the omit_discout_reason_if_blank branch from f0fab50 to d466951 Compare April 22, 2026 11:50
@valii2334 valii2334 requested a review from halfbyte April 22, 2026 11:53
@halfbyte halfbyte merged commit ed94879 into halfbyte:main Apr 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants