Revision 9d0aef99
Von Jan Büren vor etwa 8 Jahren hinzugefügt
SL/Webdav.pm | ||
---|---|---|
31 | 31 |
assembly => 'erzeugnisse', |
32 | 32 |
letter => 'briefe', |
33 | 33 |
general_ledger => 'dialogbuchungen', |
34 |
accounts_payable => 'kreditorenbuchungen', |
|
34 | 35 |
); |
35 | 36 |
|
36 | 37 |
sub get_all_files { |
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}; |
doc/changelog | ||
---|---|---|
10 | 10 |
|
11 | 11 |
- Dialogbuchen um WebDAV-Funktion erweitert |
12 | 12 |
|
13 |
- Kreditorenbuchung um WebDAV-Funktion erweitert |
|
14 |
|
|
13 | 15 |
- Verfeinerung der Rechte für Finanzbuchhaltung: Es können nun für Dialogbuchungen, |
14 | 16 |
Debitoren- und Kreditorenbuchungen extra Rechte vergeben werden |
15 | 17 |
|
templates/webpages/ap/form_header.html | ||
---|---|---|
79 | 79 |
<p>[% saved_message | html %]</p> |
80 | 80 |
[% END %] |
81 | 81 |
|
82 |
<div class="tabwidget"> |
|
82 |
<div id="ap_tabs" class="tabwidget">
|
|
83 | 83 |
<ul> |
84 | 84 |
<li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li> |
85 |
[%- IF INSTANCE_CONF.get_webdav %] |
|
86 |
<li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li> |
|
87 |
[%- END %] |
|
85 | 88 |
[%- IF id %] |
86 | 89 |
[%- IF AUTH.assert('record_links', 1) %] |
87 | 90 |
<li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=PurchaseInvoice&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li> |
... | ... | |
393 | 396 |
</tr> |
394 | 397 |
</table> |
395 | 398 |
</div> |
399 |
[% PROCESS 'webdav/_list.html' %] |
|
400 |
<div id="ui-tabs-1"> |
|
401 |
[% LxERP.t8('Loading...') %] |
|
402 |
</div> |
|
396 | 403 |
</div> |
397 | 404 |
|
405 |
<hr size="3" noshade> |
|
406 |
|
|
398 | 407 |
<script type='text/javascript'> |
399 | 408 |
$('#ap_set_to_paid_missing').click(function(){ $('input[name^="paid_"]:last').val('[% LxERP.format_amount(paid_missing, 2) %]') }); |
400 | 409 |
</script> |
Auch abrufbar als: Unified diff
Kreditorenbuchung um WebDAV-Funktion erweitert