assembly => 'erzeugnisse',
letter => 'briefe',
general_ledger => 'dialogbuchungen',
+ accounts_payable => 'kreditorenbuchungen',
);
sub get_all_files {
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";
$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->catdir($webdav_path, $_->filename),
+ } } @all_objects;
+ }
&form_header;
&form_footer;
$form->{id} = 0 if $form->{postasnew};
if (AP->post_transaction(\%myconfig, \%$form)) {
+ # create webdav folder
+ if ($::instance_conf->get_webdav) {
+ SL::Webdav->new(type => 'accounts_payable',
+ number => $form->{invnumber},
+ )->webdav_path;
+ }
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
- Dialogbuchen um WebDAV-Funktion erweitert
+ - Kreditorenbuchung um WebDAV-Funktion erweitert
+
- Verfeinerung der Rechte für Finanzbuchhaltung: Es können nun für Dialogbuchungen,
Debitoren- und Kreditorenbuchungen extra Rechte vergeben werden
<p>[% saved_message | html %]</p>
[% END %]
-<div class="tabwidget">
+<div id="ap_tabs" class="tabwidget">
<ul>
<li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
+[%- IF INSTANCE_CONF.get_webdav %]
+ <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
+[%- END %]
[%- IF id %]
[%- IF AUTH.assert('record_links', 1) %]
<li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=PurchaseInvoice&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li>
</tr>
</table>
</div>
+[% PROCESS 'webdav/_list.html' %]
+<div id="ui-tabs-1">
+ [% LxERP.t8('Loading...') %]
+</div>
</div>
+<hr size="3" noshade>
+
<script type='text/javascript'>
$('#ap_set_to_paid_missing').click(function(){ $('input[name^="paid_"]:last').val('[% LxERP.format_amount(paid_missing, 2) %]') });
</script>