summaryrefslogtreecommitdiff
path: root/httemplate/browse
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/browse')
-rw-r--r--httemplate/browse/addr_block.cgi9
-rw-r--r--httemplate/browse/discount.html30
-rwxr-xr-xhttemplate/browse/part_pkg.cgi20
-rwxr-xr-xhttemplate/browse/part_svc.cgi1
4 files changed, 43 insertions, 17 deletions
diff --git a/httemplate/browse/addr_block.cgi b/httemplate/browse/addr_block.cgi
index ba40bfd43..9e7ef2af2 100644
--- a/httemplate/browse/addr_block.cgi
+++ b/httemplate/browse/addr_block.cgi
@@ -17,12 +17,13 @@
'',
],
'fields' => [ 'NetAddr',
- sub { my $block = shift;
- my $router = $block->router;
+ sub { my $b = shift;
+ my $router = $b->router;
my $result = '';
if ($router) {
- $result .= $router->routername. ' (';
- $result .= scalar($block->svc_broadband). ' services)';
+ $result .= $router->routername. ' ('.
+ scalar($b->svc_broadband). ' broadband, '.
+ scalar($b->svc_acct). ' account services)';
}
$result;
},
diff --git a/httemplate/browse/discount.html b/httemplate/browse/discount.html
index 9b2298ae4..deb98c3c7 100644
--- a/httemplate/browse/discount.html
+++ b/httemplate/browse/discount.html
@@ -1,22 +1,18 @@
<% include( 'elements/browse.html',
'title' => 'Discounts',
'name' => 'discounts',
- 'menubar' => [ 'Add a new discount' =>
- $p.'edit/discount.html',
- ],
- 'query' => { 'table' => 'discount', },
+ 'menubar' => \@menubar,
+ 'query' => \%query,
+ 'order_by_sql' => { description => 'discountnum' },
'count_query' => 'SELECT COUNT(*) FROM discount',
'disableable' => 1,
'disabled_statuspos' => 1,
- 'header' => [ 'Name', 'Comment', 'Class', 'Discount', ],
+ 'header' => [ 'Name', 'Class', 'Discount', ],
'fields' => [ 'name',
- 'comment',
'classname',
'description',
],
- 'links' => [ $link,
- $link,
- ],
+ 'links' => \@links
)
%>
<%init>
@@ -24,6 +20,20 @@
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
-my $link = [ "${p}edit/discount.html?", 'discountnum' ];
+my @links = (
+ [ "${p}edit/discount.html?", 'discountnum' ],
+ [ "${p}edit/discount_class.html?", 'classnum' ],
+);
+
+my %query = (
+ select => 'discount.*, discount_class.*',
+ table => 'discount',
+ addl_from => 'LEFT JOIN discount_class USING(classnum)',
+);
+
+my @menubar = (
+ 'Add a new discount' => $p.'edit/discount.html',
+ 'Discount classes' => $p.'browse/discount_class.html',
+);
</%init>
diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi
index 8c51b35f4..f25c00ef2 100755
--- a/httemplate/browse/part_pkg.cgi
+++ b/httemplate/browse/part_pkg.cgi
@@ -562,7 +562,7 @@ if ( $acl_edit_global ) {
'action' => "${p}edit/bulk-cust_pkg.html?".
'pkgpart='.$part_pkg->pkgpart,
'actionlabel' => 'Change Packages',
- 'width' => 569,
+ 'width' => 960,
'height' => 210,
).' ]</FONT>',
'align' => 'left',
@@ -796,8 +796,22 @@ if ( $acl_edit_bulk ) {
$align .= 'c';
$html_form = qq!<FORM ACTION="${p}edit/bulk-part_pkg.html" METHOD="POST">!;
$html_foot = include('/search/elements/checkbox-foot.html',
- submit => 'edit report classes', # for now it's only report classes
- ) . '</FORM>';
+ actions => [
+ { submit => 'edit report classes', },
+ { label => 'change customer packages',
+ onclick=> include('/elements/popup_link_onclick.html',
+ 'label' => 'change',
+ 'js_action' => qq{
+ '${p}edit/bulk-cust_pkg.html?' + \$('input[name=pkgpart]').serialize()
+ },
+ 'actionlabel' => 'Change customer packages',
+ 'width' => 960,
+ 'height' => 420,
+ )
+ },
+ ],
+ ).
+ '</FORM>';
}
my @menubar;
diff --git a/httemplate/browse/part_svc.cgi b/httemplate/browse/part_svc.cgi
index b9474636d..222433db3 100755
--- a/httemplate/browse/part_svc.cgi
+++ b/httemplate/browse/part_svc.cgi
@@ -251,6 +251,7 @@ my %flag = (
'A' => 'Automatically filled in from inventory',
'H' => 'Selected from hardware class',
'X' => 'Excluded',
+ 'P' => 'From package 477 information',
);
my %search;