[freeside-commits] freeside/httemplate/view/cust_main/packages status.html, 1.8, 1.9 package.html, 1.5, 1.6
Ivan,,,
ivan at wavetail.420.am
Sat Jan 30 00:55:14 PST 2010
Update of /home/cvs/cvsroot/freeside/httemplate/view/cust_main/packages
In directory wavetail.420.am:/tmp/cvs-serv11863/httemplate/view/cust_main/packages
Modified Files:
status.html package.html
Log Message:
discounts, RT#6679
Index: status.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/packages/status.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- status.html 22 Aug 2009 00:31:52 -0000 1.8
+++ status.html 30 Jan 2010 08:55:11 -0000 1.9
@@ -42,6 +42,8 @@
)
%>
+ <% pkg_status_row_discount( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
+
% unless ( $cust_pkg->get('setup') ) {
<% pkg_status_row_colspan( $cust_pkg, 'Never billed', '', 'colspan'=>$colspan, %opt ) %>
% } else {
@@ -70,10 +72,12 @@
%
% unless ( $cust_pkg->get('setup') ) { #not setup
%
-% unless ( $part_pkg->freq ) {
+% unless ( $part_pkg->freq ) {
<% pkg_status_row_colspan( $cust_pkg, 'Not yet billed (one-time charge)', '', 'colspan'=>$colspan, %opt ) %>
+ <% pkg_status_row_discount( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
+
<% pkg_status_row_if(
$cust_pkg,
( $part_pkg->freq ? 'Start billing' : 'Bill on' ),
@@ -94,7 +98,9 @@
% } else {
- <% pkg_status_row_colspan($cust_pkg, "Not yet billed ($billed_or_prepaid ". myfreq($part_pkg). ')', '', 'colspan'=>$colspan, %opt ) %>
+ <% pkg_status_row_colspan($cust_pkg, "Not yet billed ($billed_or_prepaid ". myfreq($part_pkg). ')', '', 'colspan'=>$colspan, %opt ) %>
+
+ <% pkg_status_row_discount( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
<% pkg_status_row_if($cust_pkg, 'Start billing', 'start_date', %opt) %>
@@ -108,6 +114,8 @@
<% pkg_status_row($cust_pkg, 'Billed', 'setup', %opt) %>
+ <% pkg_status_row_discount( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
+
% } else {
%
% if (scalar($cust_pkg->overlimit)) {
@@ -130,6 +138,8 @@
%>
% }
+ <% pkg_status_row_discount( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
+
<% pkg_status_row($cust_pkg, 'Setup', 'setup', %opt) %>
% }
@@ -273,12 +283,37 @@
'size' => '-1',
'align' => 'right',
'colspan' => $opt{'colspan'},
+ #%opt,
);
}
$html;
}
+sub pkg_status_row_discount {
+ my( $cust_pkg, %opt ) = @_;
+
+ my $html;
+
+ foreach my $cust_pkg_discount ( $cust_pkg->cust_pkg_discount_active ) {
+
+ my $discount = $cust_pkg_discount->discount;
+
+ my $label = '<B>Discount</B>: '. $discount->description;
+ $label .= ' ('. ( $discount->months - $cust_pkg_discount->months_used ).
+ ' months remaining)'
+ if $discount->months;
+
+ $html .= pkg_status_row_colspan( $cust_pkg, $label, '',
+ 'colspan' => $opt{'colspan'},
+ #%opt,
+ );
+
+ }
+
+ $html;
+}
+
sub pkg_status_row_colspan {
my($cust_pkg, $title, $addl, %opt) = @_;
Index: package.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/packages/package.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- package.html 21 Jun 2009 15:21:31 -0000 1.5
+++ package.html 30 Jan 2010 08:55:12 -0000 1.6
@@ -1,4 +1,4 @@
-<TD CLASS="inv" BGCOLOR="<% $bgcolor %>">
+<TD CLASS="inv" BGCOLOR="<% $bgcolor %>" VALIGN="top">
<TABLE CLASS="inv" BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%">
<TR>
<TD COLSPAN=2>
More information about the freeside-commits
mailing list