alignment of unit price column, #18959
authorMark Wells <mark@freeside.biz>
Wed, 27 Mar 2013 22:45:12 +0000 (15:45 -0700)
committerMark Wells <mark@freeside.biz>
Wed, 27 Mar 2013 22:45:12 +0000 (15:45 -0700)
conf/invoice_html
conf/invoice_latex

index 567385b..cd34827 100644 (file)
             $OUT .=  '<th align="center">' . emt('Ref') . '</th>'.
                      '<th align="left">' . emt('Description') . '</th>'.
                      ( $unitprices 
-                       ? '<th align="left">' . emt('Unit Price') . '</th>'.
-                         '<th align="left">' . emt('Quantity') . '</th>'
+                       ? '<th align="right">' . emt('Unit Price') . '</th>'.
+                         '<th align="right">' . emt('Quantity') . '</th>'
                         : '' ).
                      '<th align="right">' . emt('Amount') . '</th>';
           }
                        ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ). '</td>'.
                        '<td align="left">'. $line->{'description'}. '</td>'.
                        ( $unitprices 
-                           ? '<td align="left">'. $line->{'unit_amount'}. '</td>'.
-                             '<td align="left">'. $line->{'quantity'}. '</td>'
+                           ? '<td align="right">'. $line->{'unit_amount'}. '</td>'.
+                             '<td align="right">'. $line->{'quantity'}. '</td>'
                            : ''
                        ).
 
index d56a7fb..533e834 100644 (file)
 \newcommand{\FSdescriptionlength} { [@-- $unitprices ? '8.2cm' : '12.8cm' --@] }\r
 \newcommand{\FSdescriptioncolumncount} { [@-- $unitprices ? '4' : '6' --@] }\r
 \newcommand{\FSunitcolumns}{ [@-- \r
-  $unitprices \r
-  ? '\makebox[2.5cm][l]{\textbf{~~'.emt('Unit Price').'}}&\makebox[1.4cm]{\textbf{~'.emt('Quantity').'}}&' \r
+  $unitprices\r
+  ? '\makebox[2.5cm][r]{\textbf{~~' . emt('Unit Price') . '}} &' .\r
+    '\makebox[1.4cm]{\textbf{~' . emt('Quantity') . '}} & ' \r
   : '' --@] }\r
 \r
 \newcommand{\FShead}{\r
 \newcommand{\FSdesc}[5]{\r
   \multicolumn{1}{c}{\rule{0pt}{2.5ex}\textbf{#1}} &\r
   \multicolumn{[@-- $unitprices ? '4' : '6' --@]}{l}{\textbf{#2}} &\r
-[@-- $unitprices ? '  \multicolumn{1}{l}{\textbf{#3}} &'."\n".\r
+[@-- $unitprices ? '  \multicolumn{1}{r}{\textbf{\dollar #3}} &'."\n".\r
                    '  \multicolumn{1}{r}{\textbf{#4}} &'."\n"\r
                  : ''\r
 --@]\r