summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main/packages
diff options
context:
space:
mode:
authorcvs2git <cvs2git>2010-11-05 19:05:57 +0000
committercvs2git <cvs2git>2010-11-05 19:05:57 +0000
commitaaf8baf3662e16e9414de236a39f8801a8c41b01 (patch)
tree2cda603e4311b3e80f79b93d9bcce3a7c7c2d053 /httemplate/view/cust_main/packages
parent995a145c931164347683071c95c6754379d36604 (diff)
parent9b2de4257b6a2877434008188e52b8ef71ff339d (diff)
This commit was manufactured by cvs2svn to create branch
'FREESIDE_2_1_BRANCH'.
Diffstat (limited to 'httemplate/view/cust_main/packages')
-rw-r--r--httemplate/view/cust_main/packages/package.html1
-rw-r--r--httemplate/view/cust_main/packages/services.html44
-rw-r--r--httemplate/view/cust_main/packages/status.html6
3 files changed, 47 insertions, 4 deletions
diff --git a/httemplate/view/cust_main/packages/package.html b/httemplate/view/cust_main/packages/package.html
index 3c486dd25..3b58f9ec0 100644
--- a/httemplate/view/cust_main/packages/package.html
+++ b/httemplate/view/cust_main/packages/package.html
@@ -39,6 +39,7 @@
% if ( $curuser->access_right('Discount customer package')
% && $part_pkg->can_discount
% && ! scalar($cust_pkg->cust_pkg_discount_active)
+% && ! scalar($cust_pkg->part_pkg->part_pkg_discount)
% )
% {
% $br=1;
diff --git a/httemplate/view/cust_main/packages/services.html b/httemplate/view/cust_main/packages/services.html
index 6e30922c5..512efccc4 100644
--- a/httemplate/view/cust_main/packages/services.html
+++ b/httemplate/view/cust_main/packages/services.html
@@ -4,12 +4,40 @@
<TD CLASS="inv" BGCOLOR="<% $bgcolor %>">
<TABLE CLASS="inv" BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%">
+ <SCRIPT TYPE="text/javascript">
+function clearhint_search_cust_svc(obj, str) {
+ if (obj.value == str) obj.value = '';
+}
+ </SCRIPT>
% #foreach my $svcpart (sort {$a->{svcpart} <=> $b->{svcpart}} @{$pkg->{svcparts}}) {
% foreach my $part_svc ( $cust_pkg->part_svc ) {
-% #foreach my $service (@{$svcpart->{services}}) {
-% foreach my $cust_svc ( @{ $part_svc->cust_pkg_svc } ) {
+% if ( $opt{'cust_pkg-large_pkg_size'} > 0 and
+% $opt{'cust_pkg-large_pkg_size'} <= $cust_pkg->num_svcs ) {
+% # summarize
+ <TR>
+ <TD ALIGN="center" VALIGN="top">
+% my $href="${p}search/cust_pkg_svc.html?svcpart=".$part_svc->svcpart.
+% ";pkgnum=".$cust_pkg->pkgnum;
+ <A HREF="<% $href %>"><% $part_svc->svc %></A>&nbsp;
+ <A HREF="<% $href %>"><B>(view all <% $cust_pkg->num_svcs %>)</B></A>
+% my $hint = $hints{$part_svc->svcdb};
+% if ( $hint ) {
+ <BR>
+ <FORM name="svcpart<%$part_svc->svcpart%>_search" STYLE="display:inline"
+ ACTION="<%$p%>search/cust_pkg_svc.html" METHOD="GET">
+ <INPUT TYPE="hidden" NAME="svcpart" VALUE="<%$part_svc->svcpart%>">
+ <INPUT TYPE="hidden" NAME="pkgnum" VALUE="<%$cust_pkg->pkgnum%>">
+ <INPUT TYPE="text" NAME="search_svc"
+ onfocus="clearhint_search_cust_svc(this, '<%$hint%>')" VALUE="<%$hint%>">
+ <INPUT TYPE="submit" VALUE="Search"></FORM>
+% } #$hint
+ </TD>
+ </TR>
+% }
+% else {
+% foreach my $cust_svc ( @{ $part_svc->cust_pkg_svc } ) {
<TR>
<TD ALIGN="right" VALIGN="top"><% FS::UI::Web::svc_link($m, $part_svc, $cust_svc) %></TD>
@@ -65,7 +93,8 @@
</TD>
</TR>
-% }
+% } #foreach $cust_svc
+% }
% if ( ! $cust_pkg->get('cancel')
% && $curuser->access_right('Provision customer service')
@@ -137,4 +166,13 @@ sub svc_unprovision_link {
qq!', 'Permanently unprovision and delete this service?')">Unprovision</A>!;
}
+my %hints = (
+svc_acct => '(user or email)',
+svc_domain => '(domain)',
+svc_broadband => '(ip or mac)',
+svc_forward => '(email)',
+svc_phone => '(phone)',
+svc_pbx => '(phone)',
+);
+
</%init>
diff --git a/httemplate/view/cust_main/packages/status.html b/httemplate/view/cust_main/packages/status.html
index a6868434b..c05cd5a94 100644
--- a/httemplate/view/cust_main/packages/status.html
+++ b/httemplate/view/cust_main/packages/status.html
@@ -54,8 +54,11 @@
<% pkg_status_row_changed( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
<% pkg_status_row_if( $cust_pkg, $last_bill_or_renewed, 'last_bill', %opt, curuser=>$curuser ) %>
-% # pkg_status_row($cust_pkg, 'Next bill', 'bill', %opt)
+% if ( $part_pkg->option('suspend_bill') ) {
+ <% pkg_status_row_if( $cust_pkg, 'Next&nbsp;bill', 'bill', %opt, curuser=>$curuser ) %>
+% }
<% pkg_status_row_if( $cust_pkg, 'Expires', 'expire', %opt, curuser=>$curuser ) %>
+ <% pkg_status_row_if( $cust_pkg, 'Contract ends', 'contract_end', %opt ) %>
<TR>
<TD COLSPAN=<%$colspan%>>
@@ -167,6 +170,7 @@
<% pkg_status_row_if($cust_pkg, 'Will automatically suspend by', 'autosuspend', %opt) %>
<% pkg_status_row_if( $cust_pkg, 'Will suspend on', 'adjourn', %opt, curuser=>$curuser ) %>
<% pkg_status_row_if( $cust_pkg, 'Expires', 'expire', %opt, curuser=>$curuser ) %>
+ <% pkg_status_row_if( $cust_pkg, 'Contract ends', 'contract_end', %opt ) %>
% if ( $part_pkg->freq ) {