This is what I have so far:
`r Name`
\begin{tabular}{cccccc}
\textbf{ID} & \textbf{Code} & \textbf{Amount} \\
`r id` & `r code` & \$ `r amount`
\end{tabular}
\begin{flushright} \textbf{SUBTOTAL: \$ `r subtotal`} \\
\textbf{FEE: \$ `r fee`} \\
\textbf{TOTAL: \$ `r total`} \end{flushright}
The result should look something like this:
My result only return one row but the totals are the same.