[freeside-commits] freeside/httemplate/search report_svc_hardware.html, 1.1, 1.2 svc_hardware.cgi, 1.1, 1.2
Mark Wells
mark at wavetail.420.am
Fri Apr 29 01:58:21 PDT 2011
- Previous message: [freeside-commits] freeside/httemplate/edit hardware_status.html, 1.1, 1.2 svc_dish.cgi, 1.1, 1.2 svc_hardware.cgi, 1.1, 1.2
- Next message: [freeside-commits] freeside/httemplate/view svc_dish.cgi, 1.1, 1.2 svc_hardware.cgi, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail.420.am:/tmp/cvs-serv18870/httemplate/search
Modified Files:
report_svc_hardware.html svc_hardware.cgi
Log Message:
svc_dish and svc_hardware fixes, #11454
Index: svc_hardware.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/svc_hardware.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- svc_hardware.cgi 1 Apr 2011 02:52:19 -0000 1.1
+++ svc_hardware.cgi 29 Apr 2011 08:58:19 -0000 1.2
@@ -10,6 +10,7 @@
'Serial #',
'Hardware addr.',
'IP addr.',
+ 'Smartcard',
FS::UI::Web::cust_header(),
],
'fields' => [ 'svcnum',
@@ -18,16 +19,19 @@
'serial',
'hw_addr',
'ip_addr',
+ 'smartcard',
\&FS::UI::Web::cust_fields,
],
- 'links' => [ ($link_svc) x 6,
+ 'links' => [ ($link_svc) x 7,
( map { $_ ne 'Cust. Status' ?
$link_cust : '' }
FS::UI::Web::cust_header() )
],
- 'align' => 'rllll' . FS::UI::Web::cust_aligns(),
- 'color' => [ ('') x 4, FS::UI::Web::cust_colors() ],
- 'style' => [ ('') x 4, FS::UI::Web::cust_styles() ],
+ 'align' => 'rllllll' . FS::UI::Web::cust_aligns(),
+ 'color' => [ ('') x 7,
+ FS::UI::Web::cust_colors() ],
+ 'style' => [ $svc_cancel_style, ('') x 6,
+ FS::UI::Web::cust_styles() ],
)
%>
<%init>
@@ -67,6 +71,10 @@
push @extra_sql, "ip_addr = '".lc($ip->addr)."'";
}
+if ( lc($cgi->param('smartcard')) =~ /^(\w+)$/ ) {
+ push @extra_sql, "LOWER(smartcard) LIKE '%$1%'";
+}
+
if ( $cgi->param('statusnum') =~ /^(\d+)$/ ) {
push @extra_sql, "statusnum = $1";
}
@@ -78,6 +86,10 @@
}
}
+if ( $cgi->param('svcpart') =~ /^(\d+)$/ ) {
+ push @extra_sql, "cust_svc.svcpart = $1";
+}
+
my ($orderby) = $cgi->param('orderby') =~ /^(\w+( ASC| DESC)?)$/i;
$orderby ||= 'svcnum';
@@ -91,6 +103,7 @@
'part_svc.svc',
'cust_main.custnum',
'hardware_type.model',
+ 'cust_pkg.cancel',
FS::UI::Web::cust_sql_fields(),
),
'hashref' => {},
@@ -103,4 +116,9 @@
my $link_svc = [ $p.'view/svc_hardware.cgi?', 'svcnum' ];
my $link_cust = [ $p.'view/cust_main.cgi?', 'custnum' ];
+my $svc_cancel_style = sub {
+ my $svc = shift;
+ ( $svc->getfield('cancel') == 0 ) ? '' : 's';
+};
+
</%init>
Index: report_svc_hardware.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_svc_hardware.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- report_svc_hardware.html 1 Apr 2011 02:52:18 -0000 1.1
+++ report_svc_hardware.html 29 Apr 2011 08:58:19 -0000 1.2
@@ -20,7 +20,7 @@
<% include('/elements/tr-input-text.html',
'field' => 'serial',
- 'label' => 'Serial #',
+ 'label' => 'Serial number',
) %>
<% include('/elements/tr-input-text.html',
'field' => 'hw_addr',
@@ -30,12 +30,20 @@
'field' => 'ip_addr',
'label' => 'IP address',
) %>
+ <% include('/elements/tr-input-text.html',
+ 'field' => 'smartcard',
+ 'label' => 'Smartcard #',
+ ) %>
<% include('/elements/tr-select-table.html',
'field' => 'statusnum',
'label' => 'Service status',
'table' => 'hardware_status',
'name_col' => 'label',
'empty_label' => 'any',
+ 'hashref' => {},
+ 'extra_sql' => ' WHERE hardware_status.disabled IS NULL
+OR (SELECT COUNT(*) FROM svc_hardware
+ WHERE svc_hardware.statusnum = hardware_status.statusnum) > 0',
) %>
</TABLE>
- Previous message: [freeside-commits] freeside/httemplate/edit hardware_status.html, 1.1, 1.2 svc_dish.cgi, 1.1, 1.2 svc_hardware.cgi, 1.1, 1.2
- Next message: [freeside-commits] freeside/httemplate/view svc_dish.cgi, 1.1, 1.2 svc_hardware.cgi, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list