[freeside-commits] freeside/httemplate/search phone_avail.html, 1.1.8.5, 1.1.8.6

Erik Levinson levinse at wavetail.420.am
Tue Dec 28 09:20:18 PST 2010


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

Modified Files:
      Tag: FREESIDE_2_1_BRANCH
	phone_avail.html 
Log Message:
UI enhancements to phone_avail report, RT10464

Index: phone_avail.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/phone_avail.html,v
retrieving revision 1.1.8.5
retrieving revision 1.1.8.6
diff -u -w -d -r1.1.8.5 -r1.1.8.6
--- phone_avail.html	28 Dec 2010 16:34:50 -0000	1.1.8.5
+++ phone_avail.html	28 Dec 2010 17:20:16 -0000	1.1.8.6
@@ -31,23 +31,33 @@
                     },
 		sub { shift->get('name') },
 		'availbatch',
-                'exportnum', #XXX
-                #sub { },
-                'svcnum', #XXX
+		sub {
+		    my $pa = shift;
+		    return '' unless $pa->part_export;
+		    $pa->part_export->exportname;
+		},
+		sub {
+		    my $pa = shift;
+		    return '' unless $pa->cust_svc;
+		    my($label,$value) = $pa->cust_svc->label; 
+		    $label . ": " . $value;
+		},
                 \&FS::UI::Web::cust_fields,
+		'',
               ],
-              'align'         => 'rllllll'.FS::UI::Web::cust_aligns(),
+              'align'         => 'rllllllc'.FS::UI::Web::cust_aligns(),
               'links'         => [
                 '',
                 '',
 		'',
 		'',
                 '',
-                '', #XXX #$export_link
-                '', #XXX #$svc_link
+                '', #XXX #$export_link - to what exactly?
+                $svc_link,
                 ( map { $_ ne 'Cust. Status' ? $link_cust : '' }
                       FS::UI::Web::cust_header()
                 ),
+		'',
               ],
               'color' => [ 
                            '',
@@ -58,6 +68,7 @@
                            '',
                            '',
                            FS::UI::Web::cust_colors(),
+			   '',
                          ],
               'style' => [ 
                            '',
@@ -68,6 +79,7 @@
                            '',
                            '',
                            FS::UI::Web::cust_styles(),
+			   '',
                          ],
       )
 %>
@@ -130,4 +142,13 @@
   '';
 };
 
+my $svc_link = sub {
+    my $phone_avail = shift;
+    my $cust_svc = $phone_avail->cust_svc;
+    if ( $cust_svc ) {
+	return [ "${p}view/svc_phone.cgi?", 'svcnum'];
+    }
+    '';
+};
+
 </%init>



More information about the freeside-commits mailing list