1 #=====================================================================
 
   4 # Based on SQL-Ledger Version 2.1.9
 
   5 # Web http://www.lx-office.org
 
   7 ######################################################################
 
   8 # SQL-Ledger Accounting
 
   9 # Copyright (c) 1998-2002
 
  11 #  Author: Dieter Simader
 
  12 #   Email: dsimader@sql-ledger.org
 
  13 #     Web: http://www.sql-ledger.org
 
  16 # This program is free software; you can redistribute it and/or modify
 
  17 # it under the terms of the GNU General Public License as published by
 
  18 # the Free Software Foundation; either version 2 of the License, or
 
  19 # (at your option) any later version.
 
  21 # This program is distributed in the hope that it will be useful,
 
  22 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 
  23 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
  24 # GNU General Public License for more details.
 
  25 # You should have received a copy of the GNU General Public License
 
  26 # along with this program; if not, write to the Free Software
 
  27 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
  28 #######################################################################
 
  32 sub create_todo_list {
 
  33   $lxdebug->enter_sub();
 
  36   my $postfix  = '_login' if ($params{login_screen});
 
  38   my %todo_cfg = TODO->get_user_config('login' => $form->{login});
 
  40   if ($params{login_screen} && !$todo_cfg{show_after_login}) {
 
  41     $lxdebug->leave_sub();
 
  45   my (@todo_items, $todo_list);
 
  47   push @todo_items, todo_list_follow_ups()               if ($todo_cfg{"show_follow_ups${postfix}"});
 
  48   push @todo_items, todo_list_overdue_sales_quotations() if ($todo_cfg{"show_overdue_sales_quotations${postfix}"});
 
  50   @todo_items = grep { $_ } @todo_items;
 
  51   $todo_list  = join("", @todo_items);
 
  53   $lxdebug->leave_sub();
 
  59   $lxdebug->enter_sub();
 
  61   $form->{todo_list} = create_todo_list();
 
  62   $form->{title}     = $locale->text('TODO list');
 
  65   print $form->parse_html_template('todo/show_todo_list');
 
  67   $lxdebug->leave_sub();
 
  70 sub todo_list_follow_ups {
 
  71   $lxdebug->enter_sub();
 
  73   require "bin/mozilla/fu.pl";
 
  75   my $content = report_for_todo_list();
 
  77   $lxdebug->leave_sub();
 
  82 sub todo_list_overdue_sales_quotations {
 
  83   $lxdebug->enter_sub();
 
  85   require "bin/mozilla/oe.pl";
 
  87   my $content = report_for_todo_list();
 
  89   $lxdebug->leave_sub();