summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorcvs2git <cvs2git>2004-10-26 13:08:19 +0000
committercvs2git <cvs2git>2004-10-26 13:08:19 +0000
commitd73b26abb947fec52fc2807c52b8ad322a30d9a0 (patch)
treed27b1d9e3eaa5256619a54c65464baed3446834d /FS
parentbeccdb9fb97f30c35c7783965849ea018b9fe1ef (diff)
parent87d033c6898dd553a403d679f6ca1048071843da (diff)
This commit was manufactured by cvs2svn to create tag 'freeside_1_4_2beta1'.freeside_1_4_2beta1
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/cust_main.pm32
-rw-r--r--FS/FS/part_bill_event.pm24
2 files changed, 13 insertions, 43 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index 070a888d4..89fd5be14 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -1012,38 +1012,6 @@ sub suspend {
grep { $_->suspend } $self->unsuspended_pkgs;
}
-=item suspend_if_pkgpart PKGPART [ , PKGPART ... ]
-
-Suspends all unsuspended packages (see L<FS::cust_pkg>) matching the listed
-PKGPARTs (see L<FS::part_pkg>). Always returns a list: an empty list on
-success or a list of errors.
-
-=cut
-
-sub suspend_if_pkgpart {
- my $self = shift;
- my @pkgparts = @_;
- grep { $_->suspend }
- grep { my $pkgpart = $_->pkgpart; grep { $pkgpart eq $_ } @pkgparts }
- $self->unsuspended_pkgs;
-}
-
-=item suspend_unless_pkgpart PKGPART [ , PKGPART ... ]
-
-Suspends all unsuspended packages (see L<FS::cust_pkg>) unless they match the
-listed PKGPARTs (see L<FS::part_pkg>). Always returns a list: an empty list
-on success or a list of errors.
-
-=cut
-
-sub suspend_unless_pkgpart {
- my $self = shift;
- my @pkgparts = @_;
- grep { $_->suspend }
- grep { my $pkgpart = $_->pkgpart; ! grep { $pkgpart eq $_ } @pkgparts }
- $self->unsuspended_pkgs;
-}
-
=item cancel [ OPTION => VALUE ... ]
Cancels all uncancelled packages (see L<FS::cust_pkg>) for this customer.
diff --git a/FS/FS/part_bill_event.pm b/FS/FS/part_bill_event.pm
index 28cf62037..2638328ea 100644
--- a/FS/FS/part_bill_event.pm
+++ b/FS/FS/part_bill_event.pm
@@ -149,20 +149,22 @@ sub check {
|| $self->ut_textn('plan')
|| $self->ut_anything('plandata')
;
- #|| $self->ut_snumber('seconds')
return $error if $error;
#quelle kludge
- if ( $self->plandata =~ /^(agent_)?templatename\s+(.*)$/m ) {
- my $name= $2;
-
- foreach my $file (qw( template latex latexnotes )) {
- unless ( $conf->exists("invoice_${file}_$name") ) {
- $conf->set(
- "invoice_${file}_$name" =>
- join("\n", $conf->config("invoice_$file") )
- );
- }
+ if ( $self->plandata =~ /^templatename\s+(.*)$/ ) {
+ my $name= $1;
+ unless ( $conf->exists("invoice_template_$name") ) {
+ $conf->set(
+ "invoice_template_$name" =>
+ join("\n", $conf->config('invoice_template') )
+ );
+ }
+ unless ( $conf->exists("invoice_latex_$name") ) {
+ $conf->set(
+ "invoice_latex_$name" =>
+ join("\n", $conf->config('invoice_latex') )
+ );
}
}