Kreditorenbuchungen: In Kopf anzeigen, in welchen SEPA-Exporten der Beleg enthalten ist
authorMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 1 Oct 2015 14:31:19 +0000 (16:31 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 1 Oct 2015 14:31:54 +0000 (16:31 +0200)
bin/mozilla/ap.pl
templates/webpages/ap/form_header.html

index 7506693..1d9eac7 100644 (file)
@@ -42,6 +42,7 @@ use SL::IS;
 use SL::PE;
 use SL::ReportGenerator;
 use SL::DB::Default;
+use SL::DB::PurchaseInvoice;
 
 require "bin/mozilla/arap.pl";
 require "bin/mozilla/common.pl";
@@ -217,6 +218,8 @@ sub form_header {
 
   $main::auth->assert('general_ledger');
 
+  $::form->{invoice_obj} = SL::DB::PurchaseInvoice->new(id => $::form->{id})->load if $::form->{id};
+
   $form->{title_} = $form->{title};
   $form->{title} = $form->{title} eq 'Add' ? $locale->text('Add Accounts Payables Transaction') : $locale->text('Edit Accounts Payables Transaction');
 
index f65b301..8720c73 100644 (file)
                 </td>
               </tr>
 
+[%- IF invoice_obj.sepa_exports.as_list.size %]
+              <tr>
+                <th align="right">[% LxERP.t8("SEPA exports") %]</th>
+                <td>
+                 [% FOREACH export = invoice_obj.sepa_exports.as_list %]
+                  <a href="sepa.pl?action=bank_transfer_edit&vc=vendor&id=[% HTML.url(export.id) %]">[% HTML.escape(export.id) %]</a>
+                  [% UNLESS loop.last %], [% END %]
+                 [% END %]
+                </td>
+              </tr>
+[%- END %]
+
               <tr>
                 <th align="right" nowrap>[% 'Currency' | $T8 %]</th>
                 <td><select name="currency">[% selectcurrency %]</select></td>