From 825883e4f5b2df7e971fdc27fb290c41fc05f8be Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 28 Jun 2019 16:25:57 +0200 Subject: [PATCH] =?utf8?q?Auftrags-Controller:=20Einstellungen/H=C3=B6he?= =?utf8?q?=20des=20Scrollbereichs=20ber=C3=BCcksichtigen=20=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit … für den Positionsbereich --- SL/Controller/Order.pm | 30 ++++++++++--------- templates/webpages/order/tabs/basic_data.html | 8 +++-- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index 46e31c336..250027022 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -24,6 +24,7 @@ use SL::DB::RecordLink; use SL::Helper::CreatePDF qw(:all); use SL::Helper::PrintOptions; use SL::Helper::ShippedQty; +use SL::Helper::UserPreferences::PositionsScrollbar; use SL::Controller::Helper::GetModels; @@ -1546,20 +1547,21 @@ sub workflow_sales_or_purchase_order { sub pre_render { my ($self) = @_; - $self->{all_taxzones} = SL::DB::Manager::TaxZone->get_all_sorted(); - $self->{all_departments} = SL::DB::Manager::Department->get_all_sorted(); - $self->{all_employees} = SL::DB::Manager::Employee->get_all(where => [ or => [ id => $self->order->employee_id, - deleted => 0 ] ], - sort_by => 'name'); - $self->{all_salesmen} = SL::DB::Manager::Employee->get_all(where => [ or => [ id => $self->order->salesman_id, - deleted => 0 ] ], - sort_by => 'name'); - $self->{all_payment_terms} = SL::DB::Manager::PaymentTerm->get_all_sorted(where => [ or => [ id => $self->order->payment_id, - obsolete => 0 ] ]); - $self->{all_delivery_terms} = SL::DB::Manager::DeliveryTerm->get_all_sorted(); - $self->{current_employee_id} = SL::DB::Manager::Employee->current->id; - $self->{periodic_invoices_status} = $self->get_periodic_invoices_status($self->order->periodic_invoices_config); - $self->{order_probabilities} = [ map { { title => ($_ * 10) . '%', id => $_ * 10 } } (0..10) ]; + $self->{all_taxzones} = SL::DB::Manager::TaxZone->get_all_sorted(); + $self->{all_departments} = SL::DB::Manager::Department->get_all_sorted(); + $self->{all_employees} = SL::DB::Manager::Employee->get_all(where => [ or => [ id => $self->order->employee_id, + deleted => 0 ] ], + sort_by => 'name'); + $self->{all_salesmen} = SL::DB::Manager::Employee->get_all(where => [ or => [ id => $self->order->salesman_id, + deleted => 0 ] ], + sort_by => 'name'); + $self->{all_payment_terms} = SL::DB::Manager::PaymentTerm->get_all_sorted(where => [ or => [ id => $self->order->payment_id, + obsolete => 0 ] ]); + $self->{all_delivery_terms} = SL::DB::Manager::DeliveryTerm->get_all_sorted(); + $self->{current_employee_id} = SL::DB::Manager::Employee->current->id; + $self->{periodic_invoices_status} = $self->get_periodic_invoices_status($self->order->periodic_invoices_config); + $self->{order_probabilities} = [ map { { title => ($_ * 10) . '%', id => $_ * 10 } } (0..10) ]; + $self->{positions_scrollbar_height} = SL::Helper::UserPreferences::PositionsScrollbar->new()->get_height(); my $print_form = Form->new(''); $print_form->{type} = $self->type; diff --git a/templates/webpages/order/tabs/basic_data.html b/templates/webpages/order/tabs/basic_data.html index a3fa939d2..7966271a4 100644 --- a/templates/webpages/order/tabs/basic_data.html +++ b/templates/webpages/order/tabs/basic_data.html @@ -194,8 +194,12 @@
- -
+ [%- IF SELF.positions_scrollbar_height -%] + [%- SET scroll_style = 'style="overflow-y: auto; height:' _ SELF.positions_scrollbar_height _ 'vh;"' -%] + [%- ELSE -%] + [%- SET scroll_style = '' -%] + [%- END -%] +
-- 2.20.1