1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-02-24 17:11:18 +00:00

Compare commits

..

1 Commits

Author SHA1 Message Date
Otthorn
3f3d807ea1 Merge branch 'qrcode' into 'main'
Draft: Qrcode

See merge request bde/nk20!196
2024-03-27 15:13:41 +01:00
8 changed files with 732 additions and 810 deletions

View File

@ -5,7 +5,7 @@ from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from django.utils.translation import gettext_lazy as _
# from member.models import Club
from member.models import Club
from note.models import NoteSpecial, Alias
from note_kfet.inputs import AmountInput
@ -116,11 +116,11 @@ class ValidationForm(forms.Form):
initial=True,
)
# If the bda exists
# if Club.objects.filter(name__iexact="bda").exists():
# The user can join the bda club at the inscription
# join_bda = forms.BooleanField(
# label=_("Join BDA Club"),
# required=False,
# initial=True,
# )
# If the bda exists
if Club.objects.filter(name__iexact="bda").exists():
# The user can join the bda club at the inscription
join_bda = forms.BooleanField(
label=_("Join BDA Club"),
required=False,
initial=True,
)

View File

@ -1,23 +0,0 @@
# Generated by Django 2.2.28 on 2024-03-21 23:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('treasury', '0007_auto_20240311_1549'),
]
operations = [
migrations.AddField(
model_name='invoice',
name='payment_date',
field=models.CharField(default='', max_length=255, verbose_name='Payment date'),
),
migrations.AddField(
model_name='invoice',
name='quotation',
field=models.BooleanField(default=False, verbose_name='Quotation'),
),
]

View File

@ -41,10 +41,6 @@ class Invoice(models.Model):
),
verbose_name=_("BDE"),
)
quotation = models.BooleanField(
default=False,
verbose_name=_("Quotation"),
)
object = models.CharField(
max_length=255,
@ -69,12 +65,6 @@ class Invoice(models.Model):
verbose_name=_("Date"),
)
payment_date = models.CharField(
default="",
max_length=255,
verbose_name=_("Payment date"),
)
acquitted = models.BooleanField(
verbose_name=_("Acquitted"),
default=False,

View File

@ -76,11 +76,8 @@
\def\FactureNum {{"{"}}{{ obj.id }}} % Numéro de facture
\def\FactureAcquittee {% if obj.acquitted %} {oui} {% else %} {non} {% endif %} % Facture acquittée : oui/non
\def\Devis {% if obj.quotation %} {oui} {% else %} {non} {% endif %}
% Devis : oui/non
\def\FactureLieu {{"{"}}{{ obj.place|escape_tex }}} % Lieu de l'édition de la facture
\def\FactureDate {{"{"}}{{ obj.date }}} % Date de l'édition de la facture
\def\FacturePaymentDate {{"{"}}{{ obj.payment_date|escape_tex }}} % Date de paiement de la facture
\def\FactureObjet {{"{"}}{{ obj.object|escape_tex }} } % Objet du document
% Description de la facture
\def\FactureDescr {{"{"}}{{ obj.description|escape_tex }}}
@ -121,12 +118,10 @@
% Nom et adresse de la société
\MonNom \\
\MonAdresseRue \\
\MonAdresseVille \\
\ifthenelse{\equal{\Devis}{oui}}{
Devis n°\FactureNum
}{
\MonAdresseVille
Facture n°\FactureNum
}
{\addtolength{\leftskip}{10.5cm} %in ERT
\ClientNom \\
@ -144,7 +139,6 @@ Facture n°\FactureNum
\textnormal{\FactureDescr}
~\\
\begin{center}
@ -160,11 +154,6 @@ Facture n°\FactureNum
\ifthenelse{\equal{\FactureAcquittee}{oui}}{
Facture acquittée.
}{
Echéance de paiement : \FacturePaymentDate
Conditions d'escompte : Aucune
Taux de pénalité en cas de non paiement ou retard de paiement : 0 \%
À régler par chèque ou par virement bancaire :
@ -187,6 +176,5 @@ Facture n°\FactureNum
TVA non applicable, article 293 B du CGI.
\end{center}
\end{document}
{% endlanguage %}

View File

@ -69,11 +69,9 @@ class TestInvoices(TestCase):
response = self.client.post(reverse("treasury:invoice_create"), data={
"id": 42,
"object": "Same object",
"quotation": True,
"description": "Longer description",
"name": "Me and others",
"address": "Alwways earth",
"payment_date": "Maybe someday...",
"acquitted": True,
"products-0-designation": "Designation",
"products-0-quantity": 1,
@ -99,10 +97,8 @@ class TestInvoices(TestCase):
"object": "Same object",
"description": "Longer description",
"name": "Me and others",
"quotation": False,
"address": "Always earth",
"acquitted": True,
"payment_date": "Never",
"locked": True,
"products-0-designation": "Designation",
"products-0-quantity": 1,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff