GithubHelp home page GithubHelp logo

Comments (8)

pkurz avatar pkurz commented on May 20, 2024

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

from zugferd-csharp.

stephanstapel avatar stephanstapel commented on May 20, 2024

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

from zugferd-csharp.

pkurz avatar pkurz commented on May 20, 2024

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

from zugferd-csharp.

stephan-nowecor avatar stephan-nowecor commented on May 20, 2024

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

from zugferd-csharp.

pkurz avatar pkurz commented on May 20, 2024
        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).

from zugferd-csharp.

stephanstapel avatar stephanstapel commented on May 20, 2024

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?

from zugferd-csharp.

pkurz avatar pkurz commented on May 20, 2024

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.

from zugferd-csharp.

stephanstapel avatar stephanstapel commented on May 20, 2024

I'll close this issue.

from zugferd-csharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.