X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Far.pl;h=17b87476b0d03bb228c2db0898f3fc95e7818d33;hb=350fba592256b332e51ba09c5f65bada3836784d;hp=51fbb1aa1cccb29cefd89b28947a102bf28d33c5;hpb=f89cce75436013649305d85beed87451ed5c436f;p=kivitendo-erp.git diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index 51fbb1aa1..17b87476b 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -817,6 +817,10 @@ sub post { } # /saving the history + if ($::instance_conf->get_ar_add_doc && $::instance_conf->get_doc_storage) { + my $add_doc_url = build_std_url("script=ar.pl", 'action=edit', 'id=' . E($form->{id})); + print $form->redirect_header($add_doc_url); + } $form->redirect($locale->text('AR transaction posted.') . ' ' . $locale->text('ID') . ': ' . $form->{id}) unless $inline; $main::lxdebug->leave_sub(); @@ -1001,6 +1005,7 @@ sub ar_transactions { my ($callback, $href, @columns); + my %params = @_; report_generator_set_default_sort('transdate', 1); AR->ar_transactions(\%myconfig, \%$form); @@ -1027,7 +1032,7 @@ sub ar_transactions { employee_id salesman_id business_id parts_partnumber parts_description department_id show_marked_as_closed show_not_mailed); push @hidden_variables, map { "cvar_$_->{name}" } @ct_searchable_custom_variables; - $href = build_std_url('action=ar_transactions', grep { $form->{$_} } @hidden_variables); + $href = $params{want_binary_pdf} ? '' : build_std_url('action=ar_transactions', grep { $form->{$_} } @hidden_variables); my %column_defs = ( 'ids' => { raw_header_data => SL::Presenter::Tag::checkbox_tag("", id => "check_all", checkall => "[data-checkall=1]"), align => 'center' }, @@ -1207,7 +1212,7 @@ sub ar_transactions { } $row->{invnumber}->{link} = build_std_url("script=" . ($ar->{invoice} ? 'is.pl' : 'ar.pl'), 'action=edit') - . "&id=" . E($ar->{id}) . "&callback=${callback}"; + . "&id=" . E($ar->{id}) . "&callback=${callback}" unless $params{want_binary_pdf}; $row->{ids} = { raw_data => SL::Presenter::Tag::checkbox_tag("id[]", value => $ar->{id}, "data-checkall" => 1), @@ -1231,6 +1236,11 @@ sub ar_transactions { $report->add_separator(); $report->add_data(create_subtotal_row(\%totals, \@columns, \%column_alignment, \@subtotal_columns, 'listtotal')); + if ($params{want_binary_pdf}) { + $report->generate_with_headers(); + return $report->generate_pdf_content(want_binary_pdf => 1); + } + $::request->layout->add_javascripts('kivi.MassInvoiceCreatePrint.js'); setup_ar_transactions_action_bar(num_rows => scalar(@{ $form->{AR} }));