S:F:B:Webdav.pm Pfad auch ausgeben, damit man weiß, was fehlt
[kivitendo-erp.git] / SL / File / Backend / Webdav.pm
index 871b61f..0e9525e 100644 (file)
@@ -84,7 +84,7 @@ sub get_filepath {
   my ($self, %params) = @_;
   die "no dbfile" unless $params{dbfile};
   my ($path, undef, undef) = $self->webdav_path($params{dbfile});
-  die "no file" if !-f $path;
+  die "Path not found: " . $path unless -f $path;
   return $path;
 }
 
@@ -105,8 +105,7 @@ sub sync_from_backend {
 }
 
 sub enabled {
-  return 0 unless $::instance_conf->get_doc_webdav;
-  return 1;
+  return $::instance_conf->get_doc_webdav;
 }
 
 #
@@ -131,6 +130,8 @@ my %type_to_path = (
   gl_transaction          => 'dialogbuchungen',
   accounts_payable        => 'kreditorenbuchungen',
   shop_image              => 'shopbilder',
+  customer                => 'kunden',
+  vendor                  => 'lieferanten',
 );
 
 my %type_to_model = (
@@ -151,6 +152,8 @@ my %type_to_model = (
   gl_transaction          => 'GLTransaction',
   accounts_payable        => 'GLTransaction',
   shop_image              => 'Part',
+  customer                => 'Customer',
+  vendor                  => 'Vendor',
 );
 
 my %model_to_number = (
@@ -162,6 +165,8 @@ my %model_to_number = (
   Letter          => 'letternumber',
   GLTransaction   => 'reference',
   ShopImage       => 'partnumber',
+  Customer        => 'customernumber',
+  Vendor          => 'vendornumber',
 );
 
 sub webdav_path {