X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpackages%2Fstatus.html;h=c0213e90bd9902f853e8b5cb7868e8d465124f61;hb=63973c641c4be00765fa27e55c57cc5b9aa4da19;hp=6be0296a38379442afaedbbc8d6df88546c549e2;hpb=a65d16767bcaa1077be0f41568a4349c9db18990;p=freeside.git diff --git a/httemplate/view/cust_main/packages/status.html b/httemplate/view/cust_main/packages/status.html index 6be0296a3..c0213e90b 100644 --- a/httemplate/view/cust_main/packages/status.html +++ b/httemplate/view/cust_main/packages/status.html @@ -1,4 +1,4 @@ - + %#this should use cust_pkg->status and cust_pkg->statuscolor eventually @@ -14,6 +14,8 @@ <% pkg_status_row($cust_pkg, emt('Cancelled'), 'cancel', 'color'=>'FF0000', %opt ) %> + <% pkg_status_row_detached($cust_pkg, %opt) %> + <% pkg_reason_row($cust_pkg, $cpr, color => 'ff0000', %opt) %> % unless ( $cust_pkg->get('setup') ) { @@ -29,7 +31,7 @@ % } % -% if ( $part_pkg->freq and !$supplemental ) { #? +% if ( $part_pkg->freq && !$supplemental && !$cust_pkg->change_custnum ) { #?
> @@ -360,6 +362,37 @@ sub pkg_status_row_changed { $html; } +sub pkg_status_row_detached { + my( $cust_pkg, %opt ) = @_; + + return '' unless $cust_pkg->change_custnum; + + my $html = ''; + + my $cust_main = $cust_pkg->change_cust_main; + if ( $cust_main ) { + + my $cust_link = ''. + encode_entities( $cust_main->name ). + ''; + + my $what = $opt{'pkg_attached'} ? 'Attached' : 'Detached'; + + $html .= pkg_status_row_colspan( $cust_pkg, + emt("$what to customer #[_1]: ", + $cust_pkg->change_custnum + ). + $cust_link, + '', + 'size' => '-1', + 'align' => 'right', + 'colspan' => 4, + ); + } + + $html; +} + sub pkg_status_row_noauto { my( $cust_pkg, %opt ) = @_; my $part_pkg = $opt{'part_pkg'};