-
Notifications
You must be signed in to change notification settings - Fork 51
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
[BUG] ZugferdSettings::addSpecialDecimalPlacesMap doesn't work for BasisPeriodMeasure #169
Comments
Good evening @stiefelsalat, First of all: I'm used to opening an issue with a friendly “hello” or “good afternoon” or “good evening”. Next: Please formulate your request with sufficient information and don't just blurt out your “problem”. I am more than happy to deal with your request, but I am not in a position to help you in the form you have presented it. Kind regards |
#169 Handle Decimals of the measure type
Good morning @stiefelsalat, The problem has been solved. The measure type must be considered and dealt with separately. I had to implement a separate handler for this type with a separate decimal place property in the ZugferdSettings::setMeasureDecimals(0); or (for example): ZugferdSettings::addSpecialDecimalPlacesMap('/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:ApplicableTradePaymentDiscountTerms/ram:BasisPeriodMeasure', 0); I hope this helps you. Kind regards |
By setting
ZugferdSettings::addSpecialDecimalPlacesMap('/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:ApplicableTradePaymentDiscountTerms/ram:BasisPeriodMeasure',0);
I still get an result like
<ram:BasisPeriodMeasure unitCode="DAY">14.0</ram:BasisPeriodMeasure>
I can't validate my invoices with an BasisPeriodMeasure having decimals.
The function
ZugferdSettings::addSpecialDecimalPlacesMap()
works fine on different fields, but somehow not on the BasisPeriodMeasureSample code:
ZugferdSettings::addSpecialDecimalPlacesMap('/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:ApplicableTradePaymentDiscountTerms/ram:BasisPeriodMeasure',0);
$document = ZugferdDocumentBuilder::CreateNew(ZugferdProfiles::PROFILE_EXTENDED);
$document->addDocumentPaymentTerm("Fälligkeitsdatum: 05.12.24 ; Skonto 3% bis zum 19.11.24",\DateTime::createFromFormat("d.m.y", "19.11.24"))
->addDiscountTermsToPaymentTerms(3,\DateTime::createFromFormat("d.m.y", "05.11.24"), 14, "DAY",2123.53,63.71)
The text was updated successfully, but these errors were encountered: