summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main/packages
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-10-12 18:44:52 -0700
committerMark Wells <mark@freeside.biz>2013-10-12 18:44:52 -0700
commit6422e165313ee8d67790007581821217240734fb (patch)
treed2892b8c1aa62f50ee21f1ef1169bc842872cf52 /httemplate/view/cust_main/packages
parentcd365522ec4e9f1b553bb1b5096c756c1fdb1d01 (diff)
allow changing package class of one-time charges post-billing, #25342
Diffstat (limited to 'httemplate/view/cust_main/packages')
-rw-r--r--httemplate/view/cust_main/packages/package.html28
1 files changed, 23 insertions, 5 deletions
diff --git a/httemplate/view/cust_main/packages/package.html b/httemplate/view/cust_main/packages/package.html
index 1c8db15f4..e97c141d2 100644
--- a/httemplate/view/cust_main/packages/package.html
+++ b/httemplate/view/cust_main/packages/package.html
@@ -21,17 +21,22 @@
<TD COLSPAN=2>
<FONT SIZE=-1>
-% 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') ) {
+ (&nbsp;<%onetime_change_link($cust_pkg)%>&nbsp;)
+ <BR>
+% }
+%
+% } 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
@@ -320,6 +325,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;