35eda8c46894b186d6d5f6d24de635292bc500ab
[freeside.git] / httemplate / view / cust_main / packages / hidden.html
1 % if (!$iopt{noframe}) {
2 %   # then start the block here, and assign a suitable ID (cust_pkgX_block)
3 <TABLE CLASS="hiddenrows" STYLE="display: none" ID="<% $id %>_block">
4 % }
5   <TR ID="<% $id %>">
6     <TD>
7       <A NAME="<% $id %>"/>
8       <% $pkgnum %>
9     </TD>
10     <TD>
11 %     if ( $pkgpart_change and $location_change ) {
12       Package type and location change
13 %     } elsif ( $pkgpart_change ) {
14       Package type change
15 %     } elsif ( $location_change ) {
16       Location change
17 %     } # or else what?
18       <B><% time2str('%b %o, %Y', $cust_pkg->get('cancel')) %></B>
19     </TD><TD>
20 %     if ( $pkgpart_change ) {
21       from <% $popup_link |n %><B><% $part_pkg->pkg |h %></B> - <% $part_pkg->custom_comment |h %></A>
22 %     }
23 %     if ( $pkgpart_change and $location_change ) {
24       <BR>
25 %     }
26 %     if ( $location_change ) {
27       from <I><% $popup_link |n %><% $cust_pkg->location_label %></A></I>
28 %     }
29     </TD>
30   </TR>
31 % if ( $cust_pkg->get('changed_from_pkg') ) {
32 <& hidden.html, $cust_pkg->get('changed_from_pkg'),
33                 %iopt,
34                 'next_pkg' => $cust_pkg,
35                 'noframe' => 1
36 &>
37 % }
38 % if ( !$iopt{noframe} ) {
39 </TABLE>
40 % }
41 <%init>
42 my $cust_pkg = shift;
43 my $part_pkg = $cust_pkg->part_pkg;
44 my %iopt = @_;
45 my $next = delete($iopt{'next_pkg'});
46 my $curuser = $FS::CurrentUser::CurrentUser;
47 my $pkgnum = $curuser->option('show_pkgnum') ? $cust_pkg->pkgnum.': ' : '';
48
49 my $id = "cust_pkg".$cust_pkg->pkgnum;
50
51 my $pkgpart_change = ($next->pkgpart != $cust_pkg->pkgpart);
52 my $location_change = ($next->locationnum != $cust_pkg->locationnum);
53 my $both_change = $pkgpart_change && $location_change;
54
55 my $onclick =
56   include('/elements/popup_link_onclick.html',
57     'action'      => $fsurl.'view/cust_pkg-popup.html?' . $cust_pkg->pkgnum,
58     'actionlabel' => 'Package #'.$cust_pkg->pkgnum,
59     'width'       => '1000',
60     'height'      => '310',
61     'color'       => $cust_pkg->statuscolor,
62   );
63 my $popup_link = qq(<A HREF="#" onclick="$onclick">);
64
65 </%init>