X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/c09536f461b4933a1813b2af5e17eb6214f7bf38..b68c23bf6e98cf678081dcaa84a8593b10aaff29:/SL/OE.pm diff --git a/SL/OE.pm b/SL/OE.pm index b731dc1cc..6cc4a5004 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -122,6 +122,10 @@ SQL push(@values, '%' . $form->{$vc} . '%'); } + if (!$main::auth->assert('sales_all_edit', 1)) { + $query .= " AND o.employee_id = (select id from employee where login= ?)"; + push @values, $form->{login}; + } if ($form->{employee_id}) { $query .= " AND o.employee_id = ?"; push @values, conv_i($form->{employee_id}); @@ -1277,6 +1281,39 @@ sub project_description { return $value; } +########################## +# Get data for the submitted order id +# from database +# +sub get_order_data_by_ordnumber { + $main::lxdebug->enter_sub(); + + my $self = shift; + my %params = @_; + + Common::check_params(\%params, qw(ordnumber)); + + my $form = $main::form; + my %myconfig = %main::myconfig; + my $dbh = $form->get_standard_dbh(); + + my @values = ($params{ordnumber}); + + # We query the database for the fields we need using the submitted "ordnumber" + my $query = <leave_sub(); + + return $result; +} + 1; __END__