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
my $query = qq|SELECT id FROM employee WHERE login = ?|;
my ($e_id) = selectrow_query($form, $dbh, $query, $::myconfig{login});
my $sales_purchase_filter = 'AND (1 = 0';
$sales_purchase_filter .= $params{sales} ? qq| OR customer_id IS NOT NULL| : '';
$sales_purchase_filter .= $params{purchase} ? qq| OR vendor_id IS NOT NULL| : '';
$sales_purchase_filter .= ')';
$query =
qq|SELECT oe.id, oe.transdate, oe.reqdate, oe.quonumber, oe.transaction_description, oe.amount,
CASE WHEN (COALESCE(oe.customer_id, 0) = 0) THEN 'vendor' ELSE 'customer' END AS vc,
......
AND ((oe.employee_id = ?) OR (oe.salesman_id = ?))
AND NOT (oe.reqdate ISNULL)
AND (oe.reqdate < current_date)
$sales_purchase_filter
ORDER BY transdate|;
my $quotations = selectall_hashref_query($form, $dbh, $query, $e_id, $e_id);
SL/TODO.pm
$cfg = { map { $_ => 1 } qw(show_after_login show_follow_ups show_follow_ups_login show_overdue_sales_quotations show_overdue_sales_quotations_login) };
}
if (! $main::auth->check_right($params{login}, 'sales_quotation_edit')) {
if (! $main::auth->check_right($params{login}, 'sales_quotation_edit | sales_quotation_view | request_quotation_edit | request_quotation_view')) {
map { delete $cfg->{$_} } qw(show_overdue_sales_quotations show_overdue_sales_quotations_login);
}
bin/mozilla/oe.pl
my $form = $main::form;
my $quotations = OE->transactions_for_todo_list();
my $is_for_sales = $::auth->assert($oe_view_access_map->{'sales_quotation'}, 'may fail');
my $is_for_purchase = $::auth->assert($oe_view_access_map->{'request_quotation'}, 'may fail');
my $quotations = OE->transactions_for_todo_list(sales => $is_for_sales, purchase => $is_for_purchase);
my $content;
if (@{ $quotations }) {

Auch abrufbar als: Unified diff