easybill / zugferd-php

ZUGFeRD PHP SDK (Factur-X, XRechnung)
https://www.easybill.de
MIT License
75 stars 35 forks source link

Add support for TradeTax > ExemptionReasonCode #48

Closed pableu closed 8 months ago

PATROMO commented 1 year ago

@pableu see code style test.

pableu commented 1 year ago

@PATROMO fixed, thanks :)

PATROMO commented 1 year ago

@pableu thanks. Can you extend the Test tests/zugferd211/Tests/BuilderTest.php:169 with your new property?

pableu commented 1 year ago

I can, but I'd have to set it to null or also modify tests/zugferd211/Tests/official_example_xml/zugferd_2p1_XRECHNUNG_Einfach.xml.

The former seems a bit silly, and the latter feels wrong because it's an "official example" and I'd feel bad about modifying it.

Also, anything else than null won't make sense in the context of the sample document because the sample invoice there is including vat, so adding a (Vat)ExemptionReason(Code) other than "null" doesn't make sense.

What do you think? Silly test with null? Or no test?

Or a whole new test? I don't feel confident about adding a completely new test and new test data.

Lorenzschaef commented 1 year ago

@pableu, you can extend the test testBuildXRechnungExtendedExample, which already has more elements than the official example.

BolZer commented 8 months ago

This issue is done with #60. Gonna close this PR.