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

Validate country and currency against iso standards #33

Closed duskybomb closed 6 years ago

duskybomb commented 6 years ago

I was not sure how to sure iso-standard data, so I have stored it in json for now.

m3nu commented 6 years ago

The facturx.py module is meant to be high-class. Everything related to the different XML flavors goes into the flavors module.

m3nu commented 6 years ago
duskybomb commented 6 years ago

Done.

m3nu commented 6 years ago

Some thoughtful solutions in there. Well done.

m3nu commented 6 years ago

Another dead body in your basement. Did you ever run this code? It doesn't work as you think.

        codes_to_check = {
            'currency': 'currency',
            'country': 'seller_country',
            'country': 'buyer_country',
            'country': 'shipping_country'
        }
m3nu commented 6 years ago

On top of that, the validation doesn't work at all. And there is already a package that has all the base data you put in your CSV: https://pypi.org/project/pycountry/

I'll use that instead.