fixup damage from quantity addition
[freeside.git] / conf / invoice_latex
index 2acd710..693d66e 100644 (file)
 \newcommand{\FSextdesc}[1]{\r
   \multicolumn{1}{l}{\rule{0pt}{1.0ex}} &\r
 %%  \multicolumn{2}{l}{\small{~-~#1}}\\\r
-  ~~~#1\\\r
+#1\\\r
 }\r
 % ...and total line items.\r
 \newcommand{\FStotaldesc}[2]{\r
     $OUT .= "\\addressline{$ship_city, $ship_state~~$ship_zip}";\r
     $OUT .= "\\addressline{$ship_country}";\r
     $OUT .= '~\\\\';\r
+    $OUT .= "\\textbf{ID:}~~$agent_custid\\\\" if $agent_custid;\r
+    $OUT .= "\\textbf{Fax:}~~$ship_fax\\\\" if $ship_fax;\r
+    $OUT .= '~\\\\' if ($ship_fax or $agent_custid);\r
   }else{\r
     $OUT .= '';\r
   }\r
@@ -244,8 +247,8 @@ Terms: [@-- $terms --@]\\
     $OUT .= '\makebox[2.0cm][l]{}& ';\r
     $OUT .= '\makebox[2.0cm][l]{}& ';\r
     $OUT .= '\makebox[2.0cm][l]{}& ';\r
-    $OUT .= '\makebox[2.0cm][l]{\textbf{'. ($unitprices ? '~~Unit Price' : ''). '}&';\r
-    $OUT .= '\makebox[2.0cm]{\textbf{'. ($unitprices ? '~Quantity' : ''). '}&';\r
+    $OUT .= '\makebox[2.0cm][l]{\textbf{'. ($unitprices ? '~~Unit Price' : ''). '}}&';\r
+    $OUT .= '\makebox[2.0cm]{\textbf{'. ($unitprices ? '~Quantity' : ''). '}}&';\r
     $OUT .= '\makebox[2.0cm][r]{\textbf{Amount}} \\\\';\r
     $OUT .= '\hline';\r
     $OUT .= '\endfirsthead';\r
@@ -257,8 +260,8 @@ Terms: [@-- $terms --@]\\
     $OUT .= '\makebox[2.0cm][l]{}& ';\r
     $OUT .= '\makebox[2.0cm][l]{}& ';\r
     $OUT .= '\makebox[2.0cm][l]{}& ';\r
-    $OUT .= '\makebox[2.0cm][l]{\textbf{'. ($unitprices ? '~~Unit Price' : ''). '}&';\r
-    $OUT .= '\makebox[2.0cm]{\textbf{'. ($unitprices ? '~Quantity' : ''). '}&';\r
+    $OUT .= '\makebox[2.0cm][l]{\textbf{'. ($unitprices ? '~~Unit Price' : ''). '}}&';\r
+    $OUT .= '\makebox[2.0cm]{\textbf{'. ($unitprices ? '~Quantity' : ''). '}}&';\r
     $OUT .= '\makebox[2.0cm][r]{\textbf{Amount}} \\\\';\r
     $OUT .= '\hline';\r
     $OUT .= '\endhead';\r
@@ -303,7 +306,9 @@ Terms: [@-- $terms --@]\\
         if ( $ext_desc !~ /[^\\]&/ ) {\r
           $ext_desc = substr($ext_desc, 0, 80) . '...'\r
             if (length($ext_desc) > 80);\r
-          $ext_desc = '\small{'. $ext_desc. '}';\r
+          $ext_desc = '\multicolumn{6}{l}{\small{~~~'. $ext_desc. '}}';\r
+        }else{\r
+          $ext_desc = "~~~$ext_desc";\r
         }\r
         $OUT .= '\FSextdesc{' . $ext_desc . '}' . "${rowbreak}\n";\r
       }\r