diff --git a/backend/src/routes/workstations.ts b/backend/src/routes/workstations.ts index e7b7ed2..0824a65 100644 --- a/backend/src/routes/workstations.ts +++ b/backend/src/routes/workstations.ts @@ -300,6 +300,8 @@ const workstationRoutes: FastifyPluginAsync = async (fastify) => { com_port: device.com_port, fiscal_mode: device.fiscal_mode, dto_port: device.dto_port, + dto_user: device.config?.dto_user, + dto_pass: device.config?.dto_pass, }, }) as { ok: boolean; error?: string; message?: string } return result diff --git a/src/pages/EquipmentPage.tsx b/src/pages/EquipmentPage.tsx index 8c58358..4ead7c5 100644 --- a/src/pages/EquipmentPage.tsx +++ b/src/pages/EquipmentPage.tsx @@ -201,6 +201,8 @@ function DeviceForm({ const [purpose, setPurpose] = useState(initial?.purpose ?? 'receipt') const [fiscalMode, setFiscalMode] = useState(initial?.fiscalMode !== false) const [dtoPort, setDtoPort] = useState(String(initial?.dtoPort ?? 16732)) + const [dtoUser, setDtoUser] = useState(String(initial?.config?.dto_user ?? '30')) + const [dtoPass, setDtoPass] = useState(String(initial?.config?.dto_pass ?? '30')) const [saving, setSaving] = useState(false) const [availablePorts, setAvailablePorts] = useState<{ port: string; description?: string }[] | null>(null) const [portsLoading, setPortsLoading] = useState(false) @@ -228,6 +230,7 @@ function DeviceForm({ purpose: purpose as WorkstationDevice['purpose'], fiscalMode: type === 'kkt' ? fiscalMode : undefined, dtoPort: type === 'kkt' && fiscalMode ? Number(dtoPort) : undefined, + config: type === 'kkt' && fiscalMode ? { dto_user: dtoUser, dto_pass: dtoPass } : undefined, }) setSaving(false) } @@ -291,15 +294,38 @@ function DeviceForm({ {fiscalMode && ( -
Порт АТОЛ ДТО 10 (по умолчанию 16732). Для нескольких касс — разные порты.
+По умолчанию 16732. Для нескольких касс — разные порты.
+