Files
GTI_GERENCIADOR_FISCAL/fiscal/central/app/fiscal_determination.py
T
gti d21a9d1140 Add 'fiscal/' from commit '102ba84500dbd9655a0471288c3e278652593ca9'
git-subtree-dir: fiscal
git-subtree-mainline: d95165fc8f
git-subtree-split: 102ba84500
2026-09-29 14:43:23 -03:00

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}