diff --git a/.gitmodules b/.gitmodules index 133781f3..68884c55 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/app/Invoice/InvoiceDocument.php b/app/Invoice/InvoiceDocument.php index b27aef9b..2cf64de6 100644 --- a/app/Invoice/InvoiceDocument.php +++ b/app/Invoice/InvoiceDocument.php @@ -64,7 +64,7 @@ abstract class InvoiceDocument extends Document public function template(): Template { - return Template::make('tex.templates.default'); + return Template::make('tex.templates.letter'); } public function setFilename(string $filename): self diff --git a/packages/silvaletter b/packages/silvaletter deleted file mode 160000 index 409cbaf4..00000000 --- a/packages/silvaletter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 409cbaf4639d20aea52caa8e2136ffbcf9d4c7cc diff --git a/resources/views/tex/bill.tex b/resources/views/tex/bill.tex index 6c414b35..2e9421bb 100644 --- a/resources/views/tex/bill.tex +++ b/resources/views/tex/bill.tex @@ -1,4 +1,4 @@ -\documentclass[silvaletter,12pt]{scrlttr2} +\documentclass[dpsgletter,12pt]{scrlttr2} \setkomavar{subject}{<<< $getSubject >>>} \setkomavar{fromname}[<<<$settings->from>>>]{<<<$settings->from_long>>>} diff --git a/resources/views/tex/remember.tex b/resources/views/tex/remember.tex index 759f7d89..0938232d 100644 --- a/resources/views/tex/remember.tex +++ b/resources/views/tex/remember.tex @@ -1,4 +1,4 @@ -\documentclass[silvaletter,12pt]{scrlttr2} +\documentclass[dpsgletter,12pt]{scrlttr2} \setkomavar{subject}{<<< $getSubject >>>} \setkomavar{fromname}[<<<$settings->from>>>]{<<<$settings->from_long>>>} diff --git a/resources/views/tex/templates/default b/resources/views/tex/templates/default deleted file mode 120000 index 7e888992..00000000 --- a/resources/views/tex/templates/default +++ /dev/null @@ -1 +0,0 @@ -../../../../packages/silvaletter/template \ No newline at end of file diff --git a/resources/views/tex/templates/letter/dpsgletter.lco b/resources/views/tex/templates/letter/dpsgletter.lco new file mode 100644 index 00000000..7abf0da7 --- /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[german]{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[width=2cm]{logo.png}} % stammeslogo +\renewcommand*{\raggedsignature}{\raggedright} % Signatur links ausrichten +\setkomavar{signature}{} % Kein From unter Unterschriften-Feld + diff --git a/resources/views/tex/templates/letter/logo.png b/resources/views/tex/templates/letter/logo.png new file mode 100644 index 00000000..de6c2431 Binary files /dev/null and b/resources/views/tex/templates/letter/logo.png differ