summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-11-28 17:21:23 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-12-13 00:17:16 +0100
commita6927627eb65ff5e6879d427c716521e13295136 (patch)
treecc077d2a12c7e7d7a382b48f2bd3c62f7be13bec
parent920b433ec1223f9ec8edbdadcbbbe2f511416e1a (diff)
downloaddocuments-a6927627eb65ff5e6879d427c716521e13295136.tar.gz
documents-a6927627eb65ff5e6879d427c716521e13295136.tar.bz2
documents-a6927627eb65ff5e6879d427c716521e13295136.zip
Handle fixed costs
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r--NLnet/porting_replicant_to_android9/costs.tex65
-rw-r--r--NLnet/porting_replicant_to_android9/porting_replicant_to_android9.tex24
2 files changed, 63 insertions, 26 deletions
diff --git a/NLnet/porting_replicant_to_android9/costs.tex b/NLnet/porting_replicant_to_android9/costs.tex
index 79a09af..6ec8b97 100644
--- a/NLnet/porting_replicant_to_android9/costs.tex
+++ b/NLnet/porting_replicant_to_android9/costs.tex
@@ -1,32 +1,65 @@
%% Calculate various costs
\usepackage{calc}
+\usepackage{ifthen}
-\newcounter{hours}
\newcounter{rate}
\setcounter{rate}{27}
+
\newcounter{totalhours}
\setcounter{totalhours}{0}
-\newcounter{totalhourcosts}
-\setcounter{totalhourcosts}{0}
+
+\newcounter{totalfixedcosts}
+\setcounter{totalfixedcosts}{0}
+
+\newcommand{\fixedcost}[1] {
+ \setcounter{totalfixedcosts}{\thetotalfixedcosts + #1}
+ \euro{#1}
+}
\newcounter{cost}
\newcommand{\workhours}[1] {
- \setcounter{hours}{#1}
- \setcounter{cost}{\thehours*\therate}
+ \setcounter{cost}{#1 * \therate}
- \thehours h
- \euro{\thecost}
+ #1h: \euro{\thecost}
%% For the total at the end
- \setcounter{totalhours}{\thetotalhours +\thehours}
+ \setcounter{totalhours}{\thetotalhours + #1}
}
-\newcommand{\worktotal}[0] {
- \setcounter{totalhourcosts}{\thetotalhours*\therate}
-
- \thetotalhours h (\euro{\thetotalhourcosts})
-
- \setcounter{totalhours}{0}
- \setcounter{totalhourcosts}{0}
+%% Input:
+%% - rate
+%% - totalhours
+%% - totalfixedcosts
+\newcounter{totalhourscost}
+\newcounter{totalcost}
+\newcommand{\subsectiontotal}[1]{
+ \noalign{
+ \setcounter{totalhourscost}{\thetotalhours * \therate}
+ \setcounter{totalcost}{\thetotalhourscost + \thetotalfixedcosts}
+ \ifthenelse{\equal{\thetotalfixedcosts}{0}}
+ {
+ \gdef\tmp{
+ \multicolumn{#1}{|c|}{Total: approximately \thetotalhours h: \euro{\thetotalhourscost}} \\
+ }
+ }%
+ {
+ \gdef\tmp{
+ \multicolumn{#1}{|c|}{
+ Approximate work hours: \thetotalhours h: \euro{\thetotalhourscost}
+ } \\
+ \multicolumn{#1}{|c|}{
+ Fixed costs: \euro{\thetotalfixedcosts}
+ } \\
+ \multicolumn{#1}{|c|}{
+ Total: \euro{\thetotalcost}
+ } \\
+ }
+ }%
+ }\tmp
+ \noalign{
+ \gdef\tmp{
+ \setcounter{totalhours}{0}
+ \setcounter{totalfixedcosts}{0}
+ }\tmp
+ }
}
-
diff --git a/NLnet/porting_replicant_to_android9/porting_replicant_to_android9.tex b/NLnet/porting_replicant_to_android9/porting_replicant_to_android9.tex
index afd5de7..6df6466 100644
--- a/NLnet/porting_replicant_to_android9/porting_replicant_to_android9.tex
+++ b/NLnet/porting_replicant_to_android9/porting_replicant_to_android9.tex
@@ -7,6 +7,8 @@
\usepackage[utf8]{inputenc}
\usepackage{listings}
\usepackage{longtable}
+\usepackage{multirow}
+
\usepackage{graphicx}
\author{Denis 'GNUtoo' Carikli \and NLnet}
@@ -306,7 +308,7 @@ agree to the following:
\hline
\hline
- \multicolumn{3}{|c|}{Total: approximately \worktotal}\\
+ \subsectiontotal{3}
\hline
\end{longtable}
@@ -315,17 +317,21 @@ agree to the following:
Easy Linux upstreaming work
}
-\begin{longtable}[!t]{|p{1cm}|p{6cm}|p{6cm}|}
+\begin{longtable}[!t]{|p{5cm}|p{6cm}|p{4cm}|}
\hline
Cost estimation & Task & Comments \\
\hline
\hline
- \workhours{35} &
+ \workhours{35}
+ 1 Galaxy Note II (N7100): \fixedcost{80}
+ 1 Galaxy Note II (N7105): \fixedcost{79} & %% Aproximated from 78.72E
\begin{itemize}
\item{Make the the touch keys Linux driver work and upstream it in Linux.}
- \end{itemize} & \\
+ \end{itemize} &
+ The Galaxy Note are affected by the patch as well so they are required to test it.
+ \\
\hline
@@ -337,12 +343,11 @@ agree to the following:
\hline
\hline
- \multicolumn{3}{|c|}{Total: approximately \worktotal}\\
+ \subsectiontotal{3}
\hline
\end{longtable}
-
\subsection{
Modem work
}
@@ -414,7 +419,7 @@ agree to the following:
\hline
\hline
- \multicolumn{3}{|c|}{Total: approximately \worktotal}\\
+ \subsectiontotal{3}
\hline
\end{longtable}
@@ -481,7 +486,7 @@ agree to the following:
\hline
- \multicolumn{3}{|c|}{Total: approximately \worktotal}\\
+ \subsectiontotal{3}
\hline
\end{longtable}
@@ -580,9 +585,8 @@ agree to the following:
\hline
\hline
- \multicolumn{3}{|c|}{Total: approximately \worktotal}\\
+ \subsectiontotal{3}
\hline
-
\end{longtable}