X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDN.pm;h=797588adf131d9c9f9c3adc16e8462cc59e74c7c;hb=6de8e1614fb03b63967d06bd8522b4b46260832e;hp=e9a7e81331e3472ce9096ed679c87021ffc4deb2;hpb=8cd05ad64866ce200f888a35723ae4b7e24a2012;p=kivitendo-erp.git diff --git a/SL/DN.pm b/SL/DN.pm index e9a7e8133..797588adf 100644 --- a/SL/DN.pm +++ b/SL/DN.pm @@ -667,7 +667,7 @@ sub melt_pdfs { $dunning_id =~ s|[^\d]||g; - my $in = IO::File->new("gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=- $inputfiles |"); + my $in = IO::File->new($::lx_office_conf{applications}->{ghostscript} . " -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=- $inputfiles |"); $form->error($main::locale->text('Could not spawn ghostscript.')) unless $in; if ($form->{media} eq 'printer') { @@ -718,6 +718,7 @@ sub print_dunning { ar.transdate, ar.duedate, ar.customer_id, ar.invnumber, ar.ordnumber, ar.cp_id, ar.amount, ar.netamount, ar.paid, + ar.curr, ar.amount - ar.paid AS open_amount, ar.amount - ar.paid + da.fee + da.interest AS linetotal @@ -746,11 +747,13 @@ sub print_dunning { c.country, c.department_1, c.department_2, c.email, c.customernumber, c.greeting, c.contact, c.phone, c.fax, c.homepage, c.email, c.taxincluded, c.business_id, c.taxnumber, c.iban, + c,ustid, e.name as salesman_name, co.* FROM dunning d LEFT JOIN ar ON (d.trans_id = ar.id) LEFT JOIN customer c ON (ar.customer_id = c.id) LEFT JOIN contacts co ON (ar.cp_id = co.cp_id) + LEFT JOIN employee e ON (ar.salesman_id = e.id) WHERE (d.dunning_id = ?) LIMIT 1|; my $ref = selectfirst_hashref_query($form, $dbh, $query, $dunning_id); @@ -794,7 +797,7 @@ sub print_dunning { my $filename = "dunning_${dunning_id}_" . Common::unique_id() . ".pdf"; my $spool = $::lx_office_conf{paths}->{spool}; - $form->{OUT} = ">${spool}/$filename"; + $form->{OUT} = "${spool}/$filename"; $form->{keep_tmpfile} = 1; delete $form->{tmpfile}; @@ -888,7 +891,7 @@ sub print_invoice_for_fees { my $filename = Common::unique_id() . "dunning_invoice_${dunning_id}.pdf"; my $spool = $::lx_office_conf{paths}->{spool}; - $form->{OUT} = ">$spool/$filename"; + $form->{OUT} = "$spool/$filename"; $form->{keep_tmpfile} = 1; delete $form->{tmpfile};