[freeside-commits] freeside/FS/FS part_pkg.pm, 1.111.2.6, 1.111.2.7 cust_pkg.pm, 1.179.2.23, 1.179.2.24 cust_bill_pkg.pm, 1.51.4.3, 1.51.4.4
Ivan,,,
ivan at wavetail.420.am
Tue Jul 12 15:58:50 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv31662/FS/FS
Modified Files:
Tag: FREESIDE_2_1_BRANCH
part_pkg.pm cust_pkg.pm cust_bill_pkg.pm
Log Message:
fix UI for package editing w/recur_show_zero, add setup_show_zero, RT#9777
Index: cust_bill_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill_pkg.pm,v
retrieving revision 1.51.4.3
retrieving revision 1.51.4.4
diff -u -w -d -r1.51.4.3 -r1.51.4.4
--- cust_bill_pkg.pm 10 Jun 2011 03:33:57 -0000 1.51.4.3
+++ cust_bill_pkg.pm 12 Jul 2011 22:58:48 -0000 1.51.4.4
@@ -898,12 +898,25 @@
=cut
sub recur_show_zero {
- my $self = shift;
+ #my $self = shift;
+ # $self->recur == 0
+ #&& $self->pkgnum
+ #&& $self->cust_pkg->part_pkg->recur_show_zero;
- $self->recur == 0
- && $self->pkgnum
- && $self->cust_pkg->part_pkg->recur_show_zero;
+ shift->_X_show_zero('recur');
+
+}
+sub setup_show_zero {
+ shift->_X_show_zero('setup');
+}
+
+sub _X_show_zero {
+ my( $self, $what ) = @_;
+
+ return 0 unless $self->$what() == 0 && $self->pkgnum;
+
+ $self->cust_pkg->_X_show_zero($what);
}
=back
Index: part_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg.pm,v
retrieving revision 1.111.2.6
retrieving revision 1.111.2.7
diff -u -w -d -r1.111.2.6 -r1.111.2.7
--- part_pkg.pm 10 Jun 2011 03:33:56 -0000 1.111.2.6
+++ part_pkg.pm 12 Jul 2011 22:58:47 -0000 1.111.2.7
@@ -485,6 +485,7 @@
|| $self->ut_enum('custom', [ '', 'Y' ] )
|| $self->ut_enum('no_auto', [ '', 'Y' ])
|| $self->ut_enum('recur_show_zero', [ '', 'Y' ])
+ || $self->ut_enum('setup_show_zero', [ '', 'Y' ])
#|| $self->ut_moneyn('setup_cost')
#|| $self->ut_moneyn('recur_cost')
|| $self->ut_floatn('setup_cost')
Index: cust_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_pkg.pm,v
retrieving revision 1.179.2.23
retrieving revision 1.179.2.24
diff -u -w -d -r1.179.2.23 -r1.179.2.24
--- cust_pkg.pm 29 Apr 2011 12:10:47 -0000 1.179.2.23
+++ cust_pkg.pm 12 Jul 2011 22:58:48 -0000 1.179.2.24
@@ -599,6 +599,8 @@
|| $self->ut_enum('no_auto', [ '', 'Y' ])
|| $self->ut_enum('waive_setup', [ '', 'Y' ])
|| $self->ut_numbern('agent_pkgid')
+ || $self->ut_enum('recur_show_zero', [ '', 'Y', 'N', ])
+ || $self->ut_enum('setup_show_zero', [ '', 'Y', 'N', ])
;
return $error if $error;
@@ -3275,6 +3277,15 @@
";
}
+sub _X_show_zero {
+ my( $self, $what ) = @_;
+
+ my $what_show_zero = $what. '_show_zero';
+ length($self->$what_show_zero())
+ ? ($self->$what_show_zero() eq 'Y')
+ : $self->part_pkg->$what_show_zero();
+}
+
=head1 SUBROUTINES
=over 4
More information about the freeside-commits
mailing list