Refactoring & code lisibility improvement.

This commit is contained in:
Trullemans Gregory 2020-02-26 07:48:43 +01:00
parent 9500e9bd08
commit 84b1136388
4 changed files with 7 additions and 12 deletions

View File

@ -1,12 +1,11 @@
SITE_TITLE: 'Flying Acrobatics Trampoline'
CLUB_NAME: 'Flying Acrobatics Trampoline Club'
BCE: '0660.7375.71'
NAME: "Flying Acrobatics Trampoline Club A.S.B.L."
ADDRESS: "Champ de l'Epine, 7"
CITY: "Hennuyères"
ZIP: "7090"
GSM: "0484/14.25.28"
COMPANY_NUMBER: "0660.737.571"
BCE_NUMBER: "0660.737.571"
TVA: "N.A."
BANK: "CRELAN"
IBAN: "BE49 1030 4549 3371"

View File

@ -6,8 +6,6 @@ from django.utils import timezone
from eventCompta.models import Event
from .utils import zero_or_value
class RuleOfEvaluation(models.Model):
"""
@ -24,7 +22,7 @@ class RuleOfEvaluation(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
compte en fin d'année).

View File

@ -8,7 +8,11 @@ from .models import (
RightEngagementType,
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):

View File

@ -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)