From 14310ef78ab55ce464f5bfc3b76040c75086ea3d Mon Sep 17 00:00:00 2001 From: Gregory Trullemans Date: Mon, 15 Aug 2022 09:29:29 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20du=20mod=C3=A8le=20de=20?= =?UTF-8?q?facturation=20pour=20pouvoir=20facturer=20des=20montant=20?= =?UTF-8?q?=C3=A0=204=20chiffres.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 +- ...l_amount_alter_prestation_unit_and_more.py | 28 ++++++ billing/models.py | 6 +- extracts/2022_08_14.csv | 98 +++++++++---------- 4 files changed, 85 insertions(+), 55 deletions(-) create mode 100644 billing/migrations/0010_alter_prestation_total_amount_alter_prestation_unit_and_more.py diff --git a/README.md b/README.md index 02928d4..127cc0e 100644 --- a/README.md +++ b/README.md @@ -30,13 +30,19 @@ Commande à taper : python manage.py importcsv -b nom_de_la_banque -f path_du_fichier_csv Le fichier importer DOIT être un `.csv`. +Egalement possible de le faire sur heroku via la commandes suivantes : + heroku login + heroku run python manage.py importcsv -b nom_de_la_banque -f path_du_fichier_csv + +Exemple : + + heroku run python manage.py importcsv -b crelan -f ./extracts/2022_08_14.csv ### Paramètres supportés - crelan - keytrade - Mode d'affichage ================ diff --git a/billing/migrations/0010_alter_prestation_total_amount_alter_prestation_unit_and_more.py b/billing/migrations/0010_alter_prestation_total_amount_alter_prestation_unit_and_more.py new file mode 100644 index 0000000..858c7e4 --- /dev/null +++ b/billing/migrations/0010_alter_prestation_total_amount_alter_prestation_unit_and_more.py @@ -0,0 +1,28 @@ +# Generated by Django 4.0.1 on 2022-08-15 07:27 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('billing', '0009_alter_contract_title'), + ] + + operations = [ + migrations.AlterField( + model_name='prestation', + name='total_amount', + field=models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=7, verbose_name='Prix'), + ), + migrations.AlterField( + model_name='prestation', + name='unit', + field=models.DecimalField(decimal_places=2, default=1, max_digits=6, verbose_name='Unité'), + ), + migrations.AlterField( + model_name='prestation', + name='unit_price', + field=models.DecimalField(decimal_places=2, default='12,5', max_digits=6, verbose_name='Prix unitaire'), + ), + ] diff --git a/billing/models.py b/billing/models.py index 366aafb..13fcd61 100644 --- a/billing/models.py +++ b/billing/models.py @@ -73,13 +73,13 @@ class Prestation(models.Model): date = models.DateField() label = models.CharField(max_length=255, verbose_name="Libellé") unit = models.DecimalField( - max_digits=5, decimal_places=2, verbose_name="Unité", default=1 + max_digits=6, decimal_places=2, verbose_name="Unité", default=1 ) unit_price = models.DecimalField( - max_digits=5, decimal_places=2, verbose_name="Prix unitaire", default="12,5" + max_digits=6, decimal_places=2, verbose_name="Prix unitaire", default="12,5" ) total_amount = models.DecimalField( - max_digits=6, decimal_places=2, blank=True, verbose_name="Prix", default=0 + max_digits=7, decimal_places=2, blank=True, verbose_name="Prix", default=0 ) def __compute_total_amount(self): diff --git a/extracts/2022_08_14.csv b/extracts/2022_08_14.csv index cc7e589..4291b5a 100644 --- a/extracts/2022_08_14.csv +++ b/extracts/2022_08_14.csv @@ -1,51 +1,47 @@ -Date;Montant;Solde apr?s op?ration;Devise;Contrepartie;Compte contrepartie;Type d'op?ration;Communication;Compte donneur d'ordre -24/05/2022;171.00;47668.30;EUR;DELHEUSY-TENGROOTENHUYSE;BE25 0012 9024 4082;Virement en votre faveur;Gaufres Evelyne Delheusy;BE49 1030 4549 3371 -24/05/2022;425.00;48093.30;EUR;TAMIGNIAU - Pierard;BE40 0638 8512 7863;Virement en votre faveur;Stage UEG 2022 Pierard Aline;BE49 1030 4549 3371 -24/05/2022;82.00;48175.30;EUR;TAMIGNIAU - Pierard;BE40 0638 8512 7863;Virement en votre faveur;Gaufres Pierard Aline;BE49 1030 4549 3371 -24/05/2022;5.00;48180.30;EUR;DECLERFAYT CEDRIC;BE46 2930 2258 9436;Virement en votre faveur;gaufres chocolats;BE49 1030 4549 3371 -24/05/2022;116.00;48296.30;EUR;Martin Laetitia;BE51 0639 1839 8762;Virement en votre faveur;Solde Scalabis cup 2022 Felix Vanye;BE49 1030 4549 3371 -24/05/2022;974.00;49270.30;EUR;Martin Laetitia;BE51 0639 1839 8762;Virement en votre faveur;Commande gaufres Felix Vanye;BE49 1030 4549 3371 -24/05/2022;50.00;49320.30;EUR;M SAM VANDERVECKEN;BE89 3632 1480 1385;Paiement instantan? en votre faveur;5 gaufres chocolat, 2 carres confitures CAMILLE LEONARD;BE49 1030 4549 3371 -24/05/2022;134.38;49454.68;EUR;GASCARD ALICE;BE10 7320 0713 4504;Virement en votre faveur;SOLDE COTI LOIC HOUGARDY;BE49 1030 4549 3371 -24/05/2022;425.00;49879.68;EUR;Leonard Denis - Vanest Geraldine;BE96 7506 4819 6905;Virement en votre faveur;Stage UEG 2022 Leonard Camille;BE49 1030 4549 3371 -25/05/2022;60.00;49939.68;EUR;Pirson Maxime;BE04 0635 4864 1331;Virement en votre faveur;Paiement vente de gaufres - MaximePIRSON;BE49 1030 4549 3371 -25/05/2022;296.80;50236.48;EUR;M. Gregory Trullemans;BE83 1030 1271 1415;Virement en votre faveur;Remboursement billet d'avion;BE49 1030 4549 3371 -30/05/2022;5.00;50241.48;EUR;M FREDERICK PAUCHET OU Mme ELISE;BE70 1096 6484 6325;Virement en votre faveur;1 Gaufre chocolat;BE49 1030 4549 3371 -30/05/2022;425.00;50666.48;EUR;Martin Laetitia;BE51 0639 1839 8762;Virement en votre faveur;Stage UEG 2022 Felix Vanye;BE49 1030 4549 3371 -30/05/2022;425.00;51091.48;EUR;RICHIR EVELYNE;BE10 0012 1073 5004;Virement en votre faveur;Stage UEG 2022 PIRSON Maxime;BE49 1030 4549 3371 -30/05/2022;34.00;51125.48;EUR;Arlette Ponsaerts;BE50 6511 4353 2118;Virement en votre faveur;Gaufres;BE49 1030 4549 3371 -01/06/2022;-5.69;51119.79;EUR;Moniteur Belge;BE48 6792 0055 0227;Votre virement via Online;Solde modification Statuts Flying Acrobatics Trampoline (18/01/2022);BE49 1030 4549 3371 -02/06/2022;-4.50;51115.29;EUR;;;Tenue de compte Business Pack;;BE49 1030 4549 3371 -03/06/2022;22.00;51137.29;EUR;MLLE KHAMPHENG KEOMANYDET;BE35 3101 0548 2637;Paiement instantan? en votre faveur;Gaufres Margaux de Buisseret;BE49 1030 4549 3371 -07/06/2022;84.30;51221.59;EUR;PUISSANT SOETKIN;BE45 7350 3697 6889;Paiement instantan? en votre faveur;Solde Vic Beelen;BE49 1030 4549 3371 -07/06/2022;5.00;51226.59;EUR;PAYE SAMANTHA;BE46 0637 2489 0836;Virement en votre faveur;Sam 1 boite vanille;BE49 1030 4549 3371 -07/06/2022;-1000.22;50226.37;EUR;Trullemans Gregory;BE83 1030 1271 1415;Votre virement via Online;Remboursement Gaufres;BE49 1030 4549 3371 -08/06/2022;-4040.00;46186.37;EUR;Federacao de Ginastica PT;PT50 0010 0000 5263 1450 0019 1;Votre virement via Online;Registration Belgium for EG TRA Camp in July;BE49 1030 4549 3371 -14/06/2022;30.00;46216.37;EUR;HELENE FRANCOIS;BE55 9792 4533 6344;Paiement instantan? en votre faveur;gaufres Natasha;BE49 1030 4549 3371 -15/06/2022;1500.00;47716.37;EUR;DESIGN TRAINING . SERVICES;BE46 3630 6478 5936;Virement en votre faveur;Sponsoring Stage UEG 2022;BE49 1030 4549 3371 -16/06/2022;16.00;47732.37;EUR;Petit - Gielis;BE15 0637 3557 9630;Virement en votre faveur;Gaufres Vanille + chocolat + carreconfiture;BE49 1030 4549 3371 -17/06/2022;-2537.34;45195.03;EUR;Pauline Gerard;BE75 0638 8058 7051;Votre virement via Online;Remboursement billets d'avion stage UEG;BE49 1030 4549 3371 -17/06/2022;25.00;45220.03;EUR;GASCARD ALICE;BE10 7320 0713 4504;Virement en votre faveur;GAUFRES LOIC HOUGARDY;BE49 1030 4549 3371 -24/06/2022;515.22;45735.25;EUR;B.C.B.W. ASBL;BE95 3630 2722 0058;Virement en votre faveur;INTERB BCBW STAGE PORTUGAL;BE49 1030 4549 3371 -29/06/2022;150.00;45885.25;EUR;Moedts - PELS;BE43 0634 5642 0401;Virement en votre faveur;Cotisation TRA 2022-23 Moedts Charline;BE49 1030 4549 3371 -29/06/2022;150.00;46035.25;EUR;RIBAUCOURT EMELINE;BE95 7330 3559 2158;Paiement instantan? en votre faveur;TRA 2022-23 DECUBBER CASSANDRE;BE49 1030 4549 3371 -30/06/2022;150.00;46185.25;EUR;DE MUYNCK BENEDICTE;BE60 1325 3626 7470;Paiement instantan? en votre faveur;TRA 2022-23 BLOMART CHRISTINA;BE49 1030 4549 3371 -01/07/2022;150.00;46335.25;EUR;Martin Laetitia;BE51 0639 1839 8762;Virement en votre faveur;Cotisation TRA 2022-2023 - Vanye Felix;BE49 1030 4549 3371 -04/07/2022;-4.50;46330.75;EUR;;;Tenue de compte Business Pack;;BE49 1030 4549 3371 -05/07/2022;150.00;46480.75;EUR;DELHEUSY-TENGROOTENHUYSE;BE25 0012 9024 4082;Virement en votre faveur;Acompte Evelyne Delheusy;BE49 1030 4549 3371 -05/07/2022;25.00;46505.75;EUR;Pirson Maxime;BE04 0635 4864 1331;Virement en votre faveur;Tshirt M - Maxime Pirson;BE49 1030 4549 3371 -06/07/2022;150.00;46655.75;EUR;BERTRAND VICAIRE;BE33 3770 5658 1046;Paiement instantan? en votre faveur;Cotisation TRA2022-23 Bertrand Arthur;BE49 1030 4549 3371 -13/07/2022;150.00;46805.75;EUR;DE TIEGE-ROBERT;BE30 0017 6013 4011;Virement en votre faveur;TRA 2022-23 - De Tiege Achille;BE49 1030 4549 3371 -13/07/2022;150.00;46955.75;EUR;VAN DER SMISSEN INGRID;BE51 1430 7010 7762;Virement en votre faveur;Cotisation TRA 2022-23 - Kraled Anyssa;BE49 1030 4549 3371 -18/07/2022;150.00;47105.75;EUR;ROMAIN-MOYAUX;BE03 0015 2103 6384;Virement en votre faveur;Cotisation TRA 2022-23 Moyaux Agathe;BE49 1030 4549 3371 -18/07/2022;150.00;47255.75;EUR;ROMAIN-MOYAUX;BE03 0015 2103 6384;Virement en votre faveur;Cotisation TRA 2022-23 Moyaux Jules;BE49 1030 4549 3371 -18/07/2022;18.00;47273.75;EUR;Martin Laetitia;BE51 0639 1839 8762;Virement en votre faveur;Cours juillet Felix Vanye;BE49 1030 4549 3371 -19/07/2022;18.00;47291.75;EUR;Pirson Maxime;BE04 0635 4864 1331;Virement en votre faveur;Entrainements juillet;BE49 1030 4549 3371 -26/07/2022;275.00;47566.75;EUR;MAJOR DREAMS SPRL;BE39 3630 5587 9619;Virement en votre faveur;2022-01;BE49 1030 4549 3371 -02/08/2022;-4.50;47562.25;EUR;;;Tenue de compte Business Pack;;BE49 1030 4549 3371 -02/08/2022;150.00;47712.25;EUR;TAMIGNIAU - Pierard;BE40 0638 8512 7863;Virement en votre faveur;Cotisation TRA 2022-23 Pierard Aline;BE49 1030 4549 3371 -03/08/2022;6.00;47718.25;EUR;Mme Arlette Ponsaerts;BE89 1030 1699 6185;Virement en votre faveur;Carres confiture;BE49 1030 4549 3371 -09/08/2022;51.00;47769.25;EUR;Martin Laetitia;BE51 0639 1839 8762;Virement en votre faveur;Vente gaufres bonus Felix Vanye;BE49 1030 4549 3371 -09/08/2022;150.00;47919.25;EUR;Schepers Ian - Gheys Christelle;BE72 7506 4915 8316;Virement en votre faveur;TRA 2021-22 Schepers Rafael;BE49 1030 4549 3371 -12/08/2022;150.00;48069.25;EUR;Pirson Maxime;BE04 0635 4864 1331;Virement en votre faveur;Acompte saison 2022-2023 - PIRSON Maxime;BE49 1030 4549 3371 -16/08/2022;-240.00;47829.25;EUR;Morgane Petit;BE54 0635 0646 2697;Votre virement via Online;Payement prestations mois de juin;BE49 1030 4549 3371 +Date;Montant;Solde apr?s op?ration;Devise;Contrepartie;Compte contrepartie;Type d'op?ration;Communication;Compte donneur d'ordre +24/05/22;116.00;48296.30;EUR;Martin Laetitia;BE51 0639 1839 8762;Virement en votre faveur;Solde Scalabis cup 2022 Felix Vanye;BE49 1030 4549 3371 +24/05/22;974.00;49270.30;EUR;Martin Laetitia;BE51 0639 1839 8762;Virement en votre faveur;Commande gaufres Felix Vanye;BE49 1030 4549 3371 +24/05/22;50.00;49320.30;EUR;M SAM VANDERVECKEN;BE89 3632 1480 1385;Paiement instantan? en votre faveur;5 gaufres chocolat, 2 carres confitures CAMILLE LEONARD;BE49 1030 4549 3371 +24/05/22;134.38;49454.68;EUR;GASCARD ALICE;BE10 7320 0713 4504;Virement en votre faveur;SOLDE COTI LOIC HOUGARDY;BE49 1030 4549 3371 +24/05/22;425.00;49879.68;EUR;Leonard Denis - Vanest Geraldine;BE96 7506 4819 6905;Virement en votre faveur;Stage UEG 2022 Leonard Camille;BE49 1030 4549 3371 +25/05/22;60.00;49939.68;EUR;Pirson Maxime;BE04 0635 4864 1331;Virement en votre faveur;Paiement vente de gaufres - MaximePIRSON;BE49 1030 4549 3371 +25/05/22;296.80;50236.48;EUR;M. Gregory Trullemans;BE83 1030 1271 1415;Virement en votre faveur;Remboursement billet d'avion;BE49 1030 4549 3371 +30/05/22;5.00;50241.48;EUR;M FREDERICK PAUCHET OU Mme ELISE;BE70 1096 6484 6325;Virement en votre faveur;1 Gaufre chocolat;BE49 1030 4549 3371 +30/05/22;425.00;50666.48;EUR;Martin Laetitia;BE51 0639 1839 8762;Virement en votre faveur;Stage UEG 2022 Felix Vanye;BE49 1030 4549 3371 +30/05/22;425.00;51091.48;EUR;RICHIR EVELYNE;BE10 0012 1073 5004;Virement en votre faveur;Stage UEG 2022 PIRSON Maxime;BE49 1030 4549 3371 +30/05/22;34.00;51125.48;EUR;Arlette Ponsaerts;BE50 6511 4353 2118;Virement en votre faveur;Gaufres;BE49 1030 4549 3371 +1/06/22;-5.69;51119.79;EUR;Moniteur Belge;BE48 6792 0055 0227;Votre virement via Online;Solde modification Statuts Flying Acrobatics Trampoline (18/01/2022);BE49 1030 4549 3371 +2/06/22;-4.50;51115.29;EUR;;;Tenue de compte Business Pack;;BE49 1030 4549 3371 +3/06/22;22.00;51137.29;EUR;MLLE KHAMPHENG KEOMANYDET;BE35 3101 0548 2637;Paiement instantan? en votre faveur;Gaufres Margaux de Buisseret;BE49 1030 4549 3371 +7/06/22;84.30;51221.59;EUR;PUISSANT SOETKIN;BE45 7350 3697 6889;Paiement instantan? en votre faveur;Solde Vic Beelen;BE49 1030 4549 3371 +7/06/22;5.00;51226.59;EUR;PAYE SAMANTHA;BE46 0637 2489 0836;Virement en votre faveur;Sam 1 boite vanille;BE49 1030 4549 3371 +7/06/22;-1000.22;50226.37;EUR;Trullemans Gregory;BE83 1030 1271 1415;Votre virement via Online;Remboursement Gaufres;BE49 1030 4549 3371 +8/06/22;-4040.00;46186.37;EUR;Federacao de Ginastica PT;PT50 0010 0000 5263 1450 0019 1;Votre virement via Online;Registration Belgium for EG TRA Camp in July;BE49 1030 4549 3371 +14/06/22;30.00;46216.37;EUR;HELENE FRANCOIS;BE55 9792 4533 6344;Paiement instantan? en votre faveur;gaufres Natasha;BE49 1030 4549 3371 +15/06/22;1500.00;47716.37;EUR;DESIGN TRAINING . SERVICES;BE46 3630 6478 5936;Virement en votre faveur;Sponsoring Stage UEG 2022;BE49 1030 4549 3371 +16/06/22;16.00;47732.37;EUR;Petit - Gielis;BE15 0637 3557 9630;Virement en votre faveur;Gaufres Vanille + chocolat + carreconfiture;BE49 1030 4549 3371 +17/06/22;-2537.34;45195.03;EUR;Pauline Gerard;BE75 0638 8058 7051;Votre virement via Online;Remboursement billets d'avion stage UEG;BE49 1030 4549 3371 +17/06/22;25.00;45220.03;EUR;GASCARD ALICE;BE10 7320 0713 4504;Virement en votre faveur;GAUFRES LOIC HOUGARDY;BE49 1030 4549 3371 +24/06/22;515.22;45735.25;EUR;B.C.B.W. ASBL;BE95 3630 2722 0058;Virement en votre faveur;INTERB BCBW STAGE PORTUGAL;BE49 1030 4549 3371 +29/06/22;150.00;45885.25;EUR;Moedts - PELS;BE43 0634 5642 0401;Virement en votre faveur;Cotisation TRA 2022-23 Moedts Charline;BE49 1030 4549 3371 +29/06/22;150.00;46035.25;EUR;RIBAUCOURT EMELINE;BE95 7330 3559 2158;Paiement instantan? en votre faveur;TRA 2022-23 DECUBBER CASSANDRE;BE49 1030 4549 3371 +30/06/22;150.00;46185.25;EUR;DE MUYNCK BENEDICTE;BE60 1325 3626 7470;Paiement instantan? en votre faveur;TRA 2022-23 BLOMART CHRISTINA;BE49 1030 4549 3371 +1/07/22;150.00;46335.25;EUR;Martin Laetitia;BE51 0639 1839 8762;Virement en votre faveur;Cotisation TRA 2022-2023 - Vanye Felix;BE49 1030 4549 3371 +4/07/22;-4.50;46330.75;EUR;;;Tenue de compte Business Pack;;BE49 1030 4549 3371 +5/07/22;150.00;46480.75;EUR;DELHEUSY-TENGROOTENHUYSE;BE25 0012 9024 4082;Virement en votre faveur;Acompte Evelyne Delheusy;BE49 1030 4549 3371 +5/07/22;25.00;46505.75;EUR;Pirson Maxime;BE04 0635 4864 1331;Virement en votre faveur;Tshirt M - Maxime Pirson;BE49 1030 4549 3371 +6/07/22;150.00;46655.75;EUR;BERTRAND VICAIRE;BE33 3770 5658 1046;Paiement instantan? en votre faveur;Cotisation TRA2022-23 Bertrand Arthur;BE49 1030 4549 3371 +13/07/22;150.00;46805.75;EUR;DE TIEGE-ROBERT;BE30 0017 6013 4011;Virement en votre faveur;TRA 2022-23 - De Tiege Achille;BE49 1030 4549 3371 +13/07/22;150.00;46955.75;EUR;VAN DER SMISSEN INGRID;BE51 1430 7010 7762;Virement en votre faveur;Cotisation TRA 2022-23 - Kraled Anyssa;BE49 1030 4549 3371 +18/07/22;150.00;47105.75;EUR;ROMAIN-MOYAUX;BE03 0015 2103 6384;Virement en votre faveur;Cotisation TRA 2022-23 Moyaux Agathe;BE49 1030 4549 3371 +18/07/22;150.00;47255.75;EUR;ROMAIN-MOYAUX;BE03 0015 2103 6384;Virement en votre faveur;Cotisation TRA 2022-23 Moyaux Jules;BE49 1030 4549 3371 +18/07/22;18.00;47273.75;EUR;Martin Laetitia;BE51 0639 1839 8762;Virement en votre faveur;Cours juillet Felix Vanye;BE49 1030 4549 3371 +19/07/22;18.00;47291.75;EUR;Pirson Maxime;BE04 0635 4864 1331;Virement en votre faveur;Entrainements juillet;BE49 1030 4549 3371 +26/07/22;275.00;47566.75;EUR;MAJOR DREAMS SPRL;BE39 3630 5587 9619;Virement en votre faveur;2022-01;BE49 1030 4549 3371 +2/08/22;-4.50;47562.25;EUR;;;Tenue de compte Business Pack;;BE49 1030 4549 3371 +2/08/22;150.00;47712.25;EUR;TAMIGNIAU - Pierard;BE40 0638 8512 7863;Virement en votre faveur;Cotisation TRA 2022-23 Pierard Aline;BE49 1030 4549 3371 +3/08/22;6.00;47718.25;EUR;Mme Arlette Ponsaerts;BE89 1030 1699 6185;Virement en votre faveur;Carres confiture;BE49 1030 4549 3371 +9/08/22;51.00;47769.25;EUR;Martin Laetitia;BE51 0639 1839 8762;Virement en votre faveur;Vente gaufres bonus Felix Vanye;BE49 1030 4549 3371 +9/08/22;150.00;47919.25;EUR;Schepers Ian - Gheys Christelle;BE72 7506 4915 8316;Virement en votre faveur;TRA 2021-22 Schepers Rafael;BE49 1030 4549 3371 +12/08/22;150.00;48069.25;EUR;Pirson Maxime;BE04 0635 4864 1331;Virement en votre faveur;Acompte saison 2022-2023 - PIRSON Maxime;BE49 1030 4549 3371 +16/08/22;-240.00;47829.25;EUR;Morgane Petit;BE54 0635 0646 2697;Votre virement via Online;Payement prestations mois de juin;BE49 1030 4549 3371 \ No newline at end of file