Revision 9d0aef99
Von Jan Büren vor mehr als 7 Jahren hinzugefügt
bin/mozilla/ap.pl | ||
---|---|---|
43 | 43 |
use SL::ReportGenerator; |
44 | 44 |
use SL::DB::Default; |
45 | 45 |
use SL::DB::PurchaseInvoice; |
46 |
use SL::Webdav; |
|
47 |
use SL::Locale::String qw(t8); |
|
46 | 48 |
|
47 | 49 |
require "bin/mozilla/arap.pl"; |
48 | 50 |
require "bin/mozilla/common.pl"; |
... | ... | |
125 | 127 |
|
126 | 128 |
$main::auth->assert('ap_transactions'); |
127 | 129 |
|
130 |
# get all files stored in the webdav folder |
|
131 |
if ($form->{invnumber} && $::instance_conf->get_webdav) { |
|
132 |
my $webdav = SL::Webdav->new( |
|
133 |
type => 'accounts_payable', |
|
134 |
number => $form->{invnumber}, |
|
135 |
); |
|
136 |
my $webdav_path = $webdav->webdav_path; |
|
137 |
my @all_objects = $webdav->get_all_objects; |
|
138 |
@{ $form->{WEBDAV} } = map { { name => $_->filename, |
|
139 |
type => t8('File'), |
|
140 |
link => File::Spec->catdir($webdav_path, $_->filename), |
|
141 |
} } @all_objects; |
|
142 |
} |
|
128 | 143 |
&form_header; |
129 | 144 |
&form_footer; |
130 | 145 |
|
... | ... | |
728 | 743 |
$form->{id} = 0 if $form->{postasnew}; |
729 | 744 |
|
730 | 745 |
if (AP->post_transaction(\%myconfig, \%$form)) { |
746 |
# create webdav folder |
|
747 |
if ($::instance_conf->get_webdav) { |
|
748 |
SL::Webdav->new(type => 'accounts_payable', |
|
749 |
number => $form->{invnumber}, |
|
750 |
)->webdav_path; |
|
751 |
} |
|
731 | 752 |
# saving the history |
732 | 753 |
if(!exists $form->{addition} && $form->{id} ne "") { |
733 | 754 |
$form->{snumbers} = qq|invnumber_| . $form->{invnumber}; |
Auch abrufbar als: Unified diff
Kreditorenbuchung um WebDAV-Funktion erweitert