[freeside-commits] freeside/httemplate/search report_cust_pkg.html, 1.17, 1.18 cust_pkg.cgi, 1.71, 1.72
Ivan,,,
ivan at wavetail.420.am
Tue Jun 21 15:14:22 PDT 2011
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail.420.am:/tmp/cvs-serv31626/httemplate/search
Modified Files:
report_cust_pkg.html cust_pkg.cgi
Log Message:
rework suspension delays, RT#6956
Index: report_cust_pkg.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_cust_pkg.html,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -w -d -r1.17 -r1.18
--- report_cust_pkg.html 12 Oct 2010 01:15:17 -0000 1.17
+++ report_cust_pkg.html 21 Jun 2011 22:14:20 -0000 1.18
@@ -33,7 +33,7 @@
if ( what.options[what.selectedIndex].value == '<% $status %>' ) {
-% foreach my $field (qw( setup last_bill bill adjourn susp expire cancel )) {
+% foreach my $field (@date_fields) {
% if ( $disable{$status}->{$field} ) {
what.form.<% $field %>_beginning_text.disabled = true;
@@ -89,7 +89,7 @@
% }
-% foreach my $field (qw( setup last_bill bill adjourn susp expire contract_end cancel )) {
+% foreach my $field (@date_fields) {
<TR>
<TD ALIGN="right" VALIGN="center"><% $label{$field} %></TD>
@@ -174,24 +174,26 @@
</%init>
<%once>
-my %label = (
+tie my %label, 'Tie::IxHash',
'setup' => 'Setup',
'last_bill' => 'Last bill',
'bill' => 'Next bill',
'adjourn' => 'Adjourns',
'susp' => 'Suspended',
+ 'dundate' => 'Suspension delayed until',
'expire' => 'Expires',
'contract_end' => 'Contract ends',
'cancel' => 'Cancelled',
-);
+;
+my @date_fields = keys %label;
#false laziness w/cust_pkg.cgi
my %disable = (
'all' => {},
'not yet billed' => { 'setup'=>1, 'last_bill'=>1, 'bill'=>1, 'adjourn'=>1, 'susp'=>1, 'expire'=>1, 'cancel'=>1, },
- 'one-time charge' => { 'last_bill'=>1, 'bill'=>1, 'adjourn'=>1, 'susp'=>1, 'expire'=>1, 'cancel'=>1, },
+ 'one-time charge' => { 'last_bill'=>1, 'bill'=>1, 'adjourn'=>1, 'susp'=>1, 'expire'=>1, 'cancel'=>1, 'contract_end'=>1, 'dundate'=>1, },
'active' => { 'susp'=>1, 'cancel'=>1 },
- 'suspended' => { 'cancel' => 1 },
+ 'suspended' => { 'cancel'=>1, 'dundate'=>1, },
'cancelled' => {},
'' => {},
);
@@ -202,6 +204,7 @@
'last_bill' => 0,
'bill' => 0,
'susp' => 1,
+ 'dundate' => 1,
'expire' => 1,
'cancel' => 1,
);
Index: cust_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/cust_pkg.cgi,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -w -d -r1.71 -r1.72
--- cust_pkg.cgi 21 May 2011 18:46:33 -0000 1.71
+++ cust_pkg.cgi 21 Jun 2011 22:14:20 -0000 1.72
@@ -17,6 +17,7 @@
emt('Next bill'),
emt('Adjourn'),
emt('Susp.'),
+ emt('Susp. delay'),
emt('Expire'),
emt('Contract end'),
emt('Cancel'),
@@ -44,7 +45,7 @@
sub { FS::part_pkg::freq_pretty(shift); },
( map { time_or_blank($_) }
- qw( setup last_bill bill adjourn susp expire contract_end cancel ) ),
+ qw( setup last_bill bill adjourn susp dundate expire contract_end cancel ) ),
sub { my $self = shift;
my $return = '';
@@ -104,13 +105,14 @@
'',
'',
'',
+ '',
FS::UI::Web::cust_colors(),
'',
],
- 'style' => [ '', '', '', '', 'b', '', '', '', '', '', '', '', '', '', '', '', '',
+ 'style' => [ '', '', '', '', 'b', '', '', '', '', '', '', '', '', '', '', '', '', '',
FS::UI::Web::cust_styles() ],
'size' => [ '', '', '', '', '-1' ],
- 'align' => 'rrlccrrlrrrrrrrrl'. FS::UI::Web::cust_aligns(). 'r',
+ 'align' => 'rrlccrrlrrrrrrrrrl'. FS::UI::Web::cust_aligns(). 'r',
'links' => [
$link,
$link,
@@ -129,6 +131,7 @@
'',
'',
'',
+ '',
( map { $_ ne 'Cust. Status' ? $clink : '' }
FS::UI::Web::cust_header(
$cgi->param('cust_fields')
@@ -176,9 +179,9 @@
#false laziness w/report_cust_pkg.html
my %disable = (
'all' => {},
- 'one-time charge' => { 'last_bill'=>1, 'bill'=>1, 'adjourn'=>1, 'susp'=>1, 'expire'=>1, 'cancel'=>1, },
+ 'one-time charge' => { 'last_bill'=>1, 'bill'=>1, 'adjourn'=>1, 'susp'=>1, 'expire'=>1, 'cancel'=>1, 'contract_end'=>1, 'dundate'=>1, },
'active' => { 'susp'=>1, 'cancel'=>1 },
- 'suspended' => { 'cancel' => 1 },
+ 'suspended' => { 'cancel' =>1, 'dundate'=>1, },
'cancelled' => {},
'' => {},
);
More information about the freeside-commits
mailing list