mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-02-24 09:01:18 +00:00
Compare commits
14 Commits
d3080ad830
...
7a1e9743e3
Author | SHA1 | Date | |
---|---|---|---|
|
7a1e9743e3 | ||
|
7afd15b1cc | ||
|
258361f116 | ||
|
a307530579 | ||
|
5de930bf40 | ||
|
f7ebe0e99b | ||
|
73de6e2176 | ||
|
201611b105 | ||
|
40c239e9da | ||
|
2aaab2b454 | ||
|
fc088dec86 | ||
|
ffac940511 | ||
|
dde1baa25c | ||
|
7a7ee47e0b |
1
.gitignore
vendored
1
.gitignore
vendored
@ -48,7 +48,6 @@ backups/
|
||||
env/
|
||||
venv/
|
||||
db.sqlite3
|
||||
shell.nix
|
||||
|
||||
# ansibles customs host
|
||||
ansible/host_vars/*.yaml
|
||||
|
@ -17,4 +17,24 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var date_end = document.getElementById("id_date_end");
|
||||
var date_start = document.getElementById("id_date_start");
|
||||
|
||||
function update_date_end (){
|
||||
if(date_end.value=="" || date_end.value<date_start.value){
|
||||
date_end.value = date_start.value;
|
||||
};
|
||||
};
|
||||
|
||||
function update_date_start (){
|
||||
if(date_start.value=="" || date_end.value<date_start.value){
|
||||
date_start.value = date_end.value;
|
||||
};
|
||||
};
|
||||
|
||||
date_start.addEventListener('focusout', update_date_end);
|
||||
date_end.addEventListener('focusout', update_date_start);
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
@ -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
|
||||
|
||||
@ -117,10 +117,10 @@ class ValidationForm(forms.Form):
|
||||
)
|
||||
|
||||
# If the bda exists
|
||||
if Club.objects.filter(name__iexact="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,
|
||||
)
|
||||
# join_bda = forms.BooleanField(
|
||||
# label=_("Join BDA Club"),
|
||||
# required=False,
|
||||
# initial=True,
|
||||
# )
|
||||
|
23
apps/treasury/migrations/0008_auto_20240322_0045.py
Normal file
23
apps/treasury/migrations/0008_auto_20240322_0045.py
Normal file
@ -0,0 +1,23 @@
|
||||
# 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'),
|
||||
),
|
||||
]
|
@ -41,6 +41,10 @@ class Invoice(models.Model):
|
||||
),
|
||||
verbose_name=_("BDE"),
|
||||
)
|
||||
quotation = models.BooleanField(
|
||||
default=False,
|
||||
verbose_name=_("Quotation"),
|
||||
)
|
||||
|
||||
object = models.CharField(
|
||||
max_length=255,
|
||||
@ -65,6 +69,12 @@ 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,
|
||||
|
@ -76,8 +76,11 @@
|
||||
|
||||
\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 }}}
|
||||
@ -118,10 +121,12 @@
|
||||
% Nom et adresse de la société
|
||||
\MonNom \\
|
||||
\MonAdresseRue \\
|
||||
\MonAdresseVille
|
||||
|
||||
\MonAdresseVille \\
|
||||
\ifthenelse{\equal{\Devis}{oui}}{
|
||||
Devis n°\FactureNum
|
||||
}{
|
||||
Facture n°\FactureNum
|
||||
|
||||
}
|
||||
|
||||
{\addtolength{\leftskip}{10.5cm} %in ERT
|
||||
\ClientNom \\
|
||||
@ -139,6 +144,7 @@ Facture n°\FactureNum
|
||||
|
||||
\textnormal{\FactureDescr}
|
||||
|
||||
|
||||
~\\
|
||||
|
||||
\begin{center}
|
||||
@ -154,6 +160,11 @@ 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 :
|
||||
|
||||
@ -176,5 +187,6 @@ Facture n°\FactureNum
|
||||
TVA non applicable, article 293 B du CGI.
|
||||
\end{center}
|
||||
|
||||
|
||||
\end{document}
|
||||
{% endlanguage %}
|
||||
|
@ -69,9 +69,11 @@ 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,
|
||||
@ -97,8 +99,10 @@ 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
34
shell-static.nix
Executable file
34
shell-static.nix
Executable file
@ -0,0 +1,34 @@
|
||||
# This is a workaround meant for use with the nix package manager. If you don't know what it is or don't use it, please ignore this file.
|
||||
#
|
||||
# The nk20 javascript static location are hardcoded for imperative system.
|
||||
# This make ./manage.py collectstatic hard to use with nixos.
|
||||
#
|
||||
# A workaround is to enter a FHSUserEnv with the static placed under /share/javascript/<static>.
|
||||
# This emulate a debian like system and enable collecting static normally with ./manage.py collectstatics.
|
||||
# The regular shell.nix should be enough for other configurations.
|
||||
#
|
||||
# Warning, you are still supposed to use pip package with a venv !
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
(pkgs.buildFHSUserEnv {
|
||||
name = "pipzone";
|
||||
targetPkgs = pkgs: (with pkgs;
|
||||
let
|
||||
fhs-static = stdenv.mkDerivation {
|
||||
name = "fhs-static";
|
||||
buildCommand = ''
|
||||
mkdir -p $out/share/javascript/bootstrap4
|
||||
mkdir -p $out/share/javascript/jquery
|
||||
ln -s ${python39Packages.xstatic-bootstrap}/lib/python3.9/site-packages/xstatic/pkg/bootstrap/data/* $out/share/javascript/bootstrap4
|
||||
ln -s ${python39Packages.xstatic-jquery}/lib/python3.9/site-packages/xstatic/pkg/jquery/data/* $out/share/javascript/jquery
|
||||
'';
|
||||
};
|
||||
in [
|
||||
fhs-static
|
||||
python39
|
||||
gettext
|
||||
python39Packages.pip
|
||||
python39Packages.virtualenv
|
||||
python39Packages.setuptools
|
||||
]);
|
||||
runScript = "bash";
|
||||
}).env
|
23
shell.nix
Executable file
23
shell.nix
Executable file
@ -0,0 +1,23 @@
|
||||
# This is meant for use with the nix package manager. If you don't know what it is or don't use it, please ignore this file.
|
||||
#
|
||||
# This shell.nix contains all dependencies require to create a venv and pip install -r requirements.txt.
|
||||
#
|
||||
# Please check shell-static.nix for running ./manage.py collectstatics.
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
python39
|
||||
python39Packages.pip
|
||||
python39Packages.setuptools
|
||||
gettext
|
||||
|
||||
];
|
||||
shellHook = ''
|
||||
# Tells pip to put packages into $PIP_PREFIX instead of the usual locations.
|
||||
# See https://pip.pypa.io/en/stable/user_guide/#environment-variables.
|
||||
export PIP_PREFIX=$(pwd)/_build/pip_packages
|
||||
export PYTHONPATH="$PIP_PREFIX/${pkgs.python39.sitePackages}:$PYTHONPATH"
|
||||
export PATH="$PIP_PREFIX/bin:$PATH"
|
||||
unset SOURCE_DATE_EPOCH
|
||||
'';
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user