Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a46b8625

Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt

  • ID a46b862505a22713aff7b3c87cd9c01d4b40b44b
  • Vorgänger 04b77711
  • Nachfolger 34ff9415

ToDo-Liste: Anfragen und Angebote anzeigen, wenn Anseh-Recht vorhanden …

… Und Rechte getrennt nach Ein- und Verkauf berücksichtigen.

Unterschiede anzeigen:

SL/OE.pm
504 504
  my $query    = qq|SELECT id FROM employee WHERE login = ?|;
505 505
  my ($e_id)   = selectrow_query($form, $dbh, $query, $::myconfig{login});
506 506

  
507
  my $sales_purchase_filter  = 'AND (1 = 0';
508
  $sales_purchase_filter    .= $params{sales}    ? qq| OR customer_id IS NOT NULL| : '';
509
  $sales_purchase_filter    .= $params{purchase} ? qq| OR vendor_id   IS NOT NULL| : '';
510
  $sales_purchase_filter    .= ')';
511

  
507 512
  $query       =
508 513
    qq|SELECT oe.id, oe.transdate, oe.reqdate, oe.quonumber, oe.transaction_description, oe.amount,
509 514
         CASE WHEN (COALESCE(oe.customer_id, 0) = 0) THEN 'vendor' ELSE 'customer' END AS vc,
......
519 524
         AND ((oe.employee_id = ?) OR (oe.salesman_id = ?))
520 525
         AND NOT (oe.reqdate ISNULL)
521 526
         AND (oe.reqdate < current_date)
527
         $sales_purchase_filter
522 528
       ORDER BY transdate|;
523 529

  
524 530
  my $quotations = selectall_hashref_query($form, $dbh, $query, $e_id, $e_id);
SL/TODO.pm
40 40
    $cfg = { map { $_ => 1 } qw(show_after_login show_follow_ups show_follow_ups_login show_overdue_sales_quotations show_overdue_sales_quotations_login) };
41 41
  }
42 42

  
43
  if (! $main::auth->check_right($params{login}, 'sales_quotation_edit')) {
43
  if (! $main::auth->check_right($params{login}, 'sales_quotation_edit | sales_quotation_view | request_quotation_edit | request_quotation_view')) {
44 44
    map { delete $cfg->{$_} } qw(show_overdue_sales_quotations show_overdue_sales_quotations_login);
45 45
  }
46 46

  
bin/mozilla/oe.pl
2199 2199

  
2200 2200
  my $form     = $main::form;
2201 2201

  
2202
  my $quotations = OE->transactions_for_todo_list();
2202
  my $is_for_sales    = $::auth->assert($oe_view_access_map->{'sales_quotation'},   'may fail');
2203
  my $is_for_purchase = $::auth->assert($oe_view_access_map->{'request_quotation'}, 'may fail');
2204
  my $quotations      = OE->transactions_for_todo_list(sales => $is_for_sales, purchase => $is_for_purchase);
2203 2205
  my $content;
2204 2206

  
2205 2207
  if (@{ $quotations }) {

Auch abrufbar als: Unified diff