X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpackages%2Fpackage.html;h=ce175a27ec8104daa69006327eadee7af21d6239;hp=1b397d851246058ef3c2a3420e839c2e2198089f;hb=b5d165e21a606efaa47f4ef4b4a49d96df00361d;hpb=e61046ea9f0efc021d568bbda0f7759ad51881d3 diff --git a/httemplate/view/cust_main/packages/package.html b/httemplate/view/cust_main/packages/package.html index 1b397d851..ce175a27e 100644 --- a/httemplate/view/cust_main/packages/package.html +++ b/httemplate/view/cust_main/packages/package.html @@ -7,6 +7,10 @@ ? &{ $opt{before_pkg_callback} }( $cust_pkg ) : '' %> + +% ### +% # Package +% ### <% $opt{show_pkgnum} ? $cust_pkg->pkgnum.': ' : '' %><% $part_pkg->pkg |h %> @@ -42,79 +46,18 @@ - -
+ +% my $plink = "pkgnum=$pkgnum"; +% my $reg_recur_cond = sub { $part_pkg->freq ne '0' +% && ! $change_from +% && ! $supplemental +% && ! $cust_pkg->get('cancel') +% }; + + <& /elements/dropdown-menu.html, + id => 'cust_pkg'. $cust_pkg->pkgnum. '_menu', + bgcolor => $opt{row} % 2 ? '#ffffff' : '#eeeeee', + menu => [ + [ + + #TODO: order/group these better + + { label => 'Package actions', + content => 'Package actions ', + }, + + { label => 'Modify one-time charge', + acl => 'Modify one-time charge', + condition => sub { $part_pkg->freq eq '0' }, + url => "edit/quick-charge.html?change_$plink", + }, + + { label => 'Change package', + acl => 'Change customer package', + condition => $reg_recur_cond, + popup => "misc/change_pkg.cgi?$plink". + ';locationnum='. $cust_pkg->locationnum. + actionlabel => emt('Change package'), + #width => 768, + width => 960, + height => 538, + }, + + { label => 'Discount package', + condition => sub { $part_pkg->freq ne '0' + && ! $change_from + && ! $supplemental + && ! $cust_pkg->get('cancel') + && $can_discount_pkg + }, + popup => "edit/cust_pkg_discount.html?$plink". + actionlabel => emt('Discount package'), + width => 616, + }, + + { label => 'Customize package', + acl => 'Customize customer package', + condition => $reg_recur_cond, + url => "edit/part_pkg.cgi?$plink". + ';clone='. $part_pkg->pkgpart, + }, + + { label => 'View package events', + acl => [ 'Billing event reports', + 'View customer billing events', ], + condition => sub { $cust_pkg->exists_cust_event }, + url => "search/cust_event.html?$plink", + }, + + { label => 'Change quantity', + acl => 'Change customer package', + condition => sub { $part_pkg->freq ne '0' + && ! $change_from + && ! $supplemental + && ! $cust_pkg->get('cancel') + && $opt{'invoice-unitprice'} + }, + popup => "edit/cust_pkg_quantity.html?$plink", + + actionlabel => emt('Change quantity'), + width => 390, + height => 220, + }, + + { label => 'Change sales person', + acl => 'Change customer package', + condition => sub { ! $change_from + && ! $supplemental + && ! $cust_pkg->get('cancel') + }, + popup => "edit/cust_pkg_salesnum.html?$plink", + actionlabel => emt('Change sales persion'), + width => 390, + height => 220, + }, + + { label => (@invoice_detail ? 'Edit' : 'Add'). + ' invoice details', + acl => 'Edit customer package invoice details', + condition => sub { ! $cust_pkg->get('cancel') }, + popup => "edit/cust_pkg_detail.html?$plink". + ';detailtype=I', + actionlabel => emt( (@invoice_detail ? 'Edit' : 'Add'). + ' invoice details' + ), + width => 768, + }, + + { label => (@comments ? 'Edit' : 'Add'). ' comments', + acl => 'Edit customer package comments', + popup => "edit/cust_pkg_detail.html?$plink". + ';detailtype=C', + actionlabel => emt( (@comments ? 'Edit' : 'Add'). + ' comments' + ), + width => 768, + }, + + { label => '-', + content => '-', + }, + + + ], + ], + &> + + | +