Zwei neue Features:
[kivitendo-erp.git] / bin / mozilla / todo.pl
1 #=====================================================================
2 # LX-Office ERP
3 # Copyright (C) 2004
4 # Based on SQL-Ledger Version 2.1.9
5 # Web http://www.lx-office.org
6 #
7 ######################################################################
8 # SQL-Ledger Accounting
9 # Copyright (c) 1998-2002
10 #
11 #  Author: Dieter Simader
12 #   Email: dsimader@sql-ledger.org
13 #     Web: http://www.sql-ledger.org
14 #
15 #
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.
20 #
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 #######################################################################
29
30 sub create_todo_list {
31   $lxdebug->enter_sub();
32
33   my (@todo_items, $todo_list);
34
35   push @todo_items, todo_list_follow_ups();
36   push @todo_items, todo_list_overdue_sales_quotations();
37
38   @todo_items = grep { $_ } @todo_items;
39   $todo_list  = join("", @todo_items);
40
41   $lxdebug->leave_sub();
42
43   return $todo_list;
44 }
45
46 sub show_todo_list {
47   $lxdebug->enter_sub();
48
49   $form->{todo_list} = create_todo_list();
50   $form->{title}     = $locale->text('TODO list');
51
52   $form->header();
53   print $form->parse_html_template('todo/show_todo_list');
54
55   $lxdebug->leave_sub();
56 }
57
58 sub todo_list_follow_ups {
59   $lxdebug->enter_sub();
60
61   require "bin/mozilla/fu.pl";
62
63   my $content = report_for_todo_list();
64
65   $lxdebug->leave_sub();
66
67   return $content;
68 }
69
70 sub todo_list_overdue_sales_quotations {
71   $lxdebug->enter_sub();
72
73   require "bin/mozilla/oe.pl";
74
75   my $content = report_for_todo_list();
76
77   $lxdebug->leave_sub();
78
79   return $content;
80 }
81
82 1;