Skip to content

Conversation

@zaoral
Copy link
Contributor

@zaoral zaoral commented Sep 8, 2025

Update From Padron AFIP and "Currency rate sincronization are only working if:

  • my logged company has a valid certificate and connection to ws_sr_constancia_inscripcion/wsbe webservice
  • my logged company has not certificate and there is only ONE other company with certificate and a valid connection to the
    wsbe/ws_sr_constancia_inscripcion webservices.

This PR changes the logic to always try to find a company that actually can connect to the webserive and use that one in order
to connect to AFIP, avoiding trying to connect with an invalid connection which results on not working padron an rate syncronization (mostly silence errors)

Copilot AI review requested due to automatic review settings September 8, 2025 19:47
@roboadhoc
Copy link
Contributor

Pull request status dashboard

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the company selection logic for AFIP currency updates by not only checking for valid certificates but also verifying that companies have valid connections to the required web services.

  • Extracts certificate validation logic into a reusable method _find_company_with_valid_certificate
  • Adds web service connection validation to ensure companies can actually connect to AFIP services
  • Simplifies the main currency parsing logic by using the new helper method

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@zaoral zaoral force-pushed the 18.0-h-98418-kz branch 2 times, most recently from f78f7e6 to 6adac78 Compare September 8, 2025 20:12
@zaoral zaoral force-pushed the 18.0-h-98418-kz branch 2 times, most recently from 64ea5a7 to cce04d7 Compare September 12, 2025 22:37
@zaoral zaoral changed the title [ADD] l10n_ar_currency_update: find company with valid connection [ADD] l10n_ar_edi_ux, l10n_ar_currency_update: Re use AFIP connection Sep 13, 2025
zaoral added 2 commits October 7, 2025 22:14
Improves the company selection logic for AFIP currency updates by not
only checking for valid certificates but also verifying that companies
have valid connections to the required web services.

* Extracts certificate validation logic into a reusable method
  _find_company_with_valid_certificate
* Adds web service connection validation to ensure companies can
  actually connect to AFIP services
* FIX: Only ask this once outsite for loop
Update From Padron AFIP is only working when

* my login company has a valid certificate and connection to
  ws_sr_constancia_inscripcion webservice
* my login company has not certificate and there is only one other
  company with certificate and connection to the
  ws_sr_constancia_inscripcion webservice.

This PR changes the logic to always try to find a company that
actually can connect to the webserive and use that one in order
to connect to AFIP to get padron data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants