+<!-- mason kludge -->
<%
+my $conf = new FS::Conf;
+
my %uiview = ();
my %uiadd = ();
foreach my $part_svc ( qsearch('part_svc',{}) ) {
print <<END;
<SCRIPT>
function areyousure(href) {
- if (confirm("Permanantly delete included services and cancel this package?") == true)
+ if (confirm("Permanently delete included services and cancel this package?") == true)
window.location.href = href;
}
</SCRIPT>
'<TR><TD ALIGN="right">Comment</TD><TD BGCOLOR="#ffffff">',
$comment, '</TD></TR>',
'<TR><TD ALIGN="right">Setup date</TD><TD BGCOLOR="#ffffff">',
- ( $setup ? time2str("%D",$setup) : "(Not setup)" ), '</TD></TR>',
- '<TR><TD ALIGN="right">Next bill date</TD><TD BGCOLOR="#ffffff">',
- ( $bill ? time2str("%D",$bill) : " " ), '</TD></TR>',
-;
+ ( $setup ? time2str("%D",$setup) : "(Not setup)" ), '</TD></TR>';
+
+print '<TR><TD ALIGN="right">Last bill date</TD><TD BGCOLOR="#ffffff">',
+ ( $cust_pkg->get('last_bill') ? time2str("%D",$cust_pkg->get('last_bill')) : " " ),
+ '</TD></TR>'
+ if $cust_pkg->dbdef_table->column('last_bill');
+
+print '<TR><TD ALIGN="right">Next bill date</TD><TD BGCOLOR="#ffffff">',
+ ( $bill ? time2str("%D",$bill) : " " ), '</TD></TR>';
+
print '<TR><TD ALIGN="right">Suspension date</TD><TD BGCOLOR="#ffffff">',
time2str("%D",$susp), '</TD></TR>' if $susp;
print '<TR><TD ALIGN="right">Expiration date</TD><TD BGCOLOR="#ffffff">',
time2str("%D",$cancel), '</TD></TR>' if $cancel;
print '<TR><TD ALIGN="right">Order taker</TD><TD BGCOLOR="#ffffff">',
$otaker, '</TD></TR>',
- '</TABLE></TD></TR></TABLE>'
-;
-
-# print <<END;
-#<FORM ACTION="../misc/expire_pkg.cgi" METHOD="post">
-#<INPUT TYPE="hidden" NAME="pkgnum" VALUE="$pkgnum">
-#Expire (date): <INPUT TYPE="text" NAME="date" VALUE="" >
-#<INPUT TYPE="submit" VALUE="Cancel later">
-#END
+ '</TABLE></TD></TR></TABLE>';
+
+unless ($expire) {
+ print <<END;
+<FORM ACTION="../misc/expire_pkg.cgi" METHOD="post">
+<INPUT TYPE="hidden" NAME="pkgnum" VALUE="$pkgnum">
+Expire (date): <INPUT TYPE="text" NAME="date" VALUE="" >
+<INPUT TYPE="submit" VALUE="Cancel later">
+END
+}
unless ($cancel) {
my($svcnum)=$cust_svc->svcnum;
my($label, $value, $svcdb) = $cust_svc->label;
print <<END;
-<TR><TD><A HREF="$uiview{$svcpart}?$svcnum">(View) $svc: $value<A></TD></TR>
+<TR><TD><A HREF="$uiview{$svcpart}?$svcnum">(View/Edit) $svc: $value<A></TD></TR>
END
} else {
- print <<END;
-<TR>
- <TD><A HREF="$uiadd{$svcpart}?pkgnum$pkgnum-svcpart$svcpart">
- (Add) $svc</A>
- or <A HREF="../misc/link.cgi?pkgnum$pkgnum-svcpart$svcpart">
- (Link to existing) $svc</A>
- </TD>
-</TR>
-END
+ print qq!<TR><TD>!.
+ qq!<A HREF="$uiadd{$svcpart}?pkgnum$pkgnum-svcpart$svcpart">!.
+ qq!(Provision) $svc</A>!;
+
+ print qq! or <A HREF="../misc/link.cgi?pkgnum$pkgnum-svcpart$svcpart">!.
+ qq!(Link to legacy) $svc</A>!
+ if $conf->exists('legacy_link');
+
+ print '</TD></TR>';
}
}
}
print "</TABLE><FONT SIZE=-1>",
- "Choose (View) to view or edit an existing service<BR>",
- "Choose (Add) to setup a new service<BR>",
- "Choose (Link to existing) to link to a legacy (pre-Freeside) service",
- "</FONT>"
- ;
+ "Choose (View/Edit) to view or edit an existing service<BR>",
+ "Choose (Provision) to setup a new service<BR>";
+
+ print "Choose (Link to legacy) to link to a legacy (pre-Freeside) service"
+ if $conf->exists('legacy_link');
+
+ print "</FONT>";
}
#formatting