"""Module manifest — see core/modules/model.py and APPS_PLATFORM §4.""" from core.modules.model import Module, Mount, Perm, SettingDef MODULE = Module( key='fiscal', kind='integration', name='Fiscal device', description='Send receipts to the fiscal device (ΦΗΜ) via its folder bridge.', depends=('ordering',), permissions=( Perm('fiscal.manage', 'Set up the fiscal device', roles=('owner',)), ), settings=( SettingDef('fiscal.clerk_id', '2', "Clerk ID sent in CR/CD commands (integer string, e.g. '2')", type='int'), SettingDef('fiscal.eftpos_id', '1', "EFTPOS terminal ID sent in CD commands (integer string, e.g. '1')", type='int'), SettingDef('fiscal.enabled', 'false', "Master switch for fiscal printing: 'true' | 'false'", type='bool'), SettingDef('fiscal.end_message', '[]', 'JSON array of up to 5 strings printed at end of receipt via FM commands', type='json'), SettingDef('fiscal.in_folder', '', 'Path the backend reads fiscal reply files FROM (output of the fiscal driver)', type='json'), SettingDef('fiscal.out_folder', '', 'Path the backend writes fiscal command files TO (input for the fiscal driver)', type='json'), SettingDef('fiscal.type', 'txt_file', "Fiscal driver type: 'txt_file' (dTEC100extra) — more types coming", type='str'), SettingDef('fiscal.vat_groups', '[]', 'JSON array of VAT group definitions: [{machine_id: int, friendly_name: str}]', type='json'), ), routers=( Mount('routers.fiscal', '/api/fiscal'), ), )