From 9006e983ebf98b2000a812ab01f99dcb2335534c Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 24 Mar 2009 02:36:31 +0000 Subject: [PATCH] bulk price plan: label as Name , supress extraneous service list, RT#3519 --- FS/FS/Record.pm | 4 ++-- FS/FS/cust_bill.pm | 22 +++++++++++++--------- FS/FS/cust_svc.pm | 21 ++++++++++++++++----- FS/FS/h_cust_svc.pm | 12 +++++++++--- FS/FS/part_pkg.pm | 3 +++ FS/FS/part_pkg/bulk.pm | 20 +++++++++++++------- 6 files changed, 56 insertions(+), 26 deletions(-) diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index 2d0263b22..0e8275b72 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -1944,7 +1944,7 @@ sub ut_money { =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 @@ sub ut_text { #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); diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 6fac0a946..77f0dd30f 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -2832,8 +2832,10 @@ sub _items_cust_bill_pkg { 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 @@ sub _items_cust_bill_pkg { " - ". 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'); diff --git a/FS/FS/cust_svc.pm b/FS/FS/cust_svc.pm index 320f78aa0..c4a75f77a 100644 --- a/FS/FS/cust_svc.pm +++ b/FS/FS/cust_svc.pm @@ -375,23 +375,34 @@ Usage example: my($label, $value, $svcdb) = $cust_svc->label; +=item label_long + +Like the B