]> wagnertech.de Git - mfinanz.git/blobdiff - bin/mozilla/ap.pl
PDF::Table: Zusätzliche header richtigrum anzeigen
[mfinanz.git] / bin / mozilla / ap.pl
index 039f5a96370167b037aafbcb4e6d4984f54e63a0..49f6f7a638b2a6019f46ed604c87a4e25c6f02d6 100644 (file)
@@ -44,6 +44,7 @@ use SL::IR;
 use SL::IS;
 use SL::ReportGenerator;
 use SL::DB::BankTransactionAccTrans;
+use SL::DB::Chart;
 use SL::DB::Currency;
 use SL::DB::Default;
 use SL::DB::PurchaseInvoice;
@@ -553,6 +554,10 @@ sub form_header {
     $form->{'paidaccount_changeable_'. $i} = $changeable;
 
     $form->{'labelpaid_project_id_'. $i} = $project_labels{$form->{'paid_project_id_'. $i}};
+    # accno and description as info text
+    $form->{'AP_paid_readonly_desc_' . $i} =  $form->{'AP_paid_' . $i} ?
+       $form->{'AP_paid_' . $i} . " " . SL::DB::Manager::Chart->find_by(accno => $form->{'AP_paid_' . $i})->description
+     : '';
   }
 
   $form->{paid_missing} = $form->{invtotal_unformatted} - $form->{totalpaid};
@@ -1196,7 +1201,7 @@ sub setup_ap_search_action_bar {
 
 sub setup_ap_transactions_action_bar {
   my %params          = @_;
-  my $may_edit_create = $::auth->assert('vendor_invoice_edit', 1);
+  my $may_edit_create = $::auth->assert('ap_transactions', 1);
 
   for my $bar ($::request->layout->get('actionbar')) {
     $bar->add(
@@ -1229,7 +1234,7 @@ sub setup_ap_display_form_action_bar {
   my $is_storno               = IS->is_storno(\%::myconfig, $::form, 'ap', $::form->{id});
   my $has_storno              = IS->has_storno(\%::myconfig, $::form, 'ap');
 
-  my $may_edit_create         = $::auth->assert('vendor_invoice_edit', 1);
+  my $may_edit_create         = $::auth->assert('ap_transactions', 1);
 
   my $has_sepa_exports;
   if ($::form->{id}) {