summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/invoice2
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-01-17 23:47:37 +0000
committerKarl Berry <karl@freefriends.org>2018-01-17 23:47:37 +0000
commitc3ad965169a16576b7214e764b9226ae7dd293f1 (patch)
tree6b84552588bec2d50394bb914b00ca4537f9331e /Master/texmf-dist/tex/latex/invoice2
parent0dd1fb55e27838f2788f3e371825be277201f051 (diff)
invoice2 (17jan18)
git-svn-id: svn://tug.org/texlive/trunk@46364 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/invoice2')
-rw-r--r--Master/texmf-dist/tex/latex/invoice2/invoice2-english.trsl6
-rw-r--r--Master/texmf-dist/tex/latex/invoice2/invoice2-german.trsl10
-rw-r--r--Master/texmf-dist/tex/latex/invoice2/invoice2-swissgerman.trsl33
-rw-r--r--Master/texmf-dist/tex/latex/invoice2/invoice2.sty76
4 files changed, 98 insertions, 27 deletions
diff --git a/Master/texmf-dist/tex/latex/invoice2/invoice2-english.trsl b/Master/texmf-dist/tex/latex/invoice2/invoice2-english.trsl
index 11385933d30..0eb59b4f88a 100644
--- a/Master/texmf-dist/tex/latex/invoice2/invoice2-english.trsl
+++ b/Master/texmf-dist/tex/latex/invoice2/invoice2-english.trsl
@@ -6,7 +6,7 @@
%%
%% invoice2.dtx (with options: `dictEnglish')
%%
-%% Copyright (C) 2017 Simon Dierl
+%% Copyright (C) 2017-2018 Simon Dierl
%%
%% This program is free software: you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by
@@ -21,6 +21,10 @@
%% You should have received a copy of the GNU General Public License
%% along with this program. If not, see <http://www.gnu.org/licenses/>.
%%
+ % \invoicesingleitem{Ignition!}{4087.99}
+ % \invoicesingleitem{The Art of Computer Programming 1--4}{162.99}
+ % \invoicesingleitem{The TeXbook}{55.69}
+ % \end{invoice}
\ProvideDictionaryFor{English}{invoice2}
\ProvideDictTranslation{invoice2-thousands-sep}{\,}
\ProvideDictTranslation{invoice2-decimal-point}{.}
diff --git a/Master/texmf-dist/tex/latex/invoice2/invoice2-german.trsl b/Master/texmf-dist/tex/latex/invoice2/invoice2-german.trsl
index e81393aae8b..e0ef7cfcf4b 100644
--- a/Master/texmf-dist/tex/latex/invoice2/invoice2-german.trsl
+++ b/Master/texmf-dist/tex/latex/invoice2/invoice2-german.trsl
@@ -6,7 +6,7 @@
%%
%% invoice2.dtx (with options: `dictGerman')
%%
-%% Copyright (C) 2017 Simon Dierl
+%% Copyright (C) 2017-2018 Simon Dierl
%%
%% This program is free software: you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by
@@ -21,16 +21,20 @@
%% You should have received a copy of the GNU General Public License
%% along with this program. If not, see <http://www.gnu.org/licenses/>.
%%
+ % \invoicesingleitem{Ignition!}{4087.99}
+ % \invoicesingleitem{The Art of Computer Programming 1--4}{162.99}
+ % \invoicesingleitem{The TeXbook}{55.69}
+ % \end{invoice}
\ProvideDictionaryFor{German}{invoice2}
\ProvideDictTranslation{invoice2-thousands-sep}{\,}
\ProvideDictTranslation{invoice2-decimal-point}{,}
\ProvideDictTranslation{invoice2-amount}{Anzahl}
\ProvideDictTranslation{invoice2-item}{Posten}
-\ProvideDictTranslation{invoice2-vat}{MwSt.}
+\ProvideDictTranslation{invoice2-vat}{USt}
\ProvideDictTranslation{invoice2-unit-price}{St\"uckpreis}
\ProvideDictTranslation{invoice2-price}{Preis}
\ProvideDictTranslation{invoice2-net-total}{Nettobetrag}
-\ProvideDictTranslation{invoice2-vat-total}{MwSt.}
+\ProvideDictTranslation{invoice2-vat-total}{USt}
\ProvideDictTranslation{invoice2-gross-total}{Gesamtbetrag}
%%
%%
diff --git a/Master/texmf-dist/tex/latex/invoice2/invoice2-swissgerman.trsl b/Master/texmf-dist/tex/latex/invoice2/invoice2-swissgerman.trsl
new file mode 100644
index 00000000000..b97c1dccef8
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/invoice2/invoice2-swissgerman.trsl
@@ -0,0 +1,33 @@
+%%
+%% This is file `invoice2-swissgerman.trsl',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% invoice2.dtx (with options: `dictSwissGerman')
+%%
+%% Copyright (C) 2017-2018 Simon Dierl
+%%
+%% This program is free software: you can redistribute it and/or modify
+%% it under the terms of the GNU General Public License as published by
+%% the Free Software Foundation, either version 3 of the License, or
+%% (at your option) any later version.
+%%
+%% This program is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+%% GNU General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public License
+%% along with this program. If not, see <http://www.gnu.org/licenses/>.
+%%
+ % \invoicesingleitem{Ignition!}{4087.99}
+ % \invoicesingleitem{The Art of Computer Programming 1--4}{162.99}
+ % \invoicesingleitem{The TeXbook}{55.69}
+ % \end{invoice}
+\ProvideDictionaryFor{Swiss German}{invoice2}
+\ProvideDictTranslation{invoice2-thousands-sep}{'}
+\ProvideDictTranslation{invoice2-decimal-point}{.}
+%%
+%%
+%% End of file `invoice2-swissgerman.trsl'.
diff --git a/Master/texmf-dist/tex/latex/invoice2/invoice2.sty b/Master/texmf-dist/tex/latex/invoice2/invoice2.sty
index 4972d781de5..8609a7a7cc9 100644
--- a/Master/texmf-dist/tex/latex/invoice2/invoice2.sty
+++ b/Master/texmf-dist/tex/latex/invoice2/invoice2.sty
@@ -6,7 +6,7 @@
%%
%% invoice2.dtx (with options: `package')
%%
-%% Copyright (C) 2017 Simon Dierl
+%% Copyright (C) 2017-2018 Simon Dierl
%%
%% This program is free software: you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by
@@ -21,18 +21,24 @@
%% You should have received a copy of the GNU General Public License
%% along with this program. If not, see <http://www.gnu.org/licenses/>.
%%
+ % \invoicesingleitem{Ignition!}{4087.99}
+ % \invoicesingleitem{The Art of Computer Programming 1--4}{162.99}
+ % \invoicesingleitem{The TeXbook}{55.69}
+ % \end{invoice}
\RequirePackage{booktabs}
\RequirePackage{expl3}
\RequirePackage{l3keys2e}
\RequirePackage{longtable}
\RequirePackage{siunitx}
\RequirePackage{translations}
-\RequirePackage[table]{xcolor}
+\PassOptionsToPackage{table}{xcolor}
+\RequirePackage{xcolor}
\RequirePackage{xparse}
-\ProvidesExplPackage{invoice2}{2017/08/16}{1.1}
+\ProvidesExplPackage{invoice2}{2018/01/15}{1.2}
{Intelligent invoices with LaTeX3}
\LoadDictionaryFor{english}{invoice2}
\LoadDictionaryFor{german}{invoice2}
+\LoadDictionaryFor{swissgerman}{invoice2}
\DeclareTranslationFallback{invoice2-thousands-sep}{\,}
\DeclareTranslationFallback{invoice2-decimal-point}{.}
\DeclareTranslationFallback{invoice2-amount}{Amount}
@@ -47,6 +53,7 @@
\bool_new:N \l__invoicetwo_included_vat_bool
\tl_new:N \l__invoicetwo_currency_symbol_tl
\int_new:N \l__invoicetwo_currency_fraction_digits_int
+\bool_new:N \l__invoicetwo_currency_in_header_bool
\bool_new:N \l__invoicetwo_colorize_bool
\tl_new:N \l__invoicetwo_odd_color_tl
\tl_set:Nn \l__invoicetwo_odd_color_tl {white}
@@ -76,6 +83,8 @@
currency-fraction-digits .int_set:N = \l__invoicetwo_currency_fraction_digits_int,
currency-fraction-digits .value_required:n = true,
currency-fraction-digits .initial:n = 2,
+ currency-in-header .bool_set:N = \l__invoicetwo_currency_in_header_bool,
+ currency-in-header .initial:n = false,
colorize .bool_set:N = \l__invoicetwo_colorize_bool,
colorize .initial:n = false,
odd-color .initial:n = white,
@@ -96,13 +105,13 @@
\keys_set:nn {invoice2} {#1}
}
\cs_new:Nn {\__invoicetwo_print_begin_table:}{
-\exp_args:Nx \longtable {
-\bool_if:NT \l__invoicetwo_amount_nonone_bool { c }
-l
-\bool_if:NT \l__invoicetwo_vat_nonzero_bool { c }
-r
-\bool_if:nT { \l__invoicetwo_amount_nonone_bool || \l__invoicetwo_vat_nonzero_bool } { r }
-}
+ \exp_args:Nx \longtable {
+ \bool_if:NT \l__invoicetwo_amount_nonone_bool { c }
+ l
+ \bool_if:NT \l__invoicetwo_vat_nonzero_bool { c }
+ r
+ \bool_if:nT { \l__invoicetwo_amount_nonone_bool || \l__invoicetwo_vat_nonzero_bool } { r }
+ }
}
\cs_new:Nn {\__invoicetwo_print_column_title:n}{
\multicolumn{1}{c}{
@@ -128,11 +137,20 @@ r
}
\cs_new:Nn {\__invoicetwo_print_unit_price_title:}{
\bool_if:nT { \l__invoicetwo_amount_nonone_bool || \l__invoicetwo_vat_nonzero_bool } {
- \__invoicetwo_print_column_title:n {\GetTranslation{invoice2-unit-price}} &
+ \__invoicetwo_print_column_title:n {
+ \GetTranslation{invoice2-unit-price}
+ \bool_if:NT \l__invoicetwo_currency_in_header_bool {
+ \ (\tl_use:N \l__invoicetwo_currency_symbol_tl)
+ }
+ } &
}
}
\cs_new:Nn {\__invoicetwo_print_price_title:}{
- \__invoicetwo_print_column_title:n {\GetTranslation{invoice2-price}}
+ \__invoicetwo_print_column_title:n {\GetTranslation{invoice2-price}
+ \bool_if:NT \l__invoicetwo_currency_in_header_bool {
+ \ (\tl_use:N \l__invoicetwo_currency_symbol_tl)
+ }
+ }
}
\cs_new:Nn {\__invoicetwo_print_header:}{
\__invoicetwo_print_begin_table:
@@ -146,12 +164,12 @@ r
\midrule
}
\cs_new:Nn {\__invoicetwo_print_real_value:n}{
-\num[round-integer-to-decimal,
-group-minimum-digits=4,
-group-separator={\GetTranslation{invoice2-thousands-sep}},
-output-decimal-marker={\GetTranslation{invoice2-decimal-point}}]{
-#1
-}
+ \num[round-integer-to-decimal,
+ group-minimum-digits=4,
+ group-separator={\GetTranslation{invoice2-thousands-sep}},
+ output-decimal-marker={\GetTranslation{invoice2-decimal-point}}]{
+ #1
+ }
}
\cs_new:Nn {\__invoicetwo_print_currency_value:n}{
\num[round-precision={\int_use:N \l__invoicetwo_currency_fraction_digits_int},
@@ -162,7 +180,9 @@ output-decimal-marker={\GetTranslation{invoice2-decimal-point}}]{
output-decimal-marker={\GetTranslation{invoice2-decimal-point}}]{
#1
}
- \, \tl_use:N \l__invoicetwo_currency_symbol_tl
+ \bool_if:NF \l__invoicetwo_currency_in_header_bool {
+ \, \tl_use:N \l__invoicetwo_currency_symbol_tl
+ }
}
\cs_new:Nn {\__invoicetwo_print_currency_value:N}{
\__invoicetwo_print_currency_value:n {\fp_use:N #1}
@@ -249,8 +269,8 @@ output-decimal-marker={\GetTranslation{invoice2-decimal-point}}]{
}
\NewDocumentCommand{\invoiceitem}{ommm}{
\__invoicetwo_add_row:nnnn {#2} {#3}
- {\IfValueTF{#1}{#1}{\fp_use:N \l__invoicetwo_vat_fp}}
- {#4}
+ {\IfValueTF{#1}{#1}{\fp_use:N \l__invoicetwo_vat_fp}}
+ {#4}
}
\NewDocumentCommand{\invoicesingleitem}{omm}{
\__invoicetwo_add_row:nnnn {1} {#2}
@@ -277,7 +297,12 @@ output-decimal-marker={\GetTranslation{invoice2-decimal-point}}]{
}
\cs_new:Nn {\__invoicetwo_print_net_item:}{
\bool_if:NT \l__invoicetwo_vat_nonzero_bool {
- \__invoicetwo_print_footer_item:n {\GetTranslation{invoice2-net-total}}
+ \__invoicetwo_print_footer_item:n {
+ \GetTranslation{invoice2-net-total}
+ \bool_if:NT \l__invoicetwo_currency_in_header_bool {
+ \ (\tl_use:N \l__invoicetwo_currency_symbol_tl)
+ }
+ }
\__invoicetwo_print_currency_value:N \l__invoicetwo_net_total_fp \\
}
}
@@ -288,7 +313,12 @@ output-decimal-marker={\GetTranslation{invoice2-decimal-point}}]{
}
}
\cs_new:Nn {\__invoicetwo_print_gross_item:}{
- \__invoicetwo_print_footer_item:n {\GetTranslation{invoice2-gross-total}}
+ \__invoicetwo_print_footer_item:n {
+ \GetTranslation{invoice2-gross-total}
+ \bool_if:NT \l__invoicetwo_currency_in_header_bool {
+ \ (\tl_use:N \l__invoicetwo_currency_symbol_tl)
+ }
+ }
\__invoicetwo_print_currency_value:N \l__invoicetwo_gross_total_fp \\
}
\cs_new:Nn {\__invoicetwo_print_footer:}{