Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PAGOPA-1564] feat: added update_cup_iban.py script to update cup iban in ecConfigTable #47

Merged
merged 3 commits into from
Mar 25, 2024

Conversation

aferracci
Copy link
Contributor

List of Changes

  • Added update_cup_iban.py script to update the iban codes in ecConfigTable with the last choice of the CI (CUP label)

Motivation and Context

Update the CUP iban in the config table

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Copy link
Contributor

@pasqualespica pasqualespica left a comment

Choose a reason for hiding this comment

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

LGTM 👍


print(f"[INFO][get_iban_by_ci] getting CUP iban for {id_ci} EC")
try:
api_url = f"{self.apim_url}/creditorinstitutions/{id_ci}/ibans/enhanced?label=0201138TS"
Copy link
Contributor

Choose a reason for hiding this comment

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

add comment before this line with somethig like that

2 PROVINCIA / CITTA' METROPOLITANA	1	SERVIZI PROVINCIALI / CITTA' METROPOLITANA	
Tributi e diritti gestiti direttamente dall'Ente Provinciale.	
138	Canone Unico Patrimoniale - CORPORATE	
TS	(SOLUZIONE CENTRALE GESTITA DA PAGOPA) 
La Legge di Bilancio 2020 (Legge n. 160/2019) ha previsto, a decorrere dal 1° gennaio 2021, l’istituzione  di un “canone unico patrimoniale” 
che unifica in un solo prelievo TOSAP, COSAP, l’imposta comunale sulla PUBBLICITÀ e AFFISIONI, ed altre imposte locali.
Questa soluzione è gestita centralmente da Pagopa S.p.a.	
36	9/0201138TS/	05/03/2021	01/01/2080	Attività produttive e commercio + Altro	

to give label 0201138TS context


print("[INFO][update_entities] iterating over ecconfigtable")
entities = list(table.list_entities())
for i, entity in enumerate(entities):
Copy link
Contributor

Choose a reason for hiding this comment

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

this script should be run after init of pagopapcanoneunicosaecconfigtable ?
what is the first step before python3 update_cup_iban.py ...

i.e. this script will update the ibans but which one initially creates the entities?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The first script to launch is buildEcConfigTable.py but we must take into account that it requires to be reviewed as it is currently based on data downloaded from PdA that has been dismissed, and at the moment we don't have the complementary service exposed by SelfCare/Area Riservata.
Anyway I'm going to better explicit this situation in readme file

@pasqualespica pasqualespica self-requested a review March 25, 2024 10:19
Copy link
Contributor

@pasqualespica pasqualespica left a comment

Choose a reason for hiding this comment

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

👍

@pasqualespica pasqualespica merged commit 32c38cc into main Mar 25, 2024
2 of 3 checks passed
@pasqualespica pasqualespica deleted the PAGOPA-1564-update-ecconfigtable branch March 25, 2024 10:19
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