diff --git a/.docker/php.Dockerfile b/.docker/php.Dockerfile index 20fc491c..0b0e7ec5 100644 --- a/.docker/php.Dockerfile +++ b/.docker/php.Dockerfile @@ -20,7 +20,7 @@ RUN php artisan horizon:publish USER root 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 diff --git a/.gitmodules b/.gitmodules index 3af5a3b5..838e3b1c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "packages/silvaletter"] - path = packages/silvaletter - url = https://git.zoomyboy.de/silva/silvaletter.git [submodule "packages/laravel-nami"] path = packages/laravel-nami url = https://git.zoomyboy.de/silva/laravel-nami-api diff --git a/resources/views/tex/invoice/bill.tex b/resources/views/tex/invoice/bill.tex index f4e9f63f..017e0d47 100644 --- a/resources/views/tex/invoice/bill.tex +++ b/resources/views/tex/invoice/bill.tex @@ -1,14 +1,24 @@ -\documentclass[silvaletter,12pt]{scrlttr2} +\documentclass[dpsgletter,12pt]{scrlttr2} \setkomavar{subject}{<<< $getSubject >>>} \setkomavar{fromname}[<<<$settings->from>>>]{<<<$settings->from_long>>>} +@if($settings->mobile) +\KOMAoptions{frommobilephone} \setkomavar{frommobilephone}[Mobiltelefon: ]{<<<$settings->mobile>>>} +@endif +@if($settings->email) +\KOMAoptions{fromemail} \setkomavar{fromemail}[E-Mail: ]{<<<$settings->email>>>} +@endif +@if($settings->website) +\KOMAoptions{fromurl} \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{fromzipcode}{<<<$settings->zip>>>} -\setkomavar{fromlogo}{\includegraphics[width=2cm]{logo.png}} % stammeslogo +@endif \begin{document} \begin{letter}{<<< $toName >>>\\<<< $toAddress >>>\\<<< $toZip >>> <<< $toLocation >>>} diff --git a/resources/views/tex/invoice/remember.tex b/resources/views/tex/invoice/remember.tex index 1441855b..2814e68c 100644 --- a/resources/views/tex/invoice/remember.tex +++ b/resources/views/tex/invoice/remember.tex @@ -1,14 +1,24 @@ -\documentclass[silvaletter,12pt]{scrlttr2} +\documentclass[dpsgletter,12pt]{scrlttr2} \setkomavar{subject}{<<< $getSubject >>>} \setkomavar{fromname}[<<<$settings->from>>>]{<<<$settings->from_long>>>} +@if($settings->mobile) +\KOMAoptions{frommobilephone} \setkomavar{frommobilephone}[Mobiltelefon: ]{<<<$settings->mobile>>>} +@endif +@if($settings->email) +\KOMAoptions{fromemail} \setkomavar{fromemail}[E-Mail: ]{<<<$settings->email>>>} +@endif +@if($settings->website) +\KOMAoptions{fromurl} \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{fromzipcode}{<<<$settings->zip>>>} -\setkomavar{fromlogo}{\includegraphics[width=2cm]{logo.png}} % stammeslogo +@endif \begin{document} \begin{letter}{<<< $toName >>>\\<<< $toAddress >>>\\<<< $toZip >>> <<< $toLocation >>>} diff --git a/resources/views/tex/templates/letter/assets/logo.png b/resources/views/tex/templates/letter/assets/logo.png new file mode 100755 index 00000000..e54fa754 Binary files /dev/null and b/resources/views/tex/templates/letter/assets/logo.png differ diff --git a/resources/views/tex/templates/letter/dpsgletter.lco b/resources/views/tex/templates/letter/dpsgletter.lco new file mode 100644 index 00000000..55559f49 --- /dev/null +++ b/resources/views/tex/templates/letter/dpsgletter.lco @@ -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 +