diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-05-04 00:19:30 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-05-04 00:19:30 -0700 |
commit | 71c6403be78e91e34d4124da35c9d0d284ad197d (patch) | |
tree | 0cf8a3fe5851d25bc478d6a5fa57e333fa142979 /httemplate | |
parent | e0d4d66f670371a0c8a40dc471352634f9fd6017 (diff) |
merging is now attaching, RT#22185
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/view/cust_main/packages/contact.html | 3 | ||||
-rwxr-xr-x | httemplate/view/cust_main/packages/section.html | 12 | ||||
-rw-r--r-- | httemplate/view/cust_main/packages/status.html | 7 |
3 files changed, 16 insertions, 6 deletions
diff --git a/httemplate/view/cust_main/packages/contact.html b/httemplate/view/cust_main/packages/contact.html index 0c81eb39d..fe8b71534 100644 --- a/httemplate/view/cust_main/packages/contact.html +++ b/httemplate/view/cust_main/packages/contact.html @@ -6,6 +6,7 @@ </FONT> % } % if ( $show_detach_link ) { + <FONT SIZE=-1> ( <%pkg_detach_link($cust_pkg)%> ) </FONT> % } @@ -70,7 +71,7 @@ sub pkg_detach_link { 'actionlabel' => emt('Detach'), 'cust_pkg' => $cust_pkg, 'width' => 616, - 'height' => 676, + 'height' => 684, ); } 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 &> <TD CLASS="inv" BGCOLOR="<% $iopt{bgcolor} %>" WIDTH="20%" VALIGN="top"> - <& contact.html, %iopt &> + <& contact.html, %iopt &><BR> <& location.html, %iopt &> </TD> <& 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') || '$' ), diff --git a/httemplate/view/cust_main/packages/status.html b/httemplate/view/cust_main/packages/status.html index 24a4dfcd0..c0213e90b 100644 --- a/httemplate/view/cust_main/packages/status.html +++ b/httemplate/view/cust_main/packages/status.html @@ -365,9 +365,6 @@ sub pkg_status_row_changed { sub pkg_status_row_detached { my( $cust_pkg, %opt ) = @_; -warn $cust_pkg->pkgnum; -warn $cust_pkg->change_custnum; - return '' unless $cust_pkg->change_custnum; my $html = ''; @@ -379,8 +376,10 @@ warn $cust_pkg->change_custnum; encode_entities( $cust_main->name ). '</A>'; + my $what = $opt{'pkg_attached'} ? 'Attached' : 'Detached'; + $html .= pkg_status_row_colspan( $cust_pkg, - emt("Detached to customer #[_1]: ", + emt("$what to customer #[_1]: ", $cust_pkg->change_custnum ). $cust_link, |