invoice-x / factur-x-ng

Python lib for Factur-X, the e-invoicing standard for France and Germany
Other
34 stars 8 forks source link

JSON export #28

Closed duskybomb closed 6 years ago

duskybomb commented 6 years ago

Features:

for issue #4

duskybomb commented 6 years ago

All tasks done now you can review this, whenever free @m3nu.

m3nu commented 6 years ago

Can't merge this now. Needs major changes. See comments in files.

duskybomb commented 6 years ago

Almost all the suggestions have been taken care of. The only thing is how not to hard-code namespaces and a way to remove nested IF (the problem is I am looping after every IF condition)

m3nu commented 6 years ago

There is still flavor-specific logic.

duskybomb commented 6 years ago

Added a new commit.

m3nu commented 6 years ago

None of my input was addressed. All your loops are a mess. If you can't do it any better, just leave it open for me to rewrite it. Just can't be merged like this ever.

duskybomb commented 6 years ago

I understand, I have now addressed all the flavor specific issues. I don't understand what you mean by "loops are a mess". Can you explain?

m3nu commented 6 years ago

In this PR you are duplicating functionality that already exists in other parts of the class. Like parsing an XML file.

You also made very complicated methods that require more input instead of just using the current class instance. If you do it like this, there is no point in using an OO design.

So most code except for __make_dict() can be removed. We only need __make_dict() + some code to save the json file.