X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_bill_event.pm;h=4774b8df92147c7fd95b2c34bd75ec652ca0ca2d;hb=470c3559d5077d2db4779610bbd798d58eaec27f;hp=a75a011b0bbc0a084cc6c3f855abd31174cecb35;hpb=37dc3ebec42104e6ba77dae9a4d8dbdf31364678;p=freeside.git diff --git a/FS/FS/part_bill_event.pm b/FS/FS/part_bill_event.pm index a75a011b0..4774b8df9 100644 --- a/FS/FS/part_bill_event.pm +++ b/FS/FS/part_bill_event.pm @@ -37,7 +37,7 @@ FS::Record. The following fields are currently supported: =item eventpart - primary key -=item payby - CARD, CHEK, LECB, BILL, or COMP +=item payby - CARD, DCRD, CHEK, DCHK, LECB, BILL, or COMP =item event - event name @@ -140,7 +140,7 @@ sub check { } my $error = $self->ut_numbern('eventpart') - || $self->ut_enum('payby', [qw( CARD CHEK LECB BILL COMP )] ) + || $self->ut_enum('payby', [qw( CARD DCRD CHEK DCHK LECB BILL COMP )] ) || $self->ut_text('event') || $self->ut_anything('eventcode') || $self->ut_number('seconds') @@ -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