X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpackages%2Fpackage.html;h=ab7bad2bfcb770f7936373a78c4a45e57cbe6bd2;hb=c931539d1b09590c37576efff8128ae9095c758a;hp=1c8db15f439ddf0ac4aa74952390fdf7428012f1;hpb=eedfe58ba50912dbfb490aa47930bbc0ab9e3ac9;p=freeside.git
diff --git a/httemplate/view/cust_main/packages/package.html b/httemplate/view/cust_main/packages/package.html
index 1c8db15f4..ab7bad2bf 100644
--- a/httemplate/view/cust_main/packages/package.html
+++ b/httemplate/view/cust_main/packages/package.html
@@ -10,9 +10,10 @@
%>
<% $curuser->option('show_pkgnum') ? $cust_pkg->pkgnum.': ' : '' %><% $part_pkg->pkg |h %>
- -
- <% $part_pkg->custom_comment |h %>
+ ><% $opt{show_pkgnum} ? $cust_pkg->pkgnum.': ' : '' %><% $part_pkg->pkg |h %>
+% my $custom_comment = $part_pkg->custom_comment('cust_pkg'=>$cust_pkg);
+ <% $custom_comment ? ' - ' : '' %>
+ <% $custom_comment |h %>
@@ -21,17 +22,22 @@
-% unless ( $cust_pkg->get('cancel') || $opt{no_links} ) {
+% if ( $part_pkg->freq eq '0' and !$opt{no_links} ) {
+% # One-time charge. Nothing you can do with this, unless:
+% if ( $curuser->access_right('Modify one-time charge') ) {
+ ( <%onetime_change_link($cust_pkg)%> )
+
+% }
+%
+% } elsif ( !$cust_pkg->get('cancel') and !$opt{no_links} ) {
%
% if ( $change_from ) {
% # This is the target package for a future change.
% # Nothing you can do with it besides modify/cancel the
% # future change, and that's on the current package.
-% } elsif ( $supplemental or $part_pkg->freq eq '0' ) {
+% } elsif ( $supplemental ) {
% # Supplemental packages can't be changed independently.
-% # One-time charges don't need to be changed.
-% # For both of those, we only show "Add comments",
-% # and "Add invoice details".
+% # Show only "Add comments" and "Add invoice details".
% } else {
% # the usual case: links to change package definition,
% # discount, and customization
@@ -59,10 +65,10 @@
<% $br ? ' ' : '' %>
% }
-% if ( $cust_pkg->num_cust_event
-% && ( $curuser->access_right('Billing event reports')
+% if ( ( $curuser->access_right('Billing event reports')
% || $curuser->access_right('View customer billing events')
% )
+% && $cust_pkg->num_cust_event
% ) {
( <%pkg_event_link($cust_pkg)%> )
% }
@@ -320,6 +326,19 @@ sub pkg_change_link {
);
}
+sub onetime_change_link {
+ my $cust_pkg = shift;
+ my $pkgnum = $cust_pkg->pkgnum;
+ include( '/elements/popup_link-cust_pkg.html',
+ 'action' => $p. "edit/quick-charge.html?change_pkgnum=$pkgnum",
+ 'label' => emt('Modify one-time charge'),
+ 'actionlabel' => emt('Modify'),
+ 'cust_pkg' => $cust_pkg,
+ 'width' => 690,
+ 'height' => 380,
+ );
+}
+
sub pkg_change_location_link {
my $cust_pkg = shift;
my $pkgpart = $cust_pkg->pkgpart;
|