From e9d1fbd6a8ed5cab5fa289d9dce57cbd9175fcbc Mon Sep 17 00:00:00 2001 From: Andres Ramos Date: Fri, 4 Aug 2023 02:53:11 -0500 Subject: [PATCH 1/3] feat: agrega la propidad HayIntefazConEmpresaContabilidad en ContpaqiComercialConfig --- .../Common/Models/ContpaqiComercialConfig.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Api.Sync.Core.Application/Common/Models/ContpaqiComercialConfig.cs b/src/Api.Sync.Core.Application/Common/Models/ContpaqiComercialConfig.cs index 07884b9..aabd834 100644 --- a/src/Api.Sync.Core.Application/Common/Models/ContpaqiComercialConfig.cs +++ b/src/Api.Sync.Core.Application/Common/Models/ContpaqiComercialConfig.cs @@ -4,6 +4,7 @@ public sealed class ContpaqiComercialConfig { public string Usuario { get; set; } = string.Empty; public string Contrasena { get; set; } = string.Empty; + public bool HayIntefazConEmpresaContabilidad { get; set; } public string RutaPlantillasPdf { get; set; } = string.Empty; public Empresa Empresa { get; set; } = new(); } From 24a8b60e65e13e8659829cff3b14545e3f3090f5 Mon Sep 17 00:00:00 2001 From: Andres Ramos Date: Fri, 4 Aug 2023 02:54:13 -0500 Subject: [PATCH 2/3] feat: agrega la propiedad HayIntefazConEmpresaContabilidad en archivo de configuracion del sincronizador --- src/Api.Sync.Presentation.WorkerService/appsettings.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Api.Sync.Presentation.WorkerService/appsettings.json b/src/Api.Sync.Presentation.WorkerService/appsettings.json index 65c6741..ada733f 100644 --- a/src/Api.Sync.Presentation.WorkerService/appsettings.json +++ b/src/Api.Sync.Presentation.WorkerService/appsettings.json @@ -35,6 +35,7 @@ "ContpaqiComercialConfig": { "Usuario": "SUPERVISOR", "Contrasena": "", + "HayIntefazConEmpresaContabilidad": false, "RutaPlantillasPdf": "C:\\Compac\\Empresas\\Reportes\\Formatos Digitales\\reportes_Servidor\\COMERCIAL" } } From 9b2b770e7e471f018347d418792eebb3ddcd4649 Mon Sep 17 00:00:00 2001 From: Andres Ramos Date: Fri, 4 Aug 2023 02:56:34 -0500 Subject: [PATCH 3/3] feat: inicia sesion con Contabilidad cuando exista interfaz con una empresa contable --- .../Commands/IniciarSdk/IniciarSdkCommand.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Api.Sync.Core.Application/ContpaqiComercial/Commands/IniciarSdk/IniciarSdkCommand.cs b/src/Api.Sync.Core.Application/ContpaqiComercial/Commands/IniciarSdk/IniciarSdkCommand.cs index 4568d0b..5639dcf 100644 --- a/src/Api.Sync.Core.Application/ContpaqiComercial/Commands/IniciarSdk/IniciarSdkCommand.cs +++ b/src/Api.Sync.Core.Application/ContpaqiComercial/Commands/IniciarSdk/IniciarSdkCommand.cs @@ -25,9 +25,14 @@ public IniciarSdkCommandHandler(IComercialSdkSesionService sdkSesionService, IOp public Task Handle(IniciarSdkCommand request, CancellationToken cancellationToken) { if (!_sdkSesionService.IsSdkInicializado) - _sdkSesionService.IniciarSesionSdk(_contpaqiComercialConfig.Usuario, _contpaqiComercialConfig.Contrasena); + { + if (_contpaqiComercialConfig.HayIntefazConEmpresaContabilidad) + _sdkSesionService.IniciarSesionSdk(_contpaqiComercialConfig.Usuario, _contpaqiComercialConfig.Contrasena, + _contpaqiComercialConfig.Usuario, _contpaqiComercialConfig.Contrasena); + else + _sdkSesionService.IniciarSesionSdk(_contpaqiComercialConfig.Usuario, _contpaqiComercialConfig.Contrasena); + } - // Todo: Contabilidad? _logger.LogDebug("SDK inicializado. {@ComercialSdkSesionService}", _sdkSesionService); return Task.CompletedTask;