[freeside-commits] freeside/FS/FS cust_svc.pm, 1.78, 1.79 h_cust_svc.pm, 1.9, 1.10 cust_bill.pm, 1.238, 1.239 part_pkg.pm, 1.87, 1.88 Record.pm, 1.185, 1.186
Ivan,,,
ivan at wavetail.420.am
Mon Mar 23 19:36:33 PDT 2009
- Previous message: [freeside-commits] freeside/FS/FS/part_pkg bulk.pm,1.4,1.5
- Next message: [freeside-commits] freeside/FS/FS cust_svc.pm, 1.66.2.11, 1.66.2.12 h_cust_svc.pm, 1.6.4.2, 1.6.4.3 cust_bill.pm, 1.163.2.43, 1.163.2.44 part_pkg.pm, 1.56.2.9, 1.56.2.10 Record.pm, 1.135.2.13, 1.135.2.14
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv31328/FS/FS
Modified Files:
cust_svc.pm h_cust_svc.pm cust_bill.pm part_pkg.pm Record.pm
Log Message:
bulk price plan: label as Name <email>, supress extraneous service list, RT#3519
Index: h_cust_svc.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/h_cust_svc.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- h_cust_svc.pm 18 Jul 2008 22:28:09 -0000 1.9
+++ h_cust_svc.pm 24 Mar 2009 02:36:31 -0000 1.10
@@ -52,9 +52,15 @@
=cut
-sub label {
+sub label { shift->_label('svc_label', @_); }
+sub label_long { shift->_label('svc_label_long', @_); }
+
+sub _label {
my $self = shift;
- carp "FS::h_cust_svc::label called on $self" if $DEBUG;
+ my $method = shift;
+
+ #carp "FS::h_cust_svc::_label called on $self" if $DEBUG;
+ warn "FS::h_cust_svc::_label called on $self for $method" if $DEBUG;
my $svc_x = $self->h_svc_x(@_);
return () unless $svc_x;
my $part_svc = $self->part_svc;
@@ -65,7 +71,7 @@
}
my @label;
- eval { @label = $self->_svc_label($svc_x, @_); };
+ eval { @label = $self->$method($svc_x, @_); };
if ($@) {
carp 'while resolving history record for svcdb/svcnum ' .
Index: part_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg.pm,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- part_pkg.pm 24 Feb 2009 09:50:43 -0000 1.87
+++ part_pkg.pm 24 Mar 2009 02:36:31 -0000 1.88
@@ -1116,6 +1116,9 @@
sub calc_cancel { 0; }
sub calc_units { 0; }
+#fallback for everything except bulk.pm
+sub hide_svc_detail { 0; }
+
=item format OPTION DATA
Returns data formatted according to the function 'format' described
Index: cust_svc.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_svc.pm,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- cust_svc.pm 15 Mar 2009 22:33:09 -0000 1.78
+++ cust_svc.pm 24 Mar 2009 02:36:31 -0000 1.79
@@ -375,23 +375,34 @@
my($label, $value, $svcdb) = $cust_svc->label;
+=item label_long
+
+Like the B<label> method, except the second item in the list ("meaningful
+identifier") may be longer - typically, a full name is included.
+
=cut
-sub label {
+sub label { shift->_label('svc_label', @_); }
+sub label_long { shift->_label('svc_label_long', @_); }
+
+sub _label {
my $self = shift;
- carp "FS::cust_svc::label called on $self" if $DEBUG;
+ my $method = shift;
my $svc_x = $self->svc_x
or return "can't find ". $self->part_svc->svcdb. '.svcnum '. $self->svcnum;
- $self->_svc_label($svc_x);
+ $self->$method($svc_x);
}
+sub svc_label { shift->_svc_label('label', @_); }
+sub svc_label_long { shift->_svc_label('label_long', @_); }
+
sub _svc_label {
- my( $self, $svc_x ) = ( shift, shift );
+ my( $self, $method, $svc_x ) = ( shift, shift, shift );
(
$self->part_svc->svc,
- $svc_x->label(@_),
+ $svc_x->$method(@_),
$self->part_svc->svcdb,
$self->svcnum
);
Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.238
retrieving revision 1.239
diff -u -d -r1.238 -r1.239
--- cust_bill.pm 17 Mar 2009 12:01:25 -0000 1.238
+++ cust_bill.pm 24 Mar 2009 02:36:31 -0000 1.239
@@ -2832,8 +2832,10 @@
my $description = $desc;
$description .= ' Setup' if $cust_bill_pkg->recur != 0;
- my @d = map &{$escape_function}($_),
- $cust_pkg->h_labels_short($self->_date);
+ my @d = ();
+ push @d, map &{$escape_function}($_),
+ $cust_pkg->h_labels_short($self->_date)
+ unless $cust_pkg->part_pkg->hide_svc_detail;
push @d, $cust_bill_pkg->details(%details_opt)
if $cust_bill_pkg->recur == 0;
@@ -2862,16 +2864,18 @@
" - ". time2str("%x", $cust_bill_pkg->edate). ")";
}
+ my @d = ();
+
#at least until cust_bill_pkg has "past" ranges in addition to
#the "future" sdate/edate ones... see #3032
- my @d = ();
push @d, map &{$escape_function}($_),
- $cust_pkg->h_labels_short($self->_date)
- #$cust_bill_pkg->edate,
- #$cust_bill_pkg->sdate),
- ;
-
- @d = () if ($cust_bill_pkg->itemdesc || $is_summary);
+ $cust_pkg->h_labels_short($self->_date)
+ #$cust_bill_pkg->edate,
+ #$cust_bill_pkg->sdate)
+ unless $cust_pkg->part_pkg->hide_svc_detail
+ || $cust_bill_pkg->itemdesc
+ || $is_summary;
+
push @d, $cust_bill_pkg->details(%details_opt)
unless ($is_summary || $type && $type eq 'R');
Index: Record.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Record.pm,v
retrieving revision 1.185
retrieving revision 1.186
diff -u -d -r1.185 -r1.186
--- Record.pm 21 Feb 2009 04:28:19 -0000 1.185
+++ Record.pm 24 Mar 2009 02:36:31 -0000 1.186
@@ -1944,7 +1944,7 @@
=item ut_text COLUMN
Check/untaint text. Alphanumerics, spaces, and the following punctuation
-symbols are currently permitted: ! @ # $ % & ( ) - + ; : ' " , . ? / = [ ]
+symbols are currently permitted: ! @ # $ % & ( ) - + ; : ' " , . ? / = [ ] < >
May not be null. If there is an error, returns the error, otherwise returns
false.
@@ -1956,7 +1956,7 @@
#warn "notexist ". \¬exist. "\n";
#warn "AUTOLOAD ". \&AUTOLOAD. "\n";
$self->getfield($field)
- =~ /^([\w \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=\[\]]+)$/
+ =~ /^([\w \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=\[\]\<\>]+)$/
or return gettext('illegal_or_empty_text'). " $field: ".
$self->getfield($field);
$self->setfield($field,$1);
- Previous message: [freeside-commits] freeside/FS/FS/part_pkg bulk.pm,1.4,1.5
- Next message: [freeside-commits] freeside/FS/FS cust_svc.pm, 1.66.2.11, 1.66.2.12 h_cust_svc.pm, 1.6.4.2, 1.6.4.3 cust_bill.pm, 1.163.2.43, 1.163.2.44 part_pkg.pm, 1.56.2.9, 1.56.2.10 Record.pm, 1.135.2.13, 1.135.2.14
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list