summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kropat <mail@michael.kropat.name>2015-09-22 12:35:24 +0000
committerMichael Kropat <mail@michael.kropat.name>2015-09-22 12:35:24 +0000
commit1f44f0aaf8cc9df533c248b63b655b22026710f7 (patch)
tree9e44c8b578e9f769c2a190cd3e694fcec2e6e8d3
parent69c6c35694a40ad1f30595c01747180a9a65b8f2 (diff)
parentd265c6b93fb9ea1d28fecd09f08ac249a5bbf447 (diff)
Merge remote-tracking branch 'origin/master' into paultcochrane-pr/handle-multiple-currencies
Conflicts: example.tex
-rw-r--r--dapper-invoice.cls4
-rw-r--r--example.tex18
2 files changed, 11 insertions, 11 deletions
diff --git a/dapper-invoice.cls b/dapper-invoice.cls
index 45015c2..97a0300 100644
--- a/dapper-invoice.cls
+++ b/dapper-invoice.cls
@@ -184,7 +184,7 @@
\newcommand*{\calcamount}[2]{%
\FPmul\t{#1}{#2}%
- \formatdollars{\t}%
+ \formatcurrency{\t}%
%
\FPadd\gt{\InvoiceTotal}{\t}%
\global\let\InvoiceTotal\gt%
@@ -261,7 +261,7 @@
}
}
-\newcommand*{\formatdollars}[1]{%
+\newcommand*{\formatcurrency}[1]{%
\num[group-separator={,}, group-minimum-digits=3, round-mode=places, round-precision=2]{#1}%
}
diff --git a/example.tex b/example.tex
index f38fc3c..0330cf7 100644
--- a/example.tex
+++ b/example.tex
@@ -3,12 +3,12 @@
%\documentclass[letterpaper,currency=euro]{dapper-invoice}
%\documentclass[letterpaper,currency=pound]{dapper-invoice}
-\def\invoiceNo{101}
-\def\balance{137.50}
-\def\duein{15}% days
+\newcommand{\invoiceNo}{101}
+\newcommand{\balance}{137.50}
+\newcommand{\duein}{15}% days
-\def\me{Your~Name}
-\def\clientName{Sample~Client}
+\newcommand{\me}{Your~Name}
+\newcommand{\clientName}{Sample~Client}
\setmetadata{\me}{Your Biz}{\invoiceNo}{\clientName}
@@ -30,7 +30,7 @@
\infoSub{\faMobilePhone}{\small\slshape +1~(555)~555-5555}
\noalign{\addvspace{8ex}}
\infoBox{}{
- {\large\raisebox{.55\height}\currencysym\huge\formatdollars{\balance} \arrowbase} \\
+ {\large\raisebox{.55\height}\currencysym\huge\formatcurrency{\balance} \arrowbase} \\
{\small\color{subduedColor} due \duedate{\duein}}
}
\end{infoSection}
@@ -63,10 +63,10 @@
\beginsummary
- \summaryline{Total}{\currencysym\formatdollars{\InvoiceTotal}}
+ \summaryline{Total}{\currencysym\formatcurrency{\InvoiceTotal}}
- \summaryline{Paid}{\currencysym\formatdollars{50}}
- \summaryline{Balance Due}{\currencysym\formatdollars{\balance}} % not really any math support (yet)
+ \summaryline{Paid}{\currencysym\formatcurrency{50}}
+ \summaryline{Balance Due}{\currencysym\formatcurrency{\balance}} % not really any math support (yet)
\end{hoursItemizationWithProject}