X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_bill_event.pm;h=4774b8df92147c7fd95b2c34bd75ec652ca0ca2d;hp=e0e4f3f19cb62f5b21a9c8519e06170a50ab18a6;hb=e975ed0585280f4cbb90b02f57114dedc43f58be;hpb=030bef17868168b05a67d9f5866b55da1bb9439c diff --git a/FS/FS/part_bill_event.pm b/FS/FS/part_bill_event.pm index e0e4f3f19..4774b8df9 100644 --- a/FS/FS/part_bill_event.pm +++ b/FS/FS/part_bill_event.pm @@ -149,21 +149,24 @@ sub check { || $self->ut_textn('plan') || $self->ut_anything('plandata') ; + #|| $self->ut_snumber('seconds') return $error if $error; #quelle kludge - 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') ) - ); + 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") ) + ); + } } } - ''; - + $self->SUPER::check; } =back