diff --git a/.devcontainer/advanced/devcontainer.json b/.devcontainer/advanced/devcontainer.json index 1cfccbd..9720178 100755 --- a/.devcontainer/advanced/devcontainer.json +++ b/.devcontainer/advanced/devcontainer.json @@ -1,5 +1,5 @@ { - "image": "mcr.microsoft.com/devcontainers/universal:2", + "image": "mcr.microsoft.com/devcontainers/base:0-ubuntu-22.04", "features": { "ghcr.io/devcontainers/features/python:1": { "version": "3.12" @@ -47,11 +47,11 @@ } }, "mounts": [ - "source=${localWorkspaceFolder}/.devcontainer/advanced/.p10k.zsh,target=/home/codespace/.p10k.zsh,type=bind,consistency=cached", - "source=${localWorkspaceFolder}/.devcontainer/advanced/.zshrc,target=/home/codespace/.zshrc,type=bind,consistency=cached", - "source=${localWorkspaceFolder}/.devcontainer/advanced/post-create.sh,target=/home/codespace/post-create.sh,type=bind,consistency=cached", - "source=${localWorkspaceFolder}/.devcontainer/advanced/post-start.sh,target=/home/codespace/post-start.sh,type=bind,consistency=cached" + "source=${localWorkspaceFolder}/.devcontainer/advanced/.p10k.zsh,target=/home/vscode/.p10k.zsh,type=bind,consistency=cached", + "source=${localWorkspaceFolder}/.devcontainer/advanced/.zshrc,target=/home/vscode/.zshrc,type=bind,consistency=cached", + "source=${localWorkspaceFolder}/.devcontainer/advanced/post-create.sh,target=/home/vscode/post-create.sh,type=bind,consistency=cached", + "source=${localWorkspaceFolder}/.devcontainer/advanced/post-start.sh,target=/home/vscode/post-start.sh,type=bind,consistency=cached" ], - "postCreateCommand": "chmod +x /home/codespace/post-create.sh && /home/codespace/post-create.sh", - "postStartCommand": "chmod +x /home/codespace/post-create.sh && /home/codespace/post-create.sh" + "postCreateCommand": "chmod +x /home/vscode/post-create.sh && /home/vscode/post-create.sh", + "postStartCommand": "chmod +x /home/vscode/post-create.sh && /home/vscode/post-create.sh" } \ No newline at end of file diff --git a/.gitignore b/.gitignore index b32dc57..696737c 100644 --- a/.gitignore +++ b/.gitignore @@ -10,8 +10,12 @@ payments.csv document.aux document.pdf *.mta -*.ods + +*.aux +*.pdf + *.fdb_latexmk *.fls *.synctex.gz -*.png \ No newline at end of file +ccl_mitgliederdatenbank.xlsx +signature.png \ No newline at end of file diff --git a/Gemfile b/Gemfile index f79a21d..7f76f31 100644 --- a/Gemfile +++ b/Gemfile @@ -2,4 +2,7 @@ source 'https://rubygems.org' gem 'cmxl', '~> 1.5.0' gem 'roo', '~> 2.10.0' -gem 'humanize', '~> 2.5.1' \ No newline at end of file +gem 'humanize', '~> 2.5.1' +gem 'base64', '~> 0.2.0' +gem 'csv', '~> 3.3.2' +gem 'bigdecimal', '~> 3.1.9' diff --git a/Gemfile.lock b/Gemfile.lock index 80a6d58..8d42b6b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,20 +1,15 @@ GEM remote: https://rubygems.org/ specs: + base64 (0.2.0) + bigdecimal (3.1.9) cmxl (1.5.0) rchardet19 + csv (3.3.2) humanize (2.5.1) - nokogiri (1.16.3-aarch64-linux) - racc (~> 1.4) - nokogiri (1.16.3-arm-linux) - racc (~> 1.4) - nokogiri (1.16.3-arm64-darwin) - racc (~> 1.4) - nokogiri (1.16.3-x86-linux) - racc (~> 1.4) - nokogiri (1.16.3-x86_64-darwin) - racc (~> 1.4) - nokogiri (1.16.3-x86_64-linux) + mini_portile2 (2.8.8) + nokogiri (1.16.3) + mini_portile2 (~> 2.8.2) racc (~> 1.4) racc (1.7.3) rchardet19 (1.3.7) @@ -32,7 +27,10 @@ PLATFORMS x86_64-linux DEPENDENCIES + base64 (~> 0.2.0) + bigdecimal (~> 3.1.9) cmxl (~> 1.5.0) + csv (~> 3.3.2) humanize (~> 2.5.1) roo (~> 2.10.0) diff --git a/beitragsquittung.rb b/beitragsquittung.rb index 6340ebb..01c0376 100755 --- a/beitragsquittung.rb +++ b/beitragsquittung.rb @@ -24,7 +24,7 @@ def generate_reciept(mitgliedsnummer, name, vorname, strasse, hausnummer, plz, o end # call latex to generate the pdf - system("pdflatex \"\\newcommand{\\vorname}{#{vorname}} \\newcommand{\\nachname}{#{name}} \\newcommand{\\strasse}{#{strasse + " " + hausnummer.to_s}} \\newcommand{\\plz}{#{plz}} \\newcommand{\\ort}{#{ort}} \\newcommand{\\summe}{#{betrag}} \\newcommand{\\betraginworten}{#{betrag_in_worten}} \\newcommand{\\startdatum}{#{start_datum}} \\newcommand{\\findatum}{#{end_datum}} \\newcommand{\\mitgliedsnummer}{#{mitgliedsnummer}} \\input{document.tex}\"") + system("pdflatex -jobname=\"#{vorname}_#{name}-#{start_datum}_#{end_datum}\" \"\\newcommand{\\vorname}{#{vorname}} \\newcommand{\\nachname}{#{name}} \\newcommand{\\strasse}{#{strasse + " " + hausnummer.to_s}} \\newcommand{\\plz}{#{plz}} \\newcommand{\\ort}{#{ort}} \\newcommand{\\summe}{#{betrag}} \\newcommand{\\betraginworten}{#{betrag_in_worten}} \\newcommand{\\startdatum}{#{start_datum}} \\newcommand{\\findatum}{#{end_datum}} \\newcommand{\\mitgliedsnummer}{#{mitgliedsnummer}} \\input{document.tex}\"") end def get_payments_from_member_id(mitgliedsnummer) diff --git a/document.tex b/document.tex index e693244..4f90900 100644 --- a/document.tex +++ b/document.tex @@ -78,17 +78,17 @@ Betrag: \textbf{\summe{} \euro{}\\ } Betrag in Worten: \textbf{\betraginworten{}\\} Zeitraum: \textbf{\startdatum{} - \findatum{}\\} -Die Einhaltung der satzungsmäßigen Voraussetzungen nach den §§ 51, 59, 60 und 61 AO wurde vom Finanzamt Hamburg Nord, StNr. 17/103/06010 mit Bescheid vom 13.01.2021 nach § 60a AO gesondert festgestellt. Wir fördern nach unserer Satzung die Bildung, Wissenschaft und Forschung, den Natur- und Umweltschutz, Kunst und Kultur. +Die Einhaltung der satzungsmäßigen Voraussetzungen nach den §§ 51, 59, 60 und 61 AO wurde vom Finanzamt Hamburg Nord, StNr. 17/403/06010 mit Bescheid vom 13.01.2021 nach § 60a AO gesondert festgestellt. Wir fördern nach unserer Satzung die Bildung, Wissenschaft und Forschung, den Natur- und Umweltschutz, Kunst und Kultur. Es wird bestätigt, dass die Zuwendung nur zur Förderung der Bildung, von Wissenschaft und Forschung, des Natur- und Umweltschutzes, von Kunst und Kultur verwendet wird. Es wird bestätigt, dass es sich nicht um einen Mitgliedsbeitrag handelt, dessen Abzug nach § 10b Absatz 1 des Einkommensteuergesetzes ausgeschlossen ist. \footnotesize \closing{Mit freundlichen Grüßen} % Adjust vertical space as needed with \vspace -\vspace{-70pt} % Adjust the space above the signature as needed +\vspace{-60pt} % Adjust the space above the signature as needed % Adjust horizontal space as needed with \hspace -\hspace{-20pt} % Adjust the space to the left of the signature as needed -\includegraphics[scale=.9]{signature.png} % Include your signature image +% \hspace{-20pt} % Adjust the space to the left of the signature as needed +\includegraphics[width=3cm]{signature.png} % Include your signature image \tiny Hinweis: @@ -118,10 +118,10 @@ nach § 60a Abs. 1 AO länger als 3 Jahre seit Ausstellung des Bescheides zurüc \closing{Mit freundlichen Grüßen} % Adjust vertical space as needed with \vspace -\vspace{-70pt} % Adjust the space above the signature as needed +\vspace{-60pt} % Adjust the space above the signature as needed % Adjust horizontal space as needed with \hspace -\hspace{-20pt} % Adjust the space to the left of the signature as needed -\includegraphics[scale=.9]{signature.png} % Include your signature image +% \hspace{-20pt} % Adjust the space to the left of the signature as needed +\includegraphics[width=3cm]{signature.png} % Include your signature image \end{letter} \end{document} diff --git a/readme.md b/readme.md index 2a2f5e8..afec49c 100644 --- a/readme.md +++ b/readme.md @@ -30,7 +30,10 @@ bundle install ## Usage -`./beitragsquittung.rb ` +`./beitragsquittung.rb ` + +Example: +`./beitragsquittung.rb umsaetze_2024.mta ccl_mitgliederdatenbank.xlsx 38` The member ID is optional. If not provided, all members are processed. The time range is used from the MT940 file.