Files
GTI_GERENCIADOR_FISCAL/central/app/fiscal_determination.py
T

12 lines
576 B
Python

"""Conservative fiscal determination with no inferred tax rules."""
class FiscalDetermination:
def determine(self, context):
candidates = context.get("cest_candidates", [])
cest = candidates[0] if len(candidates) == 1 else None
reason_codes = ["OFFICIAL_RULE_NOT_IMPLEMENTED", "MISSING_ST_DETERMINATION", "MISSING_PRODUCT_ORIGIN"]
if len(candidates) > 1:
reason_codes.append("CEST_AMBIGUOUS")
return {"cest": cest, "csosn": None, "cfop": None, "confidence": 0.0, "reason_codes": reason_codes, "can_auto_apply": False}