knowark / facturark

Facturación Electrónica en Python
GNU Lesser General Public License v3.0
3 stars 4 forks source link

[Feature] pre-flight check #13

Closed blaggacao closed 5 years ago

blaggacao commented 5 years ago

I personally find an API like this:

'id': {
    "@attributes": {
        "schemeAgencyID": "195",
        "schemeID": "31",
        "schemeAgencyName": "CO, DIAN (Direccion de Impuestos y Aduanas Nacionales)"
    },
    "#text": "810849728"
}

not optimal, given that this is redundant information. Same goes for

{
    "@attributes": {
        "currencyID": "COP"
    },
    "#text": "885.00"
}

Before stabilizing API would you accept to run a processor which infers those values from document_currency_code or otherwise contextual information (like legal money will always be "CO" or the Agency Scheme will always be the one of the DIAN)?

blaggacao commented 5 years ago

A made a quick basis for discussion here: https://github.com/nubark/facturark/pull/14

tebanep commented 5 years ago

Hi @blaggacao. I'd rather stay with the current API for a while (if not forever), as a modification would generate a great impact in all the composers. The current approach is based in several formats, to name a few:

The format in use doesn't support namespaces, but that is something facturark should be providing anyway. It however provides enough clarity and ease of parsing (specially for the attributes), without becoming too verbose. I think we should concentrate in other areas right now for the foregoing reasons.

blaggacao commented 5 years ago

Alright, sounds like a good plan. Didn't know of those resources...