X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpackages%2Fpackage.html;h=c65263df35edaa3ec97c8ff9ca3bc658e4e20bd4;hb=24389dff37b486ed4f0281bd50a3ff1ee77ae74d;hp=078402b7aae492814d91147846f842dbdf76aaca;hpb=43b1f73646063b4614ce8701f7e4755920c7eff2;p=freeside.git diff --git a/httemplate/view/cust_main/packages/package.html b/httemplate/view/cust_main/packages/package.html index 078402b7a..c65263df3 100644 --- a/httemplate/view/cust_main/packages/package.html +++ b/httemplate/view/cust_main/packages/package.html @@ -51,8 +51,15 @@ % # One-time charge. Nothing you can do with this, unless: % if ( $curuser->access_right('Modify one-time charge') ) { ( <%onetime_change_link($cust_pkg)%> ) -
% } +% # also, you can discount it +% if ( $curuser->access_right('Discount customer package') +% && ! scalar($cust_pkg->cust_pkg_discount_active) +% && ! scalar($cust_pkg->part_pkg->part_pkg_discount) +% ) { + ( <%pkg_discount_link($cust_pkg)%> ) +% } +
% % } elsif ( !$cust_pkg->get('cancel') and !$opt{no_links} ) { % @@ -65,6 +72,7 @@ % if ( $curuser->access_right('Edit customer package dates') ) { ( <%pkg_dates_link($cust_pkg)%> ) % } +% % } else { % # the usual case: links to change package definition, % # discount, and customization @@ -74,7 +82,7 @@ ( <%pkg_change_link($cust_pkg)%> ) % } % -% if ( $curuser->access_right('Edit customer package dates') ) { +% if ( $curuser->access_right('Edit customer package dates') or $curuser->access_right('Change package contract end date') ) { % $br=1; ( <%pkg_dates_link($cust_pkg)%> ) % } @@ -82,7 +90,9 @@ % if ( $curuser->access_right('Discount customer package') % && $part_pkg->can_discount % && ! scalar( @{ $cust_pkg->{_cust_pkg_discount_active} } ) -% && ! scalar($cust_pkg->part_pkg->part_pkg_discount) +% && ( ! $opt{'term_discounts'} +% || ! scalar($cust_pkg->part_pkg->part_pkg_discount) +% ) % ) % { % $br=1; @@ -100,7 +110,7 @@ % if ( ( $curuser->access_right('Billing event reports') % || $curuser->access_right('View customer billing events') % ) -% && $cust_pkg->num_cust_event +% && $cust_pkg->exists_cust_event % ) { ( <%pkg_event_link($cust_pkg)%> ) % } @@ -273,7 +283,7 @@ % if ( @cust_pkg_usage ) { - + % foreach my $usage (@cust_pkg_usage) { % my $part = $usage->part_pkg_usage; % my $ratio = 255 * ($usage->minutes / $part->minutes); @@ -283,7 +293,7 @@ % $trstyle = ' CLASS="shared"' if $part->shared; > - + % if ( $part->shared ) { @@ -367,7 +377,7 @@ sub onetime_change_link { 'actionlabel' => emt('Modify'), 'cust_pkg' => $cust_pkg, 'width' => 690, - 'height' => 380, + 'height' => 440, ); }
<% mt('Included usage') %>
<% emt('Included usage') %>
<% $part->description %>: ALIGN="right"><% $usage->minutes %> ALIGN="right"><% sprintf('%.1f', $usage->minutes) %> > / ><% $part->minutes %>