X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fap.pl;h=3440f93fbbc3f2d4268957358b3f8310f5f11d71;hb=71c23cdf2826595579b8e62fc964393875ef070f;hp=1ea3516cce9b58da8d9140eecda5d4177e7bb77c;hpb=19fb04d1cfad224a0f0c4c3b88494b4605fc6d4e;p=kivitendo-erp.git diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 1ea3516cc..3440f93fb 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -43,6 +43,8 @@ use SL::IS; use SL::ReportGenerator; use SL::DB::Default; use SL::DB::PurchaseInvoice; +use SL::Webdav; +use SL::Locale::String qw(t8); require "bin/mozilla/arap.pl"; require "bin/mozilla/common.pl"; @@ -98,6 +100,7 @@ sub add { $form->{initial_transdate} = $form->{transdate}; create_links(dont_save => 1); $form->{transdate} = $form->{initial_transdate}; + &display_form; $main::lxdebug->leave_sub(); @@ -125,6 +128,19 @@ sub display_form { $main::auth->assert('ap_transactions'); + # get all files stored in the webdav folder + if ($form->{invnumber} && $::instance_conf->get_webdav) { + my $webdav = SL::Webdav->new( + type => 'accounts_payable', + number => $form->{invnumber}, + ); + my $webdav_path = $webdav->webdav_path; + my @all_objects = $webdav->get_all_objects; + @{ $form->{WEBDAV} } = map { { name => $_->filename, + type => t8('File'), + link => File::Spec->catfile($_->full_filedescriptor), + } } @all_objects; + } &form_header; &form_footer; @@ -172,11 +188,7 @@ sub create_links { (@{ $form->{all_vendor} }); } - # departments - if (@{ $form->{all_departments} || [] }) { - $form->{department} = "$form->{department}--$form->{department_id}"; - $form->{selectdepartment} = "