X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpackages%2Fpackage.html;h=ab19ff94a80ba14b5e852ad2f82c7808596fa215;hb=1939aff38dd65509468760264659091f4b6b3e78;hp=9fed5b581954144decb1735424b754de9ebf5192;hpb=82e41e360194691a3585bbcebde481c2b20b37c4;p=freeside.git diff --git a/httemplate/view/cust_main/packages/package.html b/httemplate/view/cust_main/packages/package.html index 9fed5b581..ab19ff94a 100644 --- a/httemplate/view/cust_main/packages/package.html +++ b/httemplate/view/cust_main/packages/package.html @@ -254,21 +254,20 @@ acl => 'Change customer package', condition => $reg_recur_cond, popup => "misc/change_pkg.cgi?$plink". - ';locationnum='. $cust_pkg->locationnum. + ';locationnum='. $cust_pkg->locationnum, actionlabel => emt('Change package'), #width => 768, width => 960, - height => 538, + height => 650, }, { label => 'Discount package', - condition => sub { $part_pkg->freq ne '0' - && ! $change_from + condition => sub { ! $change_from && ! $supplemental && ! $cust_pkg->get('cancel') && $can_discount_pkg }, - popup => "edit/cust_pkg_discount.html?$plink". + popup => "edit/cust_pkg_discount.html?$plink", actionlabel => emt('Discount package'), width => 616, }, @@ -280,6 +279,10 @@ ';clone='. $part_pkg->pkgpart, }, + { label => '-', + content => '-', + }, + { label => 'View package events', acl => [ 'Billing event reports', 'View customer billing events', ], @@ -287,6 +290,11 @@ url => "search/cust_event.html?$plink", }, + { label => '-', + condition => sub { $cust_pkg->exists_cust_event }, + content => '-', + }, + { label => 'Change quantity', acl => 'Change customer package', condition => sub { $part_pkg->freq ne '0' @@ -314,6 +322,10 @@ height => 220, }, + { label => '-', + content => '-', + }, + { label => (@invoice_detail ? 'Edit' : 'Add'). ' invoice details', acl => 'Edit customer package invoice details', @@ -337,7 +349,7 @@ }, { label => '-', - condition => sub { $part_pkg->freq ne '0' }, + #condition => sub { $part_pkg->freq ne '0' }, content => '-', }, @@ -458,12 +470,11 @@ { label => 'Start billing', acl => 'Unsuspend customer package', - condition => sub { $part_pkg->freq ne '0' - && ! $change_from - && ! $supplemental - && ! $cust_pkg->get('cancel') - && $cust_pkg->get('susp') - && $cust_pkg->order_date == $cust_pkg->get('susp') + condition => sub { ! $change_from + && ! $supplemental + && ! $cust_pkg->get('cancel') + && $cust_pkg->get('susp') + && $cust_pkg->order_date == $cust_pkg->get('susp') }, popup => "misc/unhold_pkg.html?$plink", actionlabel => emt('Start billing'), @@ -511,12 +522,13 @@ { label => 'Cancel now', acl => 'Cancel customer package immediately', - condition => sub { $part_pkg->freq ne '0' - && ! $change_from - && ! $supplemental - && ! $cust_pkg->change_to_pkgnum - && ! $cust_pkg->get('cancel') - }, + condition => sub { + ( $part_pkg->freq ne '0' || ! $cust_pkg->get('setup') ) + && ! $change_from + && ! $supplemental + && ! $cust_pkg->change_to_pkgnum + && ! $cust_pkg->get('cancel') + }, popup => "misc/cancel_pkg.html?method=cancel;$plink", actionlabel => emt('Cancel now'), color => '#FF0000', @@ -551,6 +563,45 @@ }, + { label => '-', + condition => sub { + ( $part_pkg->freq ne '0' || ! $cust_pkg->get('setup') ) + && ! $change_from + && ! $cust_pkg->get('cancel') + }, + content => '-', + }, + + { label => 'Add contact', + #acl => 'Add package contact',#or something like that + condition => sub { ! $cust_pkg->get('cancel') }, + popup => "misc/change_pkg_contact.html?$plink", + actionlabel => emt('Add contact'), + width => 616, + height => 200, + }, + + { label => 'Change location', + acl => 'Change customer package', + condition => sub { ! $change_from }, + popup => "misc/change_pkg.cgi?locationnum=-1;$plink;". + "address1=;address2=;city=;county=;state=$statedefault;". + "zip=;country=$countrydefault", + actionlabel => emt('Change location'), + width => 960, + height => 650, + }, + + { label => 'Edit location', + acl => 'Change customer package', + condition => sub { ! $change_from && $cust_pkg->locationnum != $cust_pkg->cust_main->ship_locationnum }, + popup => 'edit/cust_location.cgi?locationnum='. + $cust_pkg->locationnum, + actionlabel => emt('Edit location'), + width => 700, + height => 355, + }, + ], ], &>