X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpackages%2Fsection.html;h=391a13b5f8e8cc885d53d734adf52f6037a17c4a;hb=63973c641c4be00765fa27e55c57cc5b9aa4da19;hp=5f54c0a36e19288e6d2ab1f7ea08ffbc492665d2;hpb=2e761a72c380dc9d7320ccd822cfe8476534b369;p=freeside.git diff --git a/httemplate/view/cust_main/packages/section.html b/httemplate/view/cust_main/packages/section.html index 5f54c0a36..391a13b5f 100755 --- a/httemplate/view/cust_main/packages/section.html +++ b/httemplate/view/cust_main/packages/section.html @@ -28,7 +28,7 @@ <& package.html, %iopt &> <& status.html, %iopt &> - <& contact.html, %iopt &> + <& contact.html, %iopt &>
<& location.html, %iopt &> <& services.html, %iopt &> @@ -59,6 +59,15 @@ my $packages = $opt{'packages'}; ( $a->getfield('pkgnum') <=> $b->getfield('pkgnum') ) } @$packages; +my %change_custnum = map { $_->change_custnum => 1 } + grep { $_->change_custnum } + grep { $_->getfield('cancel') } + @$packages; + +my $pkg_attached = ( scalar(keys %change_custnum) == 1 + && ! grep { ! $_->getfield('cancel') } @$packages + ); + my $countrydefault = scalar($conf->config('countrydefault')) || 'US'; my %conf_opt = ( @@ -67,6 +76,7 @@ my %conf_opt = ( || $curuser->option('cust_pkg-display_times')), #for status.html 'cust_pkg-show_autosuspend' => $conf->exists('cust_pkg-show_autosuspend'), + 'pkg_attached' => $pkg_attached, #for status.html pkg-balances 'pkg-balances' => $conf->exists('pkg-balances'), 'money_char' => ( $conf->config('money_char') || '$' ),