fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [14194]


From: Nelson Guerra
Subject: [Fmsystem-commits] [14194]
Date: Sat, 17 Oct 2015 00:19:33 +0000

Revision: 14194
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14194
Author:   nelson224
Date:     2015-10-17 00:19:32 +0000 (Sat, 17 Oct 2015)
Log Message:
-----------


Modified Paths:
--------------
    branches/dev-syncromind/booking/inc/class.uireports.inc.php

Modified: branches/dev-syncromind/booking/inc/class.uireports.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uireports.inc.php 2015-10-17 
00:19:16 UTC (rev 14193)
+++ branches/dev-syncromind/booking/inc/class.uireports.inc.php 2015-10-17 
00:19:32 UTC (rev 14194)
@@ -298,15 +298,15 @@
                        
self::set_active_menu('booking::reportcenter::participants');
                        $errors          = array();
                        $buildings       = $this->building_bo->read();
-                       $to                      = '2009-01-01';
-                       $from            = '2009-01-01';
 
                        if($_SERVER['REQUEST_METHOD'] == 'POST')
                        {
-
                                $to              = phpgw::get_var('to', 'POST');
                                $from    = phpgw::get_var('from', 'POST');
 
+                               $to_     = date("Y-m-d", 
phpgwapi_datetime::date_to_timestamp($to));
+                               $from_   = date("Y-m-d", 
phpgwapi_datetime::date_to_timestamp($from));
+                               
                                $output_type     = phpgw::get_var('otype', 
'POST');
                                $building_list   = phpgw::get_var('building', 
'POST');
 
@@ -317,7 +317,7 @@
 
                                if(!count($errors))
                                {
-                                       $jasper_parameters = 
sprintf("\"BK_DATE_FROM|%s;BK_DATE_TO|%s;BK_BUILDINGS|%s\"", $from, $to, 
implode(",", $building_list));
+                                       $jasper_parameters = 
sprintf("\"BK_DATE_FROM|%s;BK_DATE_TO|%s;BK_BUILDINGS|%s\"", $from_, $to_, 
implode(",", $building_list));
                                        // DEBUG
                                        //print_r($jasper_parameters);
                                        //exit(0);
@@ -336,15 +336,16 @@
                        }
                        else
                        {
-                               $to              = date("Y-m-d", time());
-                               $from    = date("Y-m-d", time());
+                               $to              = date($this->dateFormat, 
time());
+                               $from    = date($this->dateFormat, time());
                        }
+                       
+                       phpgwapi_cache::message_set($errors, 'error'); 
+                       //$this->flash_form_errors($errors);
 
-                       $this->flash_form_errors($errors);
+                       $GLOBALS['phpgw']->jqcal->add_listener('from', 'date');
+                       $GLOBALS['phpgw']->jqcal->add_listener('to', 'date');
 
-                       $GLOBALS['phpgw']->jqcal->add_listener('start_date', 
'date');
-                       $GLOBALS['phpgw']->jqcal->add_listener('end_date', 
'date');
-
                        $tabs                    = array();
                        $tabs['generic'] = array('label' => lang('Report 
Participants'), 'link' => '#report_part');
                        $active_tab              = 'generic';
@@ -365,9 +366,15 @@
                        $show = '';
                        if($_SERVER['REQUEST_METHOD'] == 'POST')
                        {
+                               $to              = phpgw::get_var('to', 'POST');
+                               $from    = phpgw::get_var('from', 'POST');
+
+                               $to_     = date("Y-m-d", 
phpgwapi_datetime::date_to_timestamp($to));
+                               $from_   = date("Y-m-d", 
phpgwapi_datetime::date_to_timestamp($from));
+                               
                                $show            = 'report';
                                $allocations = $this->get_free_allocations(
-                               phpgw::get_var('building', 'POST'), 
phpgw::get_var('from', 'POST'), phpgw::get_var('to', 'POST'), 
phpgw::get_var('weekdays', 'POST')
+                               phpgw::get_var('building', 'POST'), $from_, 
$to_, phpgw::get_var('weekdays', 'POST')
                                );
 
                                $counter = 0;
@@ -389,22 +396,21 @@
                                {
                                        $show            = 'gui';
                                        $errors[]        = lang('no records 
found.');
-                                       $to                      = 
phpgw::get_var('to', 'POST');
-                                       $from            = 
phpgw::get_var('from', 'POST');
                                }
                        }
                        else
                        {
-                               $to              = date("Y-m-d", time());
-                               $from    = date("Y-m-d", time());
+                               $to              = date($this->dateFormat, 
time());
+                               $from    = date($this->dateFormat, time());
                                $show    = 'gui';
                        }
+                       
+                       phpgwapi_cache::message_set($errors, 'error'); 
+                       //$this->flash_form_errors($errors);
 
-                       $this->flash_form_errors($errors);
+                       $GLOBALS['phpgw']->jqcal->add_listener('from', 'date');
+                       $GLOBALS['phpgw']->jqcal->add_listener('to', 'date');
 
-                       $GLOBALS['phpgw']->jqcal->add_listener('start_date', 
'date');
-                       $GLOBALS['phpgw']->jqcal->add_listener('end_date', 
'date');
-
                        $tabs                    = array();
                        $tabs['generic'] = array('label' => lang('Report 
FreeTime'), 'link' => '#report_freetime');
                        $active_tab              = 'generic';




reply via email to

[Prev in Thread] Current Thread [Next in Thread]