From: Moritz Bunkus Date: Fri, 20 Jan 2017 14:44:37 +0000 (+0100) Subject: Warteschlangen-Druck: keine Multibox mehr verwenden X-Git-Tag: release-3.5.4~1667^2~29 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=dcfea9c2ce19dd6865e478ef745aa5e1c085b8f8;p=kivitendo-erp.git Warteschlangen-Druck: keine Multibox mehr verwenden --- diff --git a/SL/BP.pm b/SL/BP.pm index 724ab2767..4489b8dae 100644 --- a/SL/BP.pm +++ b/SL/BP.pm @@ -40,54 +40,6 @@ use SL::DB; use strict; -sub get_vc { - $main::lxdebug->enter_sub(); - - my ($self, $myconfig, $form) = @_; - - # connect to database - my $dbh = $form->dbconnect($myconfig); - - my %arap = (invoice => 'ar', - sales_order => 'oe', - purchase_order => 'oe', - sales_quotation => 'oe', - request_quotation => 'oe', - check => 'ap', - receipt => 'ar'); - - my $vc = $form->{vc} eq "customer" ? "customer" : "vendor"; - my $arap_type = defined($arap{$form->{type}}) ? $arap{$form->{type}} : 'ar'; - - my $query = - qq|SELECT count(*) | . - qq|FROM (SELECT DISTINCT ON (vc.id) vc.id FROM $vc vc, $arap_type a, status s | . - qq| WHERE a.${vc}_id = vc.id AND s.trans_id = a.id AND s.formname = ? | . - qq| AND s.spoolfile IS NOT NULL) AS total|; - - my ($count) = selectrow_query($form, $dbh, $query, $form->{type}); - - # build selection list - if ($count < $myconfig->{vclimit}) { - $query = - qq|SELECT DISTINCT ON (vc.id) vc.id, vc.name | . - qq|FROM $vc vc, $arap_type a, status s | . - qq|WHERE a.${vc}_id = vc.id AND s.trans_id = a.id AND s.formname = ? | . - qq| AND s.spoolfile IS NOT NULL|; - - my $sth = $dbh->prepare($query); - $sth->execute($form->{type}) || $form->dberror($query . " ($form->{type})"); - - $form->{"all_${vc}"} = []; - while (my $ref = $sth->fetchrow_hashref("NAME_lc")) { - push @{ $form->{"all_${vc}"} }, $ref; - } - $sth->finish; - } - - $main::lxdebug->leave_sub(); -} - sub payment_accounts { $main::lxdebug->enter_sub(); @@ -312,4 +264,3 @@ sub print_spool { } 1; - diff --git a/bin/mozilla/bp.pl b/bin/mozilla/bp.pl index 78a343852..f40708b80 100644 --- a/bin/mozilla/bp.pl +++ b/bin/mozilla/bp.pl @@ -69,9 +69,6 @@ sub search { assert_bp_access(); - # setup customer/vendor selection - BP->get_vc(\%::myconfig, $::form); - my %label = ( invoice => { title => $::locale->text('Sales Invoices'), invnumber => 1, ordnumber => 1 }, sales_order => { title => $::locale->text('Sales Orders'), ordnumber => 1, }, diff --git a/templates/webpages/bp/search.html b/templates/webpages/bp/search.html index 6fd976762..6baf32765 100644 --- a/templates/webpages/bp/search.html +++ b/templates/webpages/bp/search.html @@ -9,22 +9,7 @@ - + [% IF show_accounts %] @@ -81,5 +66,3 @@ [% L.submit_tag('action', LxERP.t8('Continue')) %] - -
[% 'Customer' | $T8 %] - [%- IF vc == 'customer' ? all_customer.size : all_vendor.size %] - [%- INCLUDE 'generic/multibox.html' - name = vc, - DATA = vc == 'customer' ? all_customer : all_vendor, - id_sub = 'vc_keys', - label_sub = 'vc_keys', - select = vc_select, - limit = vclimit, - show_empty = 1, - allow_textbox = 1, - -%] - [%- ELSE %] - [% L.input_tag(vc, '', size=35) %] - [%- END %] -[% L.input_tag(vc, '', size=35) %]