[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
Ivan,,,
ivan at wavetail.420.am
Mon Mar 23 19:40:06 PDT 2009
- Previous message: [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
- Next message: [freeside-commits] freeside/FS/FS/part_pkg bulk.pm, 1.1.2.4, 1.1.2.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv31446/FS/FS
Modified Files:
Tag: FREESIDE_1_7_BRANCH
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.6.4.2
retrieving revision 1.6.4.3
diff -u -d -r1.6.4.2 -r1.6.4.3
--- h_cust_svc.pm 11 Feb 2008 02:36:54 -0000 1.6.4.2
+++ h_cust_svc.pm 24 Mar 2009 02:40:04 -0000 1.6.4.3
@@ -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.56.2.9
retrieving revision 1.56.2.10
diff -u -d -r1.56.2.9 -r1.56.2.10
--- part_pkg.pm 22 Jan 2009 17:29:29 -0000 1.56.2.9
+++ part_pkg.pm 24 Mar 2009 02:40:04 -0000 1.56.2.10
@@ -945,6 +945,9 @@
\%plans;
}
+#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.66.2.11
retrieving revision 1.66.2.12
diff -u -d -r1.66.2.11 -r1.66.2.12
--- cust_svc.pm 15 Mar 2009 22:33:09 -0000 1.66.2.11
+++ cust_svc.pm 24 Mar 2009 02:40:04 -0000 1.66.2.12
@@ -369,23 +369,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.163.2.43
retrieving revision 1.163.2.44
diff -u -d -r1.163.2.43 -r1.163.2.44
--- cust_bill.pm 6 Jan 2009 17:49:21 -0000 1.163.2.43
+++ cust_bill.pm 24 Mar 2009 02:40:04 -0000 1.163.2.44
@@ -2593,8 +2593,11 @@
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;
@@ -2617,12 +2620,17 @@
" - ". 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 = map &{$escape_function}($_),
- $cust_pkg->h_labels_short($self->_date);
- #$cust_bill_pkg->edate,
- #$cust_bill_pkg->sdate),
+ push @d, map &{$escape_function}($_),
+ $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;
+
push @d, $cust_bill_pkg->details(%details_opt);
push @b, {
Index: Record.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Record.pm,v
retrieving revision 1.135.2.13
retrieving revision 1.135.2.14
diff -u -d -r1.135.2.13 -r1.135.2.14
--- Record.pm 1 Nov 2008 19:53:31 -0000 1.135.2.13
+++ Record.pm 24 Mar 2009 02:40:04 -0000 1.135.2.14
@@ -1444,7 +1444,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.
@@ -1456,7 +1456,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 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
- Next message: [freeside-commits] freeside/FS/FS/part_pkg bulk.pm, 1.1.2.4, 1.1.2.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list