X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/cb3f5922707cd737c275c00635410becf76eb4a3..99308d4c3fe7fe8a0b83c41ae5c97e55dbf86fd8:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index a2e55b0ce..4bea5f094 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -349,7 +349,7 @@ sub isblank { sub header { $main::lxdebug->enter_sub(); - my ($self) = @_; + my ($self, $extra_code) = @_; if ($self->{header}) { $main::lxdebug->leave_sub(); @@ -366,6 +366,8 @@ sub header { |; } + $self->{favicon} = "favicon.ico" unless $self->{favicon}; + if ($self->{favicon} && (-f "$self->{favicon}")) { $favicon = qq| @@ -437,6 +439,7 @@ function fokus(){document.$self->{fokus}.focus();} + $extra_code |; @@ -773,7 +776,8 @@ 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)); @@ -835,7 +839,7 @@ sub parse_template { } else { - @{ $mail->{attachments} } = ($self->{tmpfile}) unless ($form->{do_not_attach}); + @{ $mail->{attachments} } = ($self->{tmpfile}) unless ($self->{do_not_attach}); $mail->{message} =~ s/\r\n/\n/g; $myconfig->{signature} =~ s/\\n/\n/g; @@ -1258,7 +1262,7 @@ sub get_shipto { my $sth = $dbh->prepare($query); $sth->execute || $self->dberror($query); $ref = $sth->fetchrow_hashref(NAME_lc); - map { $form->{$_} = $ref->{$_} } keys %$ref; + map { $self->{$_} = $ref->{$_} } keys %$ref; $sth->finish; $dbh->disconnect; } @@ -1531,7 +1535,7 @@ sub all_vc { FROM language ORDER BY 1|; $sth = $dbh->prepare($query); - $sth->execute || $form->dberror($query); + $sth->execute || $self->dberror($query); while ($ref = $sth->fetchrow_hashref(NAME_lc)) { push @{ $self->{languages} }, $ref; @@ -1543,7 +1547,7 @@ sub all_vc { FROM printers ORDER BY 1|; $sth = $dbh->prepare($query); - $sth->execute || $form->dberror($query); + $sth->execute || $self->dberror($query); while ($ref = $sth->fetchrow_hashref(NAME_lc)) { push @{ $self->{printers} }, $ref; @@ -1556,7 +1560,7 @@ sub all_vc { FROM payment_terms ORDER BY 1|; $sth = $dbh->prepare($query); - $sth->execute || $form->dberror($query); + $sth->execute || $self->dberror($query); while ($ref = $sth->fetchrow_hashref(NAME_lc)) { push @{ $self->{payment_terms} }, $ref; @@ -1582,7 +1586,7 @@ sub language_payment { FROM language ORDER BY 1|; my $sth = $dbh->prepare($query); - $sth->execute || $form->dberror($query); + $sth->execute || $self->dberror($query); while ($ref = $sth->fetchrow_hashref(NAME_lc)) { push @{ $self->{languages} }, $ref; @@ -1594,7 +1598,7 @@ sub language_payment { FROM printers ORDER BY 1|; $sth = $dbh->prepare($query); - $sth->execute || $form->dberror($query); + $sth->execute || $self->dberror($query); while ($ref = $sth->fetchrow_hashref(NAME_lc)) { push @{ $self->{printers} }, $ref; @@ -1606,7 +1610,7 @@ sub language_payment { FROM payment_terms ORDER BY 1|; $sth = $dbh->prepare($query); - $sth->execute || $form->dberror($query); + $sth->execute || $self->dberror($query); while ($ref = $sth->fetchrow_hashref(NAME_lc)) { push @{ $self->{payment_terms} }, $ref; @@ -1617,7 +1621,7 @@ sub language_payment { $query = qq|SELECT id, description FROM buchungsgruppen|; $sth = $dbh->prepare($query); - $sth->execute || $form->dberror($query); + $sth->execute || $self->dberror($query); $self->{BUCHUNGSGRUPPEN} = []; while (my $ref = $sth->fetchrow_hashref(NAME_lc)) { @@ -1730,7 +1734,7 @@ sub create_links { $query = qq|SELECT id, description FROM tax_zones|; $sth = $dbh->prepare($query); - $sth->execute || $form->dberror($query); + $sth->execute || $self->dberror($query); while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {