X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_bill_event.pm;h=4774b8df92147c7fd95b2c34bd75ec652ca0ca2d;hp=86f929424eeba519415af9185493cbb3360472a0;hb=e975ed0585280f4cbb90b02f57114dedc43f58be;hpb=aa2daf29c5bb13a3728b434159afc4065367af91 diff --git a/FS/FS/part_bill_event.pm b/FS/FS/part_bill_event.pm index 86f929424..4774b8df9 100644 --- a/FS/FS/part_bill_event.pm +++ b/FS/FS/part_bill_event.pm @@ -149,22 +149,20 @@ 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') ) - ); - } - unless ( $conf->exists("invoice_latex_$name") ) { - $conf->set( - "invoice_latex_$name" => - join("\n", $conf->config('invoice_latex') ) - ); + 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") ) + ); + } } }