X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fap.pl;h=3440f93fbbc3f2d4268957358b3f8310f5f11d71;hb=71c23cdf2826595579b8e62fc964393875ef070f;hp=52559ed42a02e5ee14f633c5a6c42a1d2b6b8f80;hpb=25d67207329617a104fab716c301895cf0ae116d;p=kivitendo-erp.git diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 52559ed42..3440f93fb 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -24,7 +24,8 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1335, USA. #====================================================================== # # Accounts Payables @@ -39,10 +40,11 @@ use SL::AP; use SL::FU; use SL::IR; use SL::IS; -use SL::PE; 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} = "