Tenant gains source (LOCAL|GTI_GERENCIADOR), external_client_id, external_code, active and synced_at (migration 0024). central/app/client_sync.py fetches from the panel's new GET /internal/fiscal/clients (dedicated bearer token, never MySQL credentials) and upserts Tenant rows, never touching a LOCAL row. /agents/new now offers only active GTI_GERENCIADOR tenants, with a client-side search box; the POST validates the same rule server-side, not just in the dropdown. central/scripts/sync_clients_from_gerenciador.py is the operator-run sync + reconciliation report. GTI_FISCAL_VERSION/AGENT_VERSION bumped to 1.1.2 (release/VERSION single source of truth), incorporating the installation_id persistence fix. Rebuilt the EXE installer trio at 1.1.2 (scripts/build_windows_installer.ps1). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
23 lines
989 B
Bash
23 lines
989 B
Bash
# GTI Fiscal Agent - PLANNED PROFILE (not installed): RINCAO (restaurante). C000004 has 3 company rows; EMISSOR.EMITENTE_CRT=3 vs C000004(row 000001).CRT=1
|
|
# NO SECRETS in this file. Copy to <install>\.env (gti-agent configure -FromTemplate) and fill AGENT_TOKEN / FB_PASSWORD locally.
|
|
GTI_HUB_URL=https://fiscal.example.gti
|
|
AGENT_TOKEN=
|
|
AGENT_ID=
|
|
|
|
# Company context (deterministic resolver; never the first row of C000004)
|
|
COMPANY_CODE=000001
|
|
COMPANY_CNPJ=
|
|
# REQUIRED: CRT sources conflict (EMISSOR=3, C000004=1); the emission programs read EMISSOR. COMPANY_CODE=000001 is the row whose CNPJ equals the EMISSOR CNPJ.
|
|
COMPANY_CRT_SOURCE=EMISSOR
|
|
# COMPANY_UF= is an explicit override only when the database proves nothing; it never replaces the resolver silently.
|
|
|
|
# Real path of the client's SGV database ON THIS HOST (do not reuse the path of any local copy)
|
|
FIREBIRD_DATABASE_PATH=
|
|
FB_USER=
|
|
FB_PASSWORD=
|
|
|
|
FISCAL_MODE=DRY_RUN
|
|
FIREBIRD_WRITES=0
|
|
POLL_INTERVAL_SECONDS=5
|
|
AGENT_VERSION=1.1.2
|