Compare commits
16 Commits
b67fa85539
...
306fef3e07
Author | SHA1 | Date |
---|---|---|
|
306fef3e07 | |
|
ca0dd11336 | |
|
89a8feb278 | |
|
8f7edadb99 | |
|
eee0c64106 | |
|
e50269d031 | |
|
dc40728fca | |
|
dfa17ed3db | |
|
77c57794e1 | |
|
1347347324 | |
|
cd9cc607f4 | |
|
6f1efb7470 | |
|
5fd050e116 | |
|
3a53777dbd | |
|
1ad2e6a978 | |
|
ac76d23941 |
|
@ -5,10 +5,11 @@ RUN composer install --ignore-platform-reqs --no-dev
|
||||||
RUN php artisan telescope:publish
|
RUN php artisan telescope:publish
|
||||||
RUN php artisan horizon:publish
|
RUN php artisan horizon:publish
|
||||||
|
|
||||||
FROM node:18.13.0-slim as node
|
FROM node:20.15.0-slim as node
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . /app
|
COPY . /app
|
||||||
RUN npm install && npm run prod && npm run img && rm -R node_modules
|
RUN cd packages/adrema-form && npm ci && npm run build && rm -R node_modules && cd ../../
|
||||||
|
RUN npm ci && npm run prod && npm run img && rm -R node_modules
|
||||||
|
|
||||||
FROM nginx:1.21.6-alpine as nginx
|
FROM nginx:1.21.6-alpine as nginx
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
|
@ -3,10 +3,11 @@ WORKDIR /app
|
||||||
COPY . /app
|
COPY . /app
|
||||||
RUN composer install --ignore-platform-reqs --no-dev
|
RUN composer install --ignore-platform-reqs --no-dev
|
||||||
|
|
||||||
FROM node:17.9.0-slim as node
|
FROM node:20.15.0-slim as node
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . /app
|
COPY . /app
|
||||||
RUN npm install && npm run prod && npm run img && rm -R node_modules
|
RUN cd packages/adrema-form && npm ci && npm run build && rm -R node_modules && cd ../../
|
||||||
|
RUN npm ci && npm run prod && npm run img && rm -R node_modules
|
||||||
|
|
||||||
FROM zoomyboy/adrema-base:latest as php
|
FROM zoomyboy/adrema-base:latest as php
|
||||||
COPY --chown=www-data:www-data . /app
|
COPY --chown=www-data:www-data . /app
|
||||||
|
@ -20,7 +21,7 @@ RUN php artisan horizon:publish
|
||||||
USER root
|
USER root
|
||||||
COPY ./.docker/php /bin
|
COPY ./.docker/php /bin
|
||||||
|
|
||||||
VOLUME ["/app/packages/laravel-nami/.cookies", "/app/storage/app"]
|
VOLUME ["/app/packages/laravel-nami/.cookies", "/app/storage/app", "/app/resources/views/tex/invoice"]
|
||||||
|
|
||||||
EXPOSE 9000
|
EXPOSE 9000
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,11 @@ mkdir -p /app/storage/app/public || true
|
||||||
chown -R www-data:www-data /app/packages/laravel-nami/.cookies
|
chown -R www-data:www-data /app/packages/laravel-nami/.cookies
|
||||||
chown -R www-data:www-data /app/storage/app
|
chown -R www-data:www-data /app/storage/app
|
||||||
|
|
||||||
|
if [ $APP_KEY = "YOUR_APP_KEY" ]; then
|
||||||
|
echo "----------------------- Keinen APP KEY gefunden. Key wird generiert: $(su www-data -c 'php artisan key:generate --show') ----------------------- Füge diesen Key als APP_KEY ein ---------------------"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $1 == "horizon" ]; then
|
if [ $1 == "horizon" ]; then
|
||||||
wait_for_db
|
wait_for_db
|
||||||
su www-data -c 'php artisan horizon'
|
su www-data -c 'php artisan horizon'
|
||||||
|
@ -22,10 +27,6 @@ fi
|
||||||
|
|
||||||
if [ $1 == "app" ]; then
|
if [ $1 == "app" ]; then
|
||||||
# --------------------------- ensure appkey is set ----------------------------
|
# --------------------------- ensure appkey is set ----------------------------
|
||||||
if [ $APP_KEY = "YOUR_APP_KEY" ]; then
|
|
||||||
echo "----------------------- Keinen APP KEY gefunden. Key wird generiert: $(su www-data -c 'php artisan key:generate --show') ----------------------- Füge diesen Key als APP_KEY ein ---------------------"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
wait_for_db
|
wait_for_db
|
||||||
php -r '$connection = new PDO("mysql:host='$DB_HOST';dbname='$DB_DATABASE'", "'$DB_USERNAME'", "'$DB_PASSWORD'"); $connection->query("DESCRIBE migrations");' > /dev/null || php artisan migrate --seed --force
|
php -r '$connection = new PDO("mysql:host='$DB_HOST';dbname='$DB_DATABASE'", "'$DB_USERNAME'", "'$DB_PASSWORD'"); $connection->query("DESCRIBE migrations");' > /dev/null || php artisan migrate --seed --force
|
||||||
su www-data -c 'php artisan migrate --force'
|
su www-data -c 'php artisan migrate --force'
|
||||||
|
|
|
@ -32,9 +32,9 @@ steps:
|
||||||
- while ! curl --silent 'http://owncloudserver:8080/ocs/v1.php/cloud/capabilities?format=json' -u admin:admin | grep '"status":"ok"'; do sleep 1; done
|
- while ! curl --silent 'http://owncloudserver:8080/ocs/v1.php/cloud/capabilities?format=json' -u admin:admin | grep '"status":"ok"'; do sleep 1; done
|
||||||
|
|
||||||
- name: node
|
- name: node
|
||||||
image: node:18.13.0-slim
|
image: node:20.15.0-slim
|
||||||
commands:
|
commands:
|
||||||
- npm ci && cd packages/adrema-form && npm ci && npm run build && cd ../../ && npm run img && npm run prod && rm -R node_modules
|
- npm ci && cd packages/adrema-form && npm ci && npm run build && rm -R node_modules && cd ../../ && npm run img && npm run prod && rm -R node_modules
|
||||||
|
|
||||||
- name: tests
|
- name: tests
|
||||||
image: zoomyboy/adrema-base:latest
|
image: zoomyboy/adrema-base:latest
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
[submodule "packages/silvaletter"]
|
|
||||||
path = packages/silvaletter
|
|
||||||
url = https://git.zoomyboy.de/silva/silvaletter.git
|
|
||||||
[submodule "packages/laravel-nami"]
|
[submodule "packages/laravel-nami"]
|
||||||
path = packages/laravel-nami
|
path = packages/laravel-nami
|
||||||
url = https://git.zoomyboy.de/silva/laravel-nami-api
|
url = https://git.zoomyboy.de/silva/laravel-nami-api
|
||||||
|
|
|
@ -85,6 +85,12 @@ Außerdem ist AdReMa auch problemlos auf Handys und Tablets bedienbar ("mobiles
|
||||||
|
|
||||||
7. Nach kurzer Zeit ist AdReMa über <http://localhost:8000> erreichbar und es kann sich mit dem zuvor festgelegten Login eingeloggt werden
|
7. Nach kurzer Zeit ist AdReMa über <http://localhost:8000> erreichbar und es kann sich mit dem zuvor festgelegten Login eingeloggt werden
|
||||||
|
|
||||||
|
### Individuelle anpassungen
|
||||||
|
|
||||||
|
#### Rechnungswesen
|
||||||
|
|
||||||
|
Bei dem Setup wird im Daten-Verzeichniss ein Ordner `./data/setup` angelegt. Hier kann das Logo des Stammes in den Briefkopf eingefügt werden. Zusätzlich kann der Text der Rechnung und der Zahlungserinnerung angepasst werden, dafür ist ein grundlegendes Verständnis für `.tex` Datein erforderlich.
|
||||||
|
|
||||||
## Nutzen des Entwicklungssystmes
|
## Nutzen des Entwicklungssystmes
|
||||||
|
|
||||||
1. Klonen des Reposetories
|
1. Klonen des Reposetories
|
||||||
|
|
|
@ -15,6 +15,6 @@ class BillDocument extends InvoiceDocument
|
||||||
|
|
||||||
public function view(): string
|
public function view(): string
|
||||||
{
|
{
|
||||||
return 'tex.bill';
|
return 'tex.invoice.bill';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ abstract class InvoiceDocument extends Document
|
||||||
|
|
||||||
public function template(): Template
|
public function template(): Template
|
||||||
{
|
{
|
||||||
return Template::make('tex.templates.default');
|
return Template::make('tex.templates.invoice');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setFilename(string $filename): self
|
public function setFilename(string $filename): self
|
||||||
|
|
|
@ -15,6 +15,6 @@ class RememberDocument extends InvoiceDocument
|
||||||
|
|
||||||
public function view(): string
|
public function view(): string
|
||||||
{
|
{
|
||||||
return 'tex.remember';
|
return 'tex.invoice.remember';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -355,6 +355,10 @@ class Member extends Model implements Geolocatable
|
||||||
$preventions[] = Prevention::EFZ;
|
$preventions[] = Prevention::EFZ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$this->has_vk) {
|
||||||
|
$preventions[] = Prevention::VK;
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->more_ps_at === null) {
|
if ($this->more_ps_at === null) {
|
||||||
if ($this->ps_at === null || $this->ps_at->diffInYears($date) >= 5) {
|
if ($this->ps_at === null || $this->ps_at->diffInYears($date) >= 5) {
|
||||||
$preventions[] = Prevention::PS;
|
$preventions[] = Prevention::PS;
|
||||||
|
|
|
@ -7,6 +7,7 @@ enum Prevention
|
||||||
case EFZ;
|
case EFZ;
|
||||||
case PS;
|
case PS;
|
||||||
case MOREPS;
|
case MOREPS;
|
||||||
|
case VK;
|
||||||
|
|
||||||
public function text(): string
|
public function text(): string
|
||||||
{
|
{
|
||||||
|
@ -14,6 +15,7 @@ enum Prevention
|
||||||
static::EFZ => 'erweitertes Führungszeugnis',
|
static::EFZ => 'erweitertes Führungszeugnis',
|
||||||
static::PS => 'Präventionsschulung Basis Plus',
|
static::PS => 'Präventionsschulung Basis Plus',
|
||||||
static::MOREPS => 'Präventionsschulung (Auffrischung)',
|
static::MOREPS => 'Präventionsschulung (Auffrischung)',
|
||||||
|
static::VK => 'Verhaltenskodex',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@ services:
|
||||||
- ./data/storage:/app/storage/app
|
- ./data/storage:/app/storage/app
|
||||||
- ./data/plugins:/app/plugins
|
- ./data/plugins:/app/plugins
|
||||||
- ./data/cookies:/app/packages/laravel-nami/.cookies
|
- ./data/cookies:/app/packages/laravel-nami/.cookies
|
||||||
|
- ./data/invoice:/app/resources/views/tex/invoice
|
||||||
|
|
||||||
horizon:
|
horizon:
|
||||||
image: zoomyboy/adrema-app:latest
|
image: zoomyboy/adrema-app:latest
|
||||||
|
@ -57,6 +58,7 @@ services:
|
||||||
- ./data/storage:/app/storage/app
|
- ./data/storage:/app/storage/app
|
||||||
- ./data/plugins:/app/plugins
|
- ./data/plugins:/app/plugins
|
||||||
- ./data/cookies:/app/packages/laravel-nami/.cookies
|
- ./data/cookies:/app/packages/laravel-nami/.cookies
|
||||||
|
- ./data/invoice:/app/resources/views/tex/invoice
|
||||||
|
|
||||||
schedule:
|
schedule:
|
||||||
image: zoomyboy/adrema-app:latest
|
image: zoomyboy/adrema-app:latest
|
||||||
|
@ -80,6 +82,7 @@ services:
|
||||||
- ./data/storage:/app/storage/app
|
- ./data/storage:/app/storage/app
|
||||||
- ./data/plugins:/app/plugins
|
- ./data/plugins:/app/plugins
|
||||||
- ./data/cookies:/app/packages/laravel-nami/.cookies
|
- ./data/cookies:/app/packages/laravel-nami/.cookies
|
||||||
|
- ./data/invoice:/app/resources/views/tex/invoice
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: mariadb:10.6.5
|
image: mariadb:10.6.5
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 409cbaf4639d20aea52caa8e2136ffbcf9d4c7cc
|
|
|
@ -67,7 +67,7 @@
|
||||||
v-model="values.params.inGrp"
|
v-model="values.params.inGrp"
|
||||||
label="In Gruppierung suchen"
|
label="In Gruppierung suchen"
|
||||||
name="inGrp"
|
name="inGrp"
|
||||||
hint="Mitglieder finden, die direktes Mitglied in der kleinsten befüllten Gruppierung sind."
|
hint="Mitglieder finden, die direktes Mitglied in der kleinsten ausgewählten Gruppierung sind."
|
||||||
size="sm"
|
size="sm"
|
||||||
@update:modelValue="search"
|
@update:modelValue="search"
|
||||||
></f-switch>
|
></f-switch>
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
v-model="values.params.unterhalbGrp"
|
v-model="values.params.unterhalbGrp"
|
||||||
label="Unterhalb Gruppierung suchen"
|
label="Unterhalb Gruppierung suchen"
|
||||||
name="unterhalbGrp"
|
name="unterhalbGrp"
|
||||||
hint="Mitglieder finden, die direktes Mitglied in einer Untergruppe der kleinsten befüllten Gruppierung sind."
|
hint="Mitglieder finden, die direktes Mitglied in einer Untergruppe der kleinsten ausgewählten Gruppierung sind."
|
||||||
size="sm"
|
size="sm"
|
||||||
@update:modelValue="search"
|
@update:modelValue="search"
|
||||||
></f-switch>
|
></f-switch>
|
||||||
|
@ -141,7 +141,6 @@ import hasFlash from '../../mixins/hasFlash.js';
|
||||||
import debounce from 'lodash/debounce';
|
import debounce from 'lodash/debounce';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
mixins: [hasFlash],
|
mixins: [hasFlash],
|
||||||
layout: FullLayout,
|
layout: FullLayout,
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,24 @@
|
||||||
\documentclass[silvaletter,12pt]{scrlttr2}
|
\documentclass[dpsgletter,12pt]{scrlttr2}
|
||||||
|
|
||||||
\setkomavar{subject}{<<< $getSubject >>>}
|
\setkomavar{subject}{<<< $getSubject >>>}
|
||||||
\setkomavar{fromname}[<<<$settings->from>>>]{<<<$settings->from_long>>>}
|
\setkomavar{fromname}[<<<$settings->from>>>]{<<<$settings->from_long>>>}
|
||||||
|
@if($settings->mobile)
|
||||||
|
\KOMAoptions{frommobilephone}
|
||||||
\setkomavar{frommobilephone}[Mobiltelefon: ]{<<<$settings->mobile>>>}
|
\setkomavar{frommobilephone}[Mobiltelefon: ]{<<<$settings->mobile>>>}
|
||||||
|
@endif
|
||||||
|
@if($settings->email)
|
||||||
|
\KOMAoptions{fromemail}
|
||||||
\setkomavar{fromemail}[E-Mail: ]{<<<$settings->email>>>}
|
\setkomavar{fromemail}[E-Mail: ]{<<<$settings->email>>>}
|
||||||
|
@endif
|
||||||
|
@if($settings->website)
|
||||||
|
\KOMAoptions{fromurl}
|
||||||
\setkomavar{fromurl}[Website: ]{<<<$settings->website>>>}
|
\setkomavar{fromurl}[Website: ]{<<<$settings->website>>>}
|
||||||
\setkomavar{fromaddress}{<<<$settings->address>>>}
|
@endif
|
||||||
|
@if($settings->address && $settings->zip && $settings->place)
|
||||||
|
\setkomavar{fromaddress}{<<<$settings->address>>>\\<<<$settings->zip>>> <<<$settings->place>>>}
|
||||||
\setkomavar{place}{<<<$settings->place>>>}
|
\setkomavar{place}{<<<$settings->place>>>}
|
||||||
\setkomavar{fromzipcode}{<<<$settings->zip>>>}
|
\setkomavar{fromzipcode}{<<<$settings->zip>>>}
|
||||||
\setkomavar{fromlogo}{\includegraphics[width=2cm]{logo.png}} % stammeslogo
|
@endif
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
\begin{letter}{<<< $toName >>>\\<<< $toAddress >>>\\<<< $toZip >>> <<< $toLocation >>>}
|
\begin{letter}{<<< $toName >>>\\<<< $toAddress >>>\\<<< $toZip >>> <<< $toLocation >>>}
|
||||||
|
@ -16,7 +26,7 @@
|
||||||
\gdef\TotalHT{0}
|
\gdef\TotalHT{0}
|
||||||
\opening{<<< $greeting >>>,}
|
\opening{<<< $greeting >>>,}
|
||||||
|
|
||||||
Hiermit stellen wir Ihnen den aktuellen Mitgliedsbeitrag für den \usekomavar*{fromname} und die DPSG in Rechnung. Dieser setzt sich wie folgt zusammen:
|
hiermit stellen wir Ihnen den aktuellen Mitgliedsbeitrag für den \usekomavar*{fromname} und die DPSG in Rechnung. Dieser setzt sich wie folgt zusammen:
|
||||||
|
|
||||||
\begin{center}
|
\begin{center}
|
||||||
\begin{tabular}{@{}p{0.8\textwidth}|r}
|
\begin{tabular}{@{}p{0.8\textwidth}|r}
|
||||||
|
@ -33,7 +43,7 @@
|
||||||
\begin{tabular}{ll}
|
\begin{tabular}{ll}
|
||||||
Kontoinhaber: & <<<$settings->from_long>>> \\
|
Kontoinhaber: & <<<$settings->from_long>>> \\
|
||||||
IBAN: & <<<$settings->iban>>> \\
|
IBAN: & <<<$settings->iban>>> \\
|
||||||
Bic: & <<<$settings->bic>>> \\
|
BIC: & <<<$settings->bic>>> \\
|
||||||
Verwendungszweck: & <<<$usage>>>
|
Verwendungszweck: & <<<$usage>>>
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
|
|
|
@ -1,14 +1,24 @@
|
||||||
\documentclass[silvaletter,12pt]{scrlttr2}
|
\documentclass[dpsgletter,12pt]{scrlttr2}
|
||||||
|
|
||||||
\setkomavar{subject}{<<< $getSubject >>>}
|
\setkomavar{subject}{<<< $getSubject >>>}
|
||||||
\setkomavar{fromname}[<<<$settings->from>>>]{<<<$settings->from_long>>>}
|
\setkomavar{fromname}[<<<$settings->from>>>]{<<<$settings->from_long>>>}
|
||||||
|
@if($settings->mobile)
|
||||||
|
\KOMAoptions{frommobilephone}
|
||||||
\setkomavar{frommobilephone}[Mobiltelefon: ]{<<<$settings->mobile>>>}
|
\setkomavar{frommobilephone}[Mobiltelefon: ]{<<<$settings->mobile>>>}
|
||||||
|
@endif
|
||||||
|
@if($settings->email)
|
||||||
|
\KOMAoptions{fromemail}
|
||||||
\setkomavar{fromemail}[E-Mail: ]{<<<$settings->email>>>}
|
\setkomavar{fromemail}[E-Mail: ]{<<<$settings->email>>>}
|
||||||
|
@endif
|
||||||
|
@if($settings->website)
|
||||||
|
\KOMAoptions{fromurl}
|
||||||
\setkomavar{fromurl}[Website: ]{<<<$settings->website>>>}
|
\setkomavar{fromurl}[Website: ]{<<<$settings->website>>>}
|
||||||
\setkomavar{fromaddress}{<<<$settings->address>>>}
|
@endif
|
||||||
|
@if($settings->address && $settings->zip && $settings->place)
|
||||||
|
\setkomavar{fromaddress}{<<<$settings->address>>>\\<<<$settings->zip>>> <<<$settings->place>>>}
|
||||||
\setkomavar{place}{<<<$settings->place>>>}
|
\setkomavar{place}{<<<$settings->place>>>}
|
||||||
\setkomavar{fromzipcode}{<<<$settings->zip>>>}
|
\setkomavar{fromzipcode}{<<<$settings->zip>>>}
|
||||||
\setkomavar{fromlogo}{\includegraphics[width=2cm]{logo.png}} % stammeslogo
|
@endif
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
\begin{letter}{<<< $toName >>>\\<<< $toAddress >>>\\<<< $toZip >>> <<< $toLocation >>>}
|
\begin{letter}{<<< $toName >>>\\<<< $toAddress >>>\\<<< $toZip >>> <<< $toLocation >>>}
|
||||||
|
@ -16,7 +26,7 @@
|
||||||
\gdef\TotalHT{0}
|
\gdef\TotalHT{0}
|
||||||
\opening{<<< $greeting >>>,}
|
\opening{<<< $greeting >>>,}
|
||||||
|
|
||||||
Ihr Mitgliedbeitrag ist noch ausstehend. Dieser setzt sich wie folgt zusammen:
|
ihr Mitgliedbeitrag ist noch ausstehend. Dieser setzt sich wie folgt zusammen:
|
||||||
|
|
||||||
\begin{center}
|
\begin{center}
|
||||||
\begin{tabular}{@{}p{0.8\textwidth}|r}
|
\begin{tabular}{@{}p{0.8\textwidth}|r}
|
||||||
|
@ -33,7 +43,7 @@
|
||||||
\begin{tabular}{ll}
|
\begin{tabular}{ll}
|
||||||
Kontoinhaber: & <<<$settings->from_long>>> \\
|
Kontoinhaber: & <<<$settings->from_long>>> \\
|
||||||
IBAN: & <<<$settings->iban>>> \\
|
IBAN: & <<<$settings->iban>>> \\
|
||||||
Bic: & <<<$settings->bic>>> \\
|
BIC: & <<<$settings->bic>>> \\
|
||||||
Verwendungszweck: & <<<$usage>>>
|
Verwendungszweck: & <<<$usage>>>
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
../../../../packages/silvaletter/template
|
|
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
|
@ -0,0 +1,43 @@
|
||||||
|
\ProvidesFile{dpsgletter.lco}
|
||||||
|
|
||||||
|
% ---------------------------- Require packages ----------------------------
|
||||||
|
\RequirePackage{xcolor}
|
||||||
|
\RequirePackage[utf8]{inputenc}
|
||||||
|
\RequirePackage[T1]{fontenc}
|
||||||
|
\RequirePackage[ngerman]{babel}
|
||||||
|
\RequirePackage{fp}
|
||||||
|
\RequirePackage{booktabs}
|
||||||
|
\RequirePackage{ragged2e}
|
||||||
|
\RequirePackage{graphicx}
|
||||||
|
\RequirePackage{numprint}
|
||||||
|
\RequirePackage[gen]{eurosym}
|
||||||
|
|
||||||
|
\RequirePackage[condensed,math]{kurier}
|
||||||
|
|
||||||
|
% ---------------------------- Color definition ----------------------------
|
||||||
|
\definecolor{dpsgblue}{HTML}{003056}
|
||||||
|
|
||||||
|
% ----------------------------- font settings ------------------------------
|
||||||
|
\addtokomafont{subject}{\large\color{dpsgblue}}
|
||||||
|
|
||||||
|
% -------------------------- Calculation of table --------------------------
|
||||||
|
\gdef\TotalHT{0}
|
||||||
|
\newcommand{\product}[2]{%
|
||||||
|
#1 & \FPmul\temp{#2}{1}\FPround\temp{\temp}{2}\numprint[\euro]{\temp}
|
||||||
|
%% Totalize
|
||||||
|
\FPadd\total{\TotalHT}{\temp}%
|
||||||
|
\FPround\total{\total}{2}%
|
||||||
|
\global\let\TotalHT\total%
|
||||||
|
\\ }
|
||||||
|
\newcommand{\totalttc}{\numprint[\euro]{\TotalHT}
|
||||||
|
}
|
||||||
|
|
||||||
|
% ---------------------------- Global variables ----------------------------
|
||||||
|
\KOMAoptions{DIV=15, pagenumber=no, enlargefirstpage, firstfoot=false, foldmarks, fromlogo, fromalign=right}
|
||||||
|
\setlength{\parindent}{0pt}
|
||||||
|
\setlength{\parskip}{10pt}
|
||||||
|
\setkomavar{backaddressseparator}{ $\cdot$ }
|
||||||
|
\setkomavar{fromlogo}{\includegraphics[height=3cm]{assets/logo.png}} % stammeslogo
|
||||||
|
\renewcommand*{\raggedsignature}{\raggedright} % Signatur links ausrichten
|
||||||
|
\setkomavar{signature}{} % Kein From unter Unterschriften-Feld
|
||||||
|
|
|
@ -111,44 +111,49 @@ class PreventionTest extends TestCase
|
||||||
protected function attributes(): Generator
|
protected function attributes(): Generator
|
||||||
{
|
{
|
||||||
yield [
|
yield [
|
||||||
'attrs' => ['efz' => null, 'ps_at' => now()],
|
'attrs' => ['has_vk' => true, 'efz' => null, 'ps_at' => now()],
|
||||||
'preventions' => [Prevention::EFZ]
|
'preventions' => [Prevention::EFZ]
|
||||||
];
|
];
|
||||||
|
|
||||||
yield [
|
yield [
|
||||||
'attrs' => ['efz' => now(), 'ps_at' => null],
|
'attrs' => ['has_vk' => true, 'efz' => now(), 'ps_at' => null],
|
||||||
'preventions' => [Prevention::PS]
|
'preventions' => [Prevention::PS]
|
||||||
];
|
];
|
||||||
|
|
||||||
yield [
|
yield [
|
||||||
'attrs' => ['efz' => now()->subDay(), 'ps_at' => now()],
|
'attrs' => ['has_vk' => true, 'efz' => now()->subDay(), 'ps_at' => now()],
|
||||||
'preventions' => []
|
'preventions' => []
|
||||||
];
|
];
|
||||||
|
|
||||||
yield [
|
yield [
|
||||||
'attrs' => ['efz' => now(), 'ps_at' => now()->subDay()],
|
'attrs' => ['has_vk' => true, 'efz' => now(), 'ps_at' => now()->subDay()],
|
||||||
'preventions' => []
|
'preventions' => []
|
||||||
];
|
];
|
||||||
|
|
||||||
yield [
|
yield [
|
||||||
'attrs' => ['efz' => now()->subYears(5)->subDay(), 'ps_at' => now()],
|
'attrs' => ['has_vk' => true, 'efz' => now()->subYears(5)->subDay(), 'ps_at' => now()],
|
||||||
'preventions' => [Prevention::EFZ]
|
'preventions' => [Prevention::EFZ]
|
||||||
];
|
];
|
||||||
|
|
||||||
yield [
|
yield [
|
||||||
'attrs' => ['efz' => now(), 'ps_at' => now()->subYears(5)->subDay()],
|
'attrs' => ['has_vk' => true, 'efz' => now(), 'ps_at' => now()->subYears(5)->subDay()],
|
||||||
'preventions' => [Prevention::PS]
|
'preventions' => [Prevention::PS]
|
||||||
];
|
];
|
||||||
|
|
||||||
yield [
|
yield [
|
||||||
'attrs' => ['efz' => now(), 'ps_at' => now()->subYears(5)->subDay(), 'more_ps_at' => now()],
|
'attrs' => ['has_vk' => true, 'efz' => now(), 'ps_at' => now()->subYears(5)->subDay(), 'more_ps_at' => now()],
|
||||||
'preventions' => []
|
'preventions' => []
|
||||||
];
|
];
|
||||||
|
|
||||||
yield [
|
yield [
|
||||||
'attrs' => ['efz' => now(), 'ps_at' => now()->subYears(15), 'more_ps_at' => now()->subYears(5)->subDay()],
|
'attrs' => ['has_vk' => true, 'efz' => now(), 'ps_at' => now()->subYears(15), 'more_ps_at' => now()->subYears(5)->subDay()],
|
||||||
'preventions' => [Prevention::MOREPS],
|
'preventions' => [Prevention::MOREPS],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
yield [
|
||||||
|
'attrs' => ['has_vk' => false, 'efz' => now(), 'ps_at' => now()],
|
||||||
|
'preventions' => [Prevention::VK],
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue