mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-04-21 22:32:20 +00:00
Compare commits
7 Commits
8e2b24b2da
...
ff4353d344
Author | SHA1 | Date | |
---|---|---|---|
|
ff4353d344 | ||
|
a90f45bd8b | ||
|
10c22ccc53 | ||
|
6969cee0f3 | ||
|
ddeada200b | ||
|
84e9fea15f | ||
|
b9ebb1718a |
@ -201,7 +201,8 @@ class Entry(models.Model):
|
|||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
qs = Entry.objects.filter(~Q(pk=self.pk), activity=self.activity, note=self.note, guest=self.guest)
|
qs = Entry.objects.filter(~Q(pk=self.pk), activity=self.activity, note=self.note, guest=self.guest)
|
||||||
if qs.exists():
|
if qs.exists():
|
||||||
raise ValidationError(_("Already entered on ") + _("{:%Y-%m-%d %H:%M:%S}").format(qs.get().time, ))
|
raise ValidationError(_("Already entered on ")
|
||||||
|
+ _("{:%Y-%m-%d %H:%M:%S}").format(timezone.localtime(qs.get().time), ))
|
||||||
|
|
||||||
if self.guest:
|
if self.guest:
|
||||||
self.note = self.guest.inviter
|
self.note = self.guest.inviter
|
||||||
|
@ -55,7 +55,7 @@ class GuestTable(tables.Table):
|
|||||||
|
|
||||||
def render_entry(self, record):
|
def render_entry(self, record):
|
||||||
if record.has_entry:
|
if record.has_entry:
|
||||||
return str(_("Entered on ") + str(_("{:%Y-%m-%d %H:%M:%S}").format(record.entry.time, )))
|
return str(_("Entered on ") + str(_("{:%Y-%m-%d %H:%M:%S}").format(timezone.localtime(record.entry.time))))
|
||||||
return mark_safe('<button id="{id}" class="btn btn-danger btn-sm" onclick="remove_guest(this.id)"> '
|
return mark_safe('<button id="{id}" class="btn btn-danger btn-sm" onclick="remove_guest(this.id)"> '
|
||||||
'{delete_trans}</button>'.format(id=record.id, delete_trans=_("remove").capitalize()))
|
'{delete_trans}</button>'.format(id=record.id, delete_trans=_("remove").capitalize()))
|
||||||
|
|
||||||
|
18
apps/treasury/migrations/0010_alter_invoice_bde.py
Normal file
18
apps/treasury/migrations/0010_alter_invoice_bde.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 4.2.20 on 2025-04-14 20:21
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('treasury', '0009_alter_sogecredit_transactions'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='invoice',
|
||||||
|
name='bde',
|
||||||
|
field=models.CharField(choices=[('Diolistos', 'Diol[list]os'), ('RavePartlist', 'RavePart[list]'), ('SecretStorlist', 'SecretStor[list]'), ('TotalistSpies', 'Tota[list]Spies'), ('Saperlistpopette', 'Saper[list]popette'), ('Finalist', 'Fina[list]'), ('Listorique', '[List]orique'), ('Satellist', 'Satel[list]'), ('Monopolist', 'Monopo[list]'), ('Kataclist', 'Katac[list]')], default='Diolistos', max_length=32, verbose_name='BDE'),
|
||||||
|
),
|
||||||
|
]
|
@ -27,8 +27,9 @@ class Invoice(models.Model):
|
|||||||
|
|
||||||
bde = models.CharField(
|
bde = models.CharField(
|
||||||
max_length=32,
|
max_length=32,
|
||||||
default='RavePartlist',
|
default='Diolistos',
|
||||||
choices=(
|
choices=(
|
||||||
|
('Diolistos', 'Diol[list]os'),
|
||||||
('RavePartlist', 'RavePart[list]'),
|
('RavePartlist', 'RavePart[list]'),
|
||||||
('SecretStorlist', 'SecretStor[list]'),
|
('SecretStorlist', 'SecretStor[list]'),
|
||||||
('TotalistSpies', 'Tota[list]Spies'),
|
('TotalistSpies', 'Tota[list]Spies'),
|
||||||
|
BIN
apps/treasury/static/img/Diolistos.png
Executable file
BIN
apps/treasury/static/img/Diolistos.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 2.8 MiB |
BIN
apps/treasury/static/img/Diolistos_bg.jpg
Executable file
BIN
apps/treasury/static/img/Diolistos_bg.jpg
Executable file
Binary file not shown.
After Width: | Height: | Size: 284 KiB |
Loading…
x
Reference in New Issue
Block a user