Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0af1d584

Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt

  • ID 0af1d5843dd19643ace9d75701702c813b64a9ba
  • Vorgänger f8fcb767
  • Nachfolger a78e5571

Deaktiviere Löschen-Button bei festen Verknüpfungen (order, ap)

Unterschiede anzeigen:

SL/Controller/Order.pm
use SL::Helper::UserPreferences::PositionsScrollbar;
use SL::Helper::UserPreferences::UpdatePositions;
use SL::DB::Helper::HardRecordLinks;
use SL::Controller::Helper::GetModels;
use List::Util qw(first sum0);
......
$has_final_invoice = any {'SL::DB::Invoice' eq ref $_ && "final_invoice" eq $_->type} @$lr;
}
my $has_hard_links = SL::DB::Helper::HardRecordLinks->get_count($self->order);
my $right_for = { map { $_ => $_.'_edit' } @{$self->valid_types} };
$right_for->{ sales_order_intake_type() } = 'sales_order_edit';
$right_for->{ purchase_quotation_intake_type() } = 'request_quotation_edit';
......
confirm => $::locale->text('Do you really want to delete this object?'),
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.')
: !$self->order->id ? t8('This object has not been saved yet.')
: $has_hard_links ? t8('This object has hard links. Please delete them first.')
: undef,
only_if => $deletion_allowed,
],

Auch abrufbar als: Unified diff