Refactoring & code lisibility improvement.
This commit is contained in:
parent
9500e9bd08
commit
84b1136388
|
@ -1,12 +1,11 @@
|
||||||
SITE_TITLE: 'Flying Acrobatics Trampoline'
|
SITE_TITLE: 'Flying Acrobatics Trampoline'
|
||||||
CLUB_NAME: 'Flying Acrobatics Trampoline Club'
|
CLUB_NAME: 'Flying Acrobatics Trampoline Club'
|
||||||
BCE: '0660.7375.71'
|
|
||||||
NAME: "Flying Acrobatics Trampoline Club A.S.B.L."
|
NAME: "Flying Acrobatics Trampoline Club A.S.B.L."
|
||||||
ADDRESS: "Champ de l'Epine, 7"
|
ADDRESS: "Champ de l'Epine, 7"
|
||||||
CITY: "Hennuyères"
|
CITY: "Hennuyères"
|
||||||
ZIP: "7090"
|
ZIP: "7090"
|
||||||
GSM: "0484/14.25.28"
|
GSM: "0484/14.25.28"
|
||||||
COMPANY_NUMBER: "0660.737.571"
|
BCE_NUMBER: "0660.737.571"
|
||||||
TVA: "N.A."
|
TVA: "N.A."
|
||||||
BANK: "CRELAN"
|
BANK: "CRELAN"
|
||||||
IBAN: "BE49 1030 4549 3371"
|
IBAN: "BE49 1030 4549 3371"
|
||||||
|
|
|
@ -6,8 +6,6 @@ from django.utils import timezone
|
||||||
|
|
||||||
from eventCompta.models import Event
|
from eventCompta.models import Event
|
||||||
|
|
||||||
from .utils import zero_or_value
|
|
||||||
|
|
||||||
|
|
||||||
class RuleOfEvaluation(models.Model):
|
class RuleOfEvaluation(models.Model):
|
||||||
"""
|
"""
|
||||||
|
@ -24,7 +22,7 @@ class RuleOfEvaluation(models.Model):
|
||||||
|
|
||||||
class Annuality(models.Model):
|
class Annuality(models.Model):
|
||||||
"""
|
"""
|
||||||
Définit un année par une chiffre (e.g. 2016, 2017, ), une balance d'ouverture (combien il
|
Définit un année par un nombre (2016, 2017, …), une balance d'ouverture (combien il
|
||||||
y a sur le compte en début d'année) et une balance de fermeture (combien il y a sur le
|
y a sur le compte en début d'année) et une balance de fermeture (combien il y a sur le
|
||||||
compte en fin d'année).
|
compte en fin d'année).
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,11 @@ from .models import (
|
||||||
RightEngagementType,
|
RightEngagementType,
|
||||||
RightEngagement,
|
RightEngagement,
|
||||||
)
|
)
|
||||||
from .utils import zero_or_value
|
|
||||||
|
|
||||||
|
def zero_or_value(value):
|
||||||
|
"""Retourne zéro si la valeur est nulle."""
|
||||||
|
return value if value else Decimal(0.00)
|
||||||
|
|
||||||
|
|
||||||
def get_transactions_and_sums_for_year_and_type(accounting_year, transaction_type_id):
|
def get_transactions_and_sums_for_year_and_type(accounting_year, transaction_type_id):
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
from decimal import Decimal
|
|
||||||
|
|
||||||
|
|
||||||
def zero_or_value(value):
|
|
||||||
"""Retourne zéro si la valeur est nulle."""
|
|
||||||
return value if value else Decimal(0.00)
|
|
Loading…
Reference in New Issue