[freeside-commits] freeside/FS/FS part_pkg.pm, 1.122, 1.123 cust_pkg.pm, 1.203, 1.204 cust_bill_pkg.pm, 1.55, 1.56
Ivan,,,
ivan at wavetail.420.am
Tue Jul 12 15:58:43 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv31661/FS/FS
Modified Files:
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.55
retrieving revision 1.56
diff -u -w -d -r1.55 -r1.56
--- cust_bill_pkg.pm 10 Jun 2011 03:33:43 -0000 1.55
+++ cust_bill_pkg.pm 12 Jul 2011 22:58:41 -0000 1.56
@@ -899,12 +899,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.122
retrieving revision 1.123
diff -u -w -d -r1.122 -r1.123
--- part_pkg.pm 17 Jun 2011 09:47:03 -0000 1.122
+++ part_pkg.pm 12 Jul 2011 22:58:41 -0000 1.123
@@ -554,6 +554,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.203
retrieving revision 1.204
diff -u -w -d -r1.203 -r1.204
--- cust_pkg.pm 16 Jun 2011 23:06:19 -0000 1.203
+++ cust_pkg.pm 12 Jul 2011 22:58:41 -0000 1.204
@@ -600,6 +600,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;
@@ -3281,6 +3283,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