git-subtree-dir: fiscal git-subtree-mainline:d95165fc8fgit-subtree-split:102ba84500
12 lines
576 B
Python
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}
|