From b35b40f833e5fd96a024e3e448e6a32de35bc9a5 Mon Sep 17 00:00:00 2001 From: Djiwo Date: Fri, 31 Oct 2025 00:27:04 +0100 Subject: [PATCH 1/4] Corrected some minor mistakes in the French translation --- simpleinvoice.sty | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simpleinvoice.sty b/simpleinvoice.sty index c9cff07..85102dd 100644 --- a/simpleinvoice.sty +++ b/simpleinvoice.sty @@ -43,8 +43,8 @@ \def \INV@text@warning@eng {By paying after deadline, additional interest and fees may apply.} \def \INV@text@invoice@fr {Facture} -\def \INV@text@ourref@fr {Notre référent} -\def \INV@text@yourref@fr {Votre référent} +\def \INV@text@ourref@fr {Notre référence} +\def \INV@text@yourref@fr {Votre référence} \def \INV@text@invnum@fr {Numéro de facture} \def \INV@text@invdate@fr {Date de facturation} \def \INV@text@deadline@fr {Date limite de paiement} From 4dbf964696536739919f0c9bfd66b5501cd82d31 Mon Sep 17 00:00:00 2001 From: Djiwo Date: Fri, 31 Oct 2025 00:27:59 +0100 Subject: [PATCH 2/4] Added a Dutch translation --- simpleinvoice.sty | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/simpleinvoice.sty b/simpleinvoice.sty index 85102dd..3614679 100644 --- a/simpleinvoice.sty +++ b/simpleinvoice.sty @@ -16,6 +16,8 @@ \DeclareOption{USenglish}{\def \INV@lang {eng}} \DeclareOption{french}{\def \INV@lang {fr}} \DeclareOption{francais}{\def \INV@lang {fr}} +\DeclareOption{dutch}{\def \INV@lang {nl}} +\DeclareOption{nederlands}{\def \INV@lang {nl}} \DeclareOption{norsk}{\def \INV@lang {nobm}} \DeclareOption{norwegian}{\def \INV@lang {nobm}} \DeclareOption{bokmaal}{\def \INV@lang {nobm}} @@ -59,6 +61,23 @@ \def \INV@text@accountnum@fr {Numéro de compte} \def \INV@text@warning@fr {En payant après la date limite, des intérêts et des frais peuvent être appliqués.} +\def \INV@text@invoice@nl {Factuur} +\def \INV@text@ourref@nl {Ons kenmerk} +\def \INV@text@yourref@nl {Uw kenmerk} +\def \INV@text@invnum@nl {Factuurnummer} +\def \INV@text@invdate@nl {Factuurdatum} +\def \INV@text@deadline@nl {Uiterste betalingstermijn} +\def \INV@text@description@nl {Beschrijving} +\def \INV@text@itemprice@nl {Prijs} +\def \INV@text@vat@nl {BTW} +\def \INV@text@itemtotal@nl {Som} +\def \INV@text@subtotal@nl {Subtotaal} +\def \INV@text@total@nl {Totaal} +\def \INV@text@paymentinfo@nl {Betalingsinformatie} +\def \INV@text@totallong@nl {Totaal} +\def \INV@text@accountnum@nl {Rekeningnummer} +\def \INV@text@warning@nl {Extra kosten kunnen in rekening worden gebracht bij overschrijding van het betalingstermijn} + \def \INV@text@invoice@nobm {Faktura} \def \INV@text@ourref@nobm {Vår ref} \def \INV@text@yourref@nobm {Deres ref} From 12bead592d42ae12699a049a68f7b3edafe67e3e Mon Sep 17 00:00:00 2001 From: Djiwo Date: Mon, 3 Nov 2025 20:12:00 +0100 Subject: [PATCH 3/4] Adding capability to prefix the amount with the currency with a new variable --- simpleinvoice.sty | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/simpleinvoice.sty b/simpleinvoice.sty index 3614679..73284f0 100644 --- a/simpleinvoice.sty +++ b/simpleinvoice.sty @@ -131,7 +131,7 @@ \def \INV@text@accountnum {\csname INV@text@accountnum@\INV@lang \endcsname} \def \INV@text@warning {\csname INV@text@warning@\INV@lang \endcsname} \def \INV@text@currency {} - +\def \INV@text@currencysignfirst {no} % Import neccesary libraries \RequirePackage{advdate} @@ -161,6 +161,9 @@ % Commands \RequirePackage{etoolbox} +% If/then/else statements +\RequirePackage{ifthen} + % Line seperator \newcommand{\linesep}{\vspace{6pt} {\color{linecolor}\hrule} \vspace{6pt}} @@ -195,7 +198,10 @@ \newcommand{\setourref}[1]{\def \INV@content@ourref {#1}} \newcommand{\setinvoicedate}[1]{\def \INV@content@date {#1}} \newcommand{\setdeadline}[1]{\def \INV@content@deadline {\DayAfter[#1]}} -\newcommand{\additem}[4]{\ifdef{\INV@content@list}{\appto \INV@content@list {\\ #1 & #2 \INV@text@currency & #3 \% & #4 \INV@text@currency}}{\def \INV@content@list {#1 & #2 \INV@text@currency& #3 \% & #4 \INV@text@currency}}} +\newcommand{\setcurrencysignfirst}[1]{\def \INV@text@currencysignfirst {#1}} +% command to print the values as '$ 3' or '3 $' +\newcommand{\printcurrencyvalue}[1]{\ifthenelse{\equal{\INV@text@currencysignfirst}{no}}{#1 \INV@text@currency}{\INV@text@currency{} #1}} +\newcommand{\additem}[4]{\ifdef{\INV@content@list}{\appto \INV@content@list {\\ #1 & \printcurrencyvalue{#2} & #3 \% & \printcurrencyvalue{#4}}}{\def \INV@content@list {#1 & \printcurrencyvalue{#2}& #3 \% & \printcurrencyvalue{#4}}}} \newcommand{\setsubtotal}[1]{\def \INV@content@subtotal {#1}} \newcommand{\setvat}[1]{\def \INV@content@vat {#1}} \newcommand{\settotal}[1]{\def \INV@content@total {#1}} @@ -244,9 +250,9 @@ \hfill \renewcommand{\arraystretch}{1} \begin{tabular}{r r} - \csname INV@text@subtotal\endcsname: \hspace{10pt} & \INV@content@subtotal \INV@text@currency\\ - \csname INV@text@vat\endcsname: \hspace{10pt} & \INV@content@vat \INV@text@currency\\ - {\Large \csname INV@text@total\endcsname: \hspace{10pt}} & {\Large \INV@content@total \INV@text@currency} + \csname INV@text@subtotal\endcsname: \hspace{10pt} & \printcurrencyvalue{\INV@content@subtotal}\\ + \csname INV@text@vat\endcsname: \hspace{10pt} & \printcurrencyvalue{\INV@content@vat}\\ + {\Large \csname INV@text@total\endcsname: \hspace{10pt}} & {\Large \printcurrencyvalue{\INV@content@total}} \end{tabular} \vfill @@ -256,7 +262,7 @@ \linesep \begin{tabularx}{\textwidth}{X r} \csname INV@text@invnum\endcsname: & \INV@content@num \\ - \csname INV@text@totallong\endcsname: & \INV@content@total \INV@text@currency\\ + \csname INV@text@totallong\endcsname: & \printcurrencyvalue{\INV@content@total}\\ \csname INV@text@accountnum\endcsname: & \INV@content@accountnum \end{tabularx} From b881b7f343957db26c7fb9b90fb59547145ae213 Mon Sep 17 00:00:00 2001 From: Djiwo Date: Mon, 3 Nov 2025 20:39:28 +0100 Subject: [PATCH 4/4] Updated documentation --- documentation.tex | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/documentation.tex b/documentation.tex index 00bd5af..62cafcd 100644 --- a/documentation.tex +++ b/documentation.tex @@ -59,7 +59,7 @@ framexleftmargin=2.4em, showstringspaces=false, language=TeX, - morekeywords={\documentclass,\begin,\end,\usepackage,\makeinvoice,\setinvoicetitle,\setinvoicenumber,\setreceivername,\setreceiveraddress,\setname,\setaddress,\setphonenumber,\setemail,\setyourref,\setourref,\setinvoicedate,\setdeadline,\additem,\setsubtotal,\setvat,\settotal,\setaccountnumber, \setsummary, \setcurrency, \setvattext, \setaccounttext}, + morekeywords={\documentclass,\begin,\end,\usepackage,\makeinvoice,\setcurrencysignfirst,\setinvoicetitle,\setinvoicenumber,\setreceivername,\setreceiveraddress,\setname,\setaddress,\setphonenumber,\setemail,\setyourref,\setourref,\setinvoicedate,\setdeadline,\additem,\setsubtotal,\setvat,\settotal,\setaccountnumber, \setsummary, \setcurrency, \setvattext, \setaccounttext}, commentstyle=\color{source_brown}\ttfamily, keywordstyle=\color{source_blue}\ttfamily, stringstyle=\color{source_orange}, @@ -97,12 +97,13 @@ \chapter{Package overview} The \texttt{simpleinvoice} package lets you easily typeset professional-looking invoices, and makes sure that all the legally required information is on the invoice. -The package respects the global language set in the document, or can be loaded with another language specified. The languages currently supported are English, Norwegian (bokmål), French and German. +The package respects the global language set in the document, or can be loaded with another language specified. The languages currently supported are English, Norwegian (bokmål), French, Dutch and German. Following are a list of all available commands, detailed description are available in \cref{sec:commanddetails}. \begin{itemize} + \item \nameref{par:setcurrencysignfirst} \item \nameref{par:setinvoicenumber} \item \nameref{par:setreceivername} \item \nameref{par:setreceiveraddress} @@ -151,9 +152,16 @@ \section{Loading package} \end{document} \end{lstlisting} - \section{Description of all available commands} \label{sec:commanddetails} + +\subsection{{\textbackslash}setcurrencysignfirst} \label{par:setcurrencysignfirst} +Overrides the standard value of the "currencysignfirst" variable. Set as a default to no, if it is set to yes, all the amounts will be printed with the currency sign before the amount ("\$ 3" instead of "3 \$") +Example: +\begin{lstlisting} +\setcurrencysignfirst{yes} +\end{lstlisting} + \subsection{{\textbackslash}setinvoicetitle} Overrides the standard title of the invoice. Optional command. Takes one argument: the new title. Example: