mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-18 12:13:24 +00:00
Add authorization to refill to the counters AE & BdF
This commit is contained in:
parent
253f204225
commit
454ae5f9e3
@ -22,7 +22,7 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
from sith.settings import SITH_MAIN_CLUB
|
from sith.settings import SITH_COUNTER_OFFICES, SITH_MAIN_CLUB
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
@ -344,6 +344,15 @@ class Counter(models.Model):
|
|||||||
return [b.id for b in self.get_barmen_list()]
|
return [b.id for b in self.get_barmen_list()]
|
||||||
|
|
||||||
def can_refill(self):
|
def can_refill(self):
|
||||||
|
"""
|
||||||
|
Show if the counter authorize the refilling with physic money
|
||||||
|
"""
|
||||||
|
|
||||||
|
if (
|
||||||
|
self.id in SITH_COUNTER_OFFICES
|
||||||
|
): # If the counter is the counters 'AE' or 'BdF', the refiling are authorized
|
||||||
|
return True
|
||||||
|
|
||||||
is_ae_member = False
|
is_ae_member = False
|
||||||
ae = Club.objects.get(unix_name=SITH_MAIN_CLUB["unix_name"])
|
ae = Club.objects.get(unix_name=SITH_MAIN_CLUB["unix_name"])
|
||||||
for barman in self.get_barmen_list():
|
for barman in self.get_barmen_list():
|
||||||
|
@ -389,6 +389,8 @@ SITH_SUBSCRIPTION_LOCATIONS = [
|
|||||||
|
|
||||||
SITH_COUNTER_BARS = [(1, "MDE"), (2, "Foyer"), (35, "La Gommette")]
|
SITH_COUNTER_BARS = [(1, "MDE"), (2, "Foyer"), (35, "La Gommette")]
|
||||||
|
|
||||||
|
SITH_COUNTER_OFFICES = {17: "BdF", 19: "AE"}
|
||||||
|
|
||||||
SITH_COUNTER_PAYMENT_METHOD = [
|
SITH_COUNTER_PAYMENT_METHOD = [
|
||||||
("CHECK", _("Check")),
|
("CHECK", _("Check")),
|
||||||
("CASH", _("Cash")),
|
("CASH", _("Cash")),
|
||||||
|
Loading…
Reference in New Issue
Block a user