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

CurrencyID should not be present #52

Closed
pkurz opened this issue Jun 30, 2020 · 8 comments
Closed

CurrencyID should not be present #52

pkurz opened this issue Jun 30, 2020 · 8 comments

Comments

@pkurz
Copy link
Contributor

pkurz commented Jun 30, 2020

The attribute currencyID seems to be only relevant in the extended profile. But is being written in every profile.
I switched to the Comfort/EN 16931 profile.

Errors

<error type="24" location="/*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:IncludedSupplyChainTradeLineItem[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:SpecifiedLineTradeAgreement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:GrossPriceProductTradePrice[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:ChargeAmount[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]" criterion="not(@currencyID)">[CII-DT-031] - currencyID should not be present</error>

<error type="24" location="/*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:IncludedSupplyChainTradeLineItem[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:SpecifiedLineTradeAgreement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:NetPriceProductTradePrice[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:ChargeAmount[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]" criterion="not(@currencyID)">[CII-DT-031] - currencyID should not be present</error>

<error type="24" location="/*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:IncludedSupplyChainTradeLineItem[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:SpecifiedLineTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:SpecifiedTradeSettlementLineMonetarySummation[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:LineTotalAmount[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]" criterion="not(@currencyID)">[CII-DT-031] - currencyID should not be present</error>

<error type="24" location="/*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:ApplicableTradeTax[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:CalculatedAmount[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]" criterion="not(@currencyID)">[CII-DT-031] - currencyID should not be present</error>

<error type="24" location="/*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:ApplicableTradeTax[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:BasisAmount[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]" criterion="not(@currencyID)">[CII-DT-031] - currencyID should not be present</error>

<error type="24" location="/*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:SpecifiedTradeSettlementHeaderMonetarySummation[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:LineTotalAmount[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]" criterion="not(@currencyID)">[CII-DT-031] - currencyID should not be present</error>

<error type="24" location="/*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:SpecifiedTradeSettlementHeaderMonetarySummation[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:TaxBasisTotalAmount[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]" criterion="not(@currencyID)">[CII-DT-031] - currencyID should not be present</error>

<error type="24" location="/*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:SpecifiedTradeSettlementHeaderMonetarySummation[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:GrandTotalAmount[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]" criterion="not(@currencyID)">[CII-DT-031] - currencyID should not be present</error>

<error type="24" location="/*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:SpecifiedTradeSettlementHeaderMonetarySummation[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:DuePayableAmount[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]" criterion="not(@currencyID)">[CII-DT-031] - currencyID should not be present</error>

@pkurz
Copy link
Contributor Author

pkurz commented Jun 30, 2020

Thanks for pushing the commit, but it seems that i still get the same errors.

@stephanstapel stephanstapel reopened this Jul 2, 2020
@stephanstapel
Copy link
Owner

Can you provide an example (source code/ ZUGFeRD file)?

@pkurz
Copy link
Contributor Author

pkurz commented Jul 3, 2020

Sorry for late response, here is an example file:
zugferd.zip

@stephan-nowecor
Copy link
Contributor

is it possible that you provide the source code as well?

@pkurz
Copy link
Contributor Author

pkurz commented Jul 6, 2020

        private InvoiceDescriptor CreateInvoice(InvoiceMetadataModel metadata)
        {
            InvoiceDescriptor desc = InvoiceDescriptor.CreateInvoice(metadata.ReferenceNumber, metadata.InvoiceDate, CurrencyCodes.EUR);
            desc.Profile = Profile.Comfort;
            desc.AddNote($"Rechnung {metadata.ReferenceNumber} vom {metadata.InvoiceDate}.");
            desc.SetBuyer(metadata.BuyerInformation.Name1, metadata.BuyerInformation.Plz, metadata.BuyerInformation.Ort, metadata.BuyerInformation.Strasse, CountryCodes.DE, "");
            desc.AddBuyerTaxRegistration("DE1234567890", TaxRegistrationSchemeID.VA);
            desc.SetSeller(metadata.CompanyModel.Name1, metadata.CompanyModel.Plz, metadata.CompanyModel.Ort, metadata.CompanyModel.Strasse, CountryCodes.DE, metadata.CompanyModel.Id.Value, new GlobalID(GlobalID.SchemeID_GLN, "4000001123452"));
            desc.AddSellerTaxRegistration(metadata.CompanyModel.Steuernummer, TaxRegistrationSchemeID.VA);
            desc.addTradeLineItem("Rechnungsbetrag", "", QuantityCodes.LS, 1, metadata.GrossValue, metadata.NetValue, 1, TaxTypes.VAT, TaxCategoryCodes.S,
                metadata.TaxPercent);
            desc.SetTotals(lineTotalAmount: metadata.NetValue, taxBasisAmount: metadata.NetValue, taxTotalAmount: metadata.TaxTotal, grandTotalAmount: metadata.GrossValue, duePayableAmount: metadata.GrossValue);
            desc.AddApplicableTradeTax(metadata.NetValue, metadata.TaxPercent, TaxTypes.VAT, TaxCategoryCodes.S);
            desc.SetTradePaymentTerms($"Zahlbar innerhalb {(metadata.DueDate - metadata.InvoiceDate).TotalDays} Tagen netto bis {metadata.DueDate}", metadata.DueDate);
            

            return desc;
        }

the InvoiceMetadataModel has basic properties from what you'd expect (mostly strings and datetimes).

@stephanstapel
Copy link
Owner

It works with the latest code. I tested:
version 2.1, profiles basic, comfort (no currency), extended (currency).

Could you checkout the latest code and test it again?

@pkurz
Copy link
Contributor Author

pkurz commented Jul 7, 2020

It works with the latest code. I tested:
version 2.1, profiles basic, comfort (no currency), extended (currency).

Could you checkout the latest code and test it again?

Yes it works with the newest version.
Now I get a weird error, which i can't resolve. I'll open another issue for this.

@stephanstapel
Copy link
Owner

I'll close this issue.

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

No branches or pull requests

3 participants