invoice sections by location, #23820
[freeside.git] / conf / invoice_latex
index b169b61..70b36b1 100644 (file)
         if $coupon;\r
       $OUT .= '\begin{longtable}{cllllllr}';\r
       $OUT .= '\caption*{ ';\r
-      $OUT .= ($section->{'description'}) ? $section->{'description'}: emt('Charges');\r
+      if ($section->{'location'}) {\r
+        $OUT .= $section->{'location'}{'address1'};\r
+        $OUT .= ', ' . $section->{'location'}{'address2'}\r
+          if length($section->{'location'}{'address2'});\r
+        $OUT .= ', ' .\r
+                $section->{'location'}{'city'} . ', ' .\r
+                $section->{'location'}{'state'} . '~' .\r
+                $section->{'location'}{'zip'};\r
+      } elsif ( $section->{'description'} ) {\r
+        $OUT .= ($section->{'description'});\r
+      } else {\r
+        $OUT .= emt('Charges');\r
+      }\r
       $OUT .= '}\\\\';\r
       if ($section->{header_generator}) {\r
         $OUT .= &{$section->{header_generator}}();\r