From a4a09b2a3309cd9e1f8b382d91da284a4623fc56 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 23 Jan 2017 13:52:51 +0100 Subject: [PATCH] Form->all_vc: entfernt, da inzwischen unbenutzt --- SL/Form.pm | 73 ------------------------------------------------------ 1 file changed, 73 deletions(-) diff --git a/SL/Form.pm b/SL/Form.pm index 78eac8a64..04b20129c 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -2453,79 +2453,6 @@ sub get_name { return scalar(@{ $self->{name_list} }); } -# the selection sub is used in the AR, AP, IS, IR, DO and OE module -# -sub all_vc { - $main::lxdebug->enter_sub(); - - my ($self, $myconfig, $table, $module) = @_; - - my $ref; - my $dbh = $self->get_standard_dbh; - - $table = $table eq "customer" ? "customer" : "vendor"; - - # build selection list - # Hotfix für Bug 1837 - Besser wäre es alte Buchungsbelege - # OHNE Auswahlliste (reines Textfeld) zu laden. Hilft aber auch - # nicht für veränderbare Belege (oe, do, ...) - my $obsolete = $self->{id} ? '' : "WHERE NOT obsolete"; - my $query = qq|SELECT count(*) FROM $table $obsolete|; - my ($count) = selectrow_query($self, $dbh, $query); - - if ($count <= $myconfig->{vclimit}) { - $query = qq|SELECT id, name, salesman_id - FROM $table $obsolete - ORDER BY name|; - $self->{"all_$table"} = selectall_hashref_query($self, $dbh, $query); - } - - # get self - $self->get_employee($dbh); - - # setup sales contacts - $query = qq|SELECT e.id, e.name - FROM employee e - WHERE (e.sales = '1') AND (NOT e.id = ?) - ORDER BY name|; - $self->{all_employees} = selectall_hashref_query($self, $dbh, $query, $self->{employee_id}); - - # this is for self - push(@{ $self->{all_employees} }, - { id => $self->{employee_id}, - name => $self->{employee} }); - - # prepare query for departments - $query = qq|SELECT id, description - FROM department - ORDER BY description|; - - $self->{all_departments} = selectall_hashref_query($self, $dbh, $query); - - # get languages - $query = qq|SELECT id, description - FROM language - ORDER BY id|; - - $self->{languages} = selectall_hashref_query($self, $dbh, $query); - - # get printer - $query = qq|SELECT printer_description, id - FROM printers - ORDER BY printer_description|; - - $self->{printers} = selectall_hashref_query($self, $dbh, $query); - - # get payment terms - $query = qq|SELECT id, description - FROM payment_terms - WHERE ( obsolete IS FALSE OR id = ? ) - ORDER BY sortkey |; - $self->{payment_terms} = selectall_hashref_query($self, $dbh, $query, $self->{payment_id} || undef); - - $main::lxdebug->leave_sub(); -} - sub new_lastmtime { $main::lxdebug->enter_sub(); -- 2.20.1