From 5250c44bd7f282c7d782bf0e8349af12376929df Mon Sep 17 00:00:00 2001 From: jeff Date: Wed, 22 Sep 2010 19:16:20 +0000 Subject: prepayment discounts rt#5318 --- httemplate/browse/part_pkg.cgi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 42eb5dfcb..3c3016ba2 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -195,6 +195,9 @@ push @fields, sub { my $part_pkg = shift; (my $plan = $plan_labels{$part_pkg->plan} ) =~ s/ / /g; my $is_recur = ( $part_pkg->freq ne '0' ); + my @discounts = sort { $a->months <=> $b->months } + map { $_->discount } + $part_pkg->part_pkg_discount; [ [ @@ -238,6 +241,28 @@ push @fields, sub { } $part_pkg->bill_part_pkg_link ), + ( scalar(@discounts) + ? [ + { data => 'Discounts', + align=>'center', #? + colspan=>2, + } + ] + : () + ), + ( scalar(@discounts) + ? map { + [ + { data => $_->months. ':', + align => 'right', + }, + { data => $_->amount ? '$'. $_->amount : $_->percent. '%' + } + ] + } + @discounts + : () + ), ]; # $plan_labels{$part_pkg->plan}.'
'. -- cgit v1.2.1 From 79f809fedf5fc96da31039122c8326d31b6662b6 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 22 Oct 2010 08:54:32 +0000 Subject: fix package def report totals to break down not yet billed vs. active package counts, RT#10317 --- httemplate/browse/part_pkg.cgi | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 3c3016ba2..3881606d9 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -96,6 +96,13 @@ $select = " *, ( $count_cust_pkg + AND ( setup IS NULL OR setup = 0 ) + AND ( cancel IS NULL OR cancel = 0 ) + AND ( susp IS NULL OR susp = 0 ) + ) AS num_not_yet_billed, + + ( $count_cust_pkg + AND setup IS NOT NULL AND setup != 0 AND ( cancel IS NULL OR cancel = 0 ) AND ( susp IS NULL OR susp = 0 ) ) AS num_active, @@ -309,6 +316,7 @@ if ( $acl_edit_global ) { #if ( $cgi->param('active') ) { push @header, 'Customer
packages'; my %col = ( + 'not yet billed' => '009999', #teal? cyan? 'active' => '00CC00', 'suspended' => 'FF9900', 'cancelled' => 'FF0000', @@ -326,6 +334,7 @@ if ( $acl_edit_global ) { #$label = 'one-time charge', $label = 'charge', } + $label= 'not yet billed' if $magic eq 'not_yet_billed'; [ { @@ -350,7 +359,7 @@ if ( $acl_edit_global ) { ), }, ], - } (qw( active suspended cancelled )) + } (qw( not_yet_billed active suspended cancelled )) ]; }; $align .= 'r'; #} -- cgit v1.2.1 From 942f129f37980d8a2a87be8c3297663ad38298ba Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 3 Nov 2010 00:33:24 +0000 Subject: bulk change package type, RT#9947 --- httemplate/browse/part_pkg.cgi | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'httemplate/browse/part_pkg.cgi') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 3881606d9..26e01700a 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -32,6 +32,7 @@ my $acl_edit = $curuser->access_right($edit); my $acl_edit_global = $curuser->access_right($edit_global); my $acl_config = $curuser->access_right('Configuration'); #to edit services #and agent types + #and bulk change die "access denied" unless $acl_edit || $acl_edit_global; @@ -325,8 +326,8 @@ if ( $acl_edit_global ) { ); my $cust_pkg_link = $p. 'search/cust_pkg.cgi?pkgpart='; push @fields, sub { my $part_pkg = shift; - [ - map { + [ + map( { my $magic = $_; my $label = $_; if ( $magic eq 'active' && $part_pkg->freq == 0 ) { @@ -360,7 +361,23 @@ if ( $acl_edit_global ) { }, ], } (qw( not_yet_billed active suspended cancelled )) - ]; }; + ), + ($acl_config ? + [ {}, + { 'data' => '[ '. + include('/elements/popup_link.html', + 'label' => 'change', + 'action' => "${p}edit/bulk-cust_pkg.html?". + 'pkgpart='.$part_pkg->pkgpart, + 'actionlabel' => 'Change Packages', + 'width' => 569, + 'height' => 210, + ).' ]', + 'align' => 'left', + } + ] : () ), + ]; + }; $align .= 'r'; #} -- cgit v1.2.1