Compare commits

..

No commits in common. "279c905d87edb3ff20d58356267dfe732afde29d" and "0aac192c7dc03b2ddbf55eb4c27c7eae8e445236" have entirely different histories.

5 changed files with 10 additions and 94340 deletions

View File

@ -1,6 +0,0 @@
#!/bin/bash
DIR=~/projets/infographie-compta-bsc
source "$DIR/.venv/bin/activate"
python main.py
deactivate

4
config
View File

@ -1,4 +1,4 @@
[path]
wp-config=/var/www/bricolesocialclub.org/wp-config.php
wp-config=wp-config.php
budget=budget.csv
save_directory=/var/www/bsc.pbblanc.fr/wp-content/uploads/compta
save_directory=.

View File

@ -1,4 +0,0 @@
[path]
wp-config=/var/www/bricolesocialclub.org/wp-config.php
budget=budget.csv
save_directory=/var/www/bsc.pbblanc.fr/wp-content/uploads/compta

16
main.py
View File

@ -47,13 +47,13 @@ def main(path_b:str,
budget = sort_des_budget(budget, 0)
#create_budget_sankey(budget,save_dir)
db_infos = get_db_infos(path_wp)
cursor = connect_mariadb(db_infos)
create_accounting_sankey(cursor, save_dir)
#cursor = connect_mariadb(db_infos)
#create_accounting_sankey(cursor, save_dir)
finances, last_update = import_finances(cursor)
#finances = import_csv(path_b)
#finances = test_finance(finances)
#last_update = rf'2025-01-01'
#finances, last_update = import_finances(cursor)
finances = import_csv(path_b)
finances = test_finance(finances)
last_update = rf'2025-01-01'
finances = sort_des_budget(finances, 0)
tot_rev = get_total_revenues(finances)
tot_ch = get_total_charges(finances)
@ -456,8 +456,8 @@ def get_sum_of_operations(cursor, date:str, account:Account):
for piece_num, numero_compte, label_compte, doc_date, code_journal, debit, credit in cursor :
tot_cred += credit
tot_deb += debit
if str(doc_date) > last_entrie :
last_entrie = str(doc_date)
if doc_date > last_entrie :
last_entrie = doc_date
if VERBOSE : print(f'pour le compte {account.number} : credit = {tot_cred} / debit = {tot_deb} à partir du {date}')
return int(tot_deb), int(tot_cred), last_entrie

File diff suppressed because it is too large Load Diff