Closed lucanioi closed 1 year ago
@lucanioi yes, I agree, it does feel too complex. I was working on simplifying last week, but hit a few road blocks. In my opinion from the gobl
package it should be possible to get a list of scheme objects for the current document directly from the regime.
This is what it would look like form the Italy provider with the new
Tags
as well asScheme
+InvoiceType
approach to mapping FatturaPA codes. I put everything in codes.go so it's easier to evaluate.What do you think? Feels like the logic is too complex and too dependent on gobl's inner workings to put inside of the provider... at the same time, I'm not sure moving this logic to gobl would make sense either, given it's pretty Italy-specific. Or maybe we can at least create a gobl functionality where you can fetch the scheme definitions based on on the invoice properties. Something like: