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;
$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};
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(
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}) {