X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FForm.pm;h=32ff29e367e9f12a934f7c1f27b09b59c741b644;hb=6d259acf743c854413befae1317014a56cd86cf8;hp=80ff5accfa4c6079f7a42087f14003853015bd9a;hpb=3edbebcca44b30651a2474d6b5735ebbd7113b28;p=kivitendo-erp.git diff --git a/SL/Form.pm b/SL/Form.pm index 80ff5accf..32ff29e36 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -366,6 +366,8 @@ sub header { |; } + $self->{favicon} = "favicon.ico" unless $self->{favicon}; + if ($self->{favicon} && (-f "$self->{favicon}")) { $favicon = qq| @@ -773,7 +775,10 @@ sub parse_template { $self->{"notes"} = $self->{ $self->{"formname"} . "notes" }; map({ $self->{"employee_${_}"} = $myconfig->{$_}; } - qw(email tel fax name signature company address businessnumber)); + qw(email tel fax name signature company address businessnumber + co_ustid taxnumber duns)); + map({ $self->{"employee_${_}"} =~ s/\\n/\n/g; } + qw(company address signature)); $self->{copies} = 1 if (($self->{copies} *= 1) <= 0); @@ -799,9 +804,6 @@ sub parse_template { } close(OUT); - - use Data::Dumper; - #print(STDERR Dumper($self)); if ($template->uses_temp_file() || $self->{media} eq 'email') { @@ -1146,6 +1148,13 @@ sub set_payment_options { $self->{payment_terms} =~ s/<%netto_date%>/$self->{netto_date}/g; $self->{payment_terms} =~ s/<%skonto_date%>/$self->{skonto_date}/g; $self->{payment_terms} =~ s/<%skonto_amount%>/$self->{skonto_amount}/g; + $self->{payment_terms} =~ s/<%total%>/$self->{total}/g; + $self->{payment_terms} =~ s/<%invtotal%>/$self->{invtotal}/g; + $self->{payment_terms} =~ s/<%currency%>/$self->{currency}/g; + $self->{payment_terms} =~ s/<%terms_netto%>/$self->{terms_netto}/g; + $self->{payment_terms} =~ s/<%account_number%>/$self->{account_number}/g; + $self->{payment_terms} =~ s/<%bank%>/$self->{bank}/g; + $self->{payment_terms} =~ s/<%bank_code%>/$self->{bank_code}/g; $dbh->disconnect; } @@ -1326,6 +1335,24 @@ sub get_employee { $main::lxdebug->leave_sub(); } +sub get_duedate { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig) = @_; + + my $dbh = $self->dbconnect($myconfig); + my $query = qq|SELECT current_date+terms_netto FROM payment_terms + WHERE id = '$self->{payment_id}'|; + my $sth = $dbh->prepare($query); + $sth->execute || $self->dberror($query); + + ($self->{duedate}) = $sth->fetchrow_array; + + $sth->finish; + + $main::lxdebug->leave_sub(); +} + # get other contact for transaction and form - html/tex sub get_contact { $main::lxdebug->enter_sub();