[freeside-commits] freeside/httemplate/browse pkg_category.html, 1.4, 1.5 usage_class.html, 1.1, 1.2

Jeff Finucane,420,, jeff at wavetail.420.am
Fri Nov 20 09:33:42 PST 2009


Update of /home/cvs/cvsroot/freeside/httemplate/browse
In directory wavetail.420.am:/tmp/cvs-serv19789/httemplate/browse

Modified Files:
	pkg_category.html usage_class.html 
Log Message:
invoice formatting: add sections for usage, add sections per svc_phone, add folding like line items into one #6592

Index: usage_class.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/browse/usage_class.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- usage_class.html	23 Aug 2008 21:59:44 -0000	1.1
+++ usage_class.html	20 Nov 2009 17:33:39 -0000	1.2
@@ -9,9 +9,21 @@
                                     'extra_sql' => 'ORDER BY classnum',
                                   },
                  'count_query' => 'SELECT COUNT(*) FROM usage_class',
-                 'header'      => [ '#', 'Class' ],
-                 'fields'      => [ 'classnum', 'classname' ],
-                 'links'       => [ $link, $link ],
+                 'header'      => [ '#',
+                                    'Class',
+                                    'Weight',
+                                    ( $useformat ? ('Format') : () ),
+                                  ],
+                 'fields'      => [ 'classnum',
+                                    'classname',
+                                    'weight',
+                                    ( $useformat ? (sub { $labels->{shift->format} } ) : () ),
+                                  ],
+                 'links'       => [ $link,
+                                    $link,
+                                    $link,
+                                    ( $useformat ? ( $link ) : () ),
+                                  ],
              )
 %>
 <%init>
@@ -19,6 +31,11 @@
 die "access denied"
   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
 
+my $conf = new FS::Conf;
+my $useformat = $conf->exists('usage_class_as_a_section');
+my $labels = { &FS::usage_class::summary_formats_labelhash() };
+
+
 my $html_init = 
   'Usage classes define groups of usage for taxation purposes.<BR><BR>'.
   qq!<A HREF="${p}edit/usage_class.html"><I>Add a usage class</I></A><BR><BR>!;

Index: pkg_category.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/browse/pkg_category.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- pkg_category.html	29 Oct 2009 18:38:08 -0000	1.4
+++ pkg_category.html	20 Nov 2009 17:33:39 -0000	1.5
@@ -3,15 +3,15 @@
                  'html_init'   => $html_init,
                  'name'        => 'package categories',
                  'disableable' => 1,
-                 'disabled_statuspos' => 2,
+                 'disabled_statuspos' => 3,
                  'query'       => { 'table'     => 'pkg_category',
                                     'hashref'   => {},
                                     'extra_sql' => 'ORDER BY categorynum',
                                   },
                  'count_query' => $count_query,
-                 'header'      => [ '#', 'Category', 'Weight' ],
-                 'fields'      => [ 'categorynum', 'categoryname', 'weight' ],
-                 'links'       => [ $link, $link, $link ],
+                 'header'      => [ '#', 'Category', 'Weight', 'Condense' ],
+                 'fields'      => [ 'categorynum', 'categoryname', 'weight', 'condense' ],
+                 'links'       => [ $link, $link, $link, $link ],
              )
 %>
 



More information about the freeside-commits mailing list