GithubHelp home page GithubHelp logo

Comments (6)

stephanstapel avatar stephanstapel commented on June 3, 2024

Not quite. The first line is written in case of profiles basic, comfort or extended.
The second line is written in case of profiles xrechnung 1 oder xrechnung 2.x

But I guess a good comment would help here.

from zugferd-csharp.

alexruett avatar alexruett commented on June 3, 2024

Thanks for your quick reply. I wouldn't have done it that way, but ok.
So, if Description is passed, Name is never used but instead always "TEXT" is exported?

from zugferd-csharp.

stephanstapel avatar stephanstapel commented on June 3, 2024

!isCommentItem ? tradeLineItem.Name : "TEXT"
if it is a comment item, "TEXT" is written. If not, the name is writtten instead.

If you have an example about a comment line, feel free to drop it here. I'm not understanding yet where you are aiming at.

from zugferd-csharp.

alexruett avatar alexruett commented on June 3, 2024

if it is a comment item, "TEXT" is written. If not, the name is writtten instead.

That caused problems in my case.
I was passing both Name and Description and wondered, why name wasn't exported but "TEXT" instead.
I think, it's good, that "TEXT" is exported in case of a comment and if Name is empty, but I'm not sure, if it's good/correct to always export Name as "TEXT", but again: I don't know, if this was intentionally and according to the xrechnung standard or if this indeed is a bug.
I expected, that both Name and Description were written, but maybe my expectations are just wrong ;-).

from zugferd-csharp.

stephanstapel avatar stephanstapel commented on June 3, 2024

ok, thanks. After reviewing the code, I found my old comment that xrechnung trade line items require the name to be filled:

grafik

That seems to be the reason why I'm writing 'TEXT' in this case.
I'm only wondering why it is written twice in your use case. Which profile are you using?

To be it looks like the two statements are mutually exclusive:

grafik

from zugferd-csharp.

alexruett avatar alexruett commented on June 3, 2024

By "written twice" I meant, that there are two lines of code, that write the element ram:Name. I only realized through this conversation, that they are mutually exclusive (which I would never have done this way (no offense) and that's probably the reason, why I missed that). In the exported file there is only one entry for the item.
I still find it questionable, that the Name isn't used, even if it is filled, but my solution for creating a comment item in the xrechnung now is, that I write the whole text in the Description and let Name empty.
That should do it, even if the implementation in InvoiceDescriptor21Writer may change someday.
Thanks.

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.