[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc class.soreport.inc.php, 1.9, 1.10 class.
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] property/inc class.soreport.inc.php, 1.9, 1.10 class.soinvoice.inc.php, 1.38, 1.39 |
Date: |
Sun, 28 Sep 2003 17:12:44 +0000 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv10435/inc
Modified Files:
class.soreport.inc.php class.soinvoice.inc.php
Log Message:
no message
Index: class.soinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soinvoice.inc.php,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** class.soinvoice.inc.php 19 Sep 2003 17:50:46 -0000 1.38
--- class.soinvoice.inc.php 28 Sep 2003 17:12:41 -0000 1.39
***************
*** 210,215 ****
if($this->db->f('oppsynsmannid') &&
$this->db->f('oppsynsigndato'))
{
! $timestamp_jan_date
=
mktime(0,0,0,date(m,strtotime($this->db->f('oppsynsigndato'))),date(d,strtotime($this->db->f('oppsynsigndato'))),date(y,strtotime($this->db->f('oppsynsigndato'))));
! $invoice[$i]['jan_date']
=
$GLOBALS['phpgw']->common->show_date($timestamp_jan_date,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
}
else
--- 210,216 ----
if($this->db->f('oppsynsmannid') &&
$this->db->f('oppsynsigndato'))
{
! // $timestamp_jan_date
=
mktime(0,0,0,date(m,strtotime($this->db->f('oppsynsigndato'))),date(d,strtotime($this->db->f('oppsynsigndato'))),date(y,strtotime($this->db->f('oppsynsigndato'))));
! // $invoice[$i]['jan_date']
=
$GLOBALS['phpgw']->common->show_date($timestamp_jan_date,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
!
$invoice[$i]['jan_date']=date($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'],strtotime($this->db->f('oppsynsigndato')));
}
else
***************
*** 219,224 ****
if($this->db->f('saksbehandlerid') &&
$this->db->f('saksigndato'))
{
! $timestamp_super_date
=
mktime(0,0,0,date(m,strtotime($this->db->f('saksigndato'))),date(d,strtotime($this->db->f('saksigndato'))),date(y,strtotime($this->db->f('saksigndato'))));
! $invoice[$i]['super_date']
=
$GLOBALS['phpgw']->common->show_date($timestamp_super_date,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
}
else
--- 220,226 ----
if($this->db->f('saksbehandlerid') &&
$this->db->f('saksigndato'))
{
! // $timestamp_super_date
=
mktime(0,0,0,date(m,strtotime($this->db->f('saksigndato'))),date(d,strtotime($this->db->f('saksigndato'))),date(y,strtotime($this->db->f('saksigndato'))));
! // $invoice[$i]['super_date']
=
$GLOBALS['phpgw']->common->show_date($timestamp_super_date,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
!
$invoice[$i]['super_date']=date($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'],strtotime($this->db->f('saksigndato')));
}
else
***************
*** 229,234 ****
if($this->db->f('budsjettansvarligid')
&& $this->db->f('budsjettsigndato'))
{
! $timestamp_budget_date
=
mktime(0,0,0,date(m,strtotime($this->db->f('budsjettsigndato'))),date(d,strtotime($this->db->f('budsjettsigndato'))),date(y,strtotime($this->db->f('budsjettsigndato'))));
!
$invoice[$i]['budget_date'] =
$GLOBALS['phpgw']->common->show_date($timestamp_budget_date,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
}
else
--- 231,237 ----
if($this->db->f('budsjettansvarligid')
&& $this->db->f('budsjettsigndato'))
{
! // $timestamp_budget_date
=
mktime(0,0,0,date(m,strtotime($this->db->f('budsjettsigndato'))),date(d,strtotime($this->db->f('budsjettsigndato'))),date(y,strtotime($this->db->f('budsjettsigndato'))));
! //
$invoice[$i]['budget_date'] =
$GLOBALS['phpgw']->common->show_date($timestamp_budget_date,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
!
$invoice[$i]['budget_date']=date($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'],strtotime($this->db->f('budsjettsigndato')));
}
else
***************
*** 239,244 ****
if($this->db->f('utbetalingid') &&
$this->db->f('utbetalingsigndato'))
{
! $timestamp_transfer_date=
mktime(0,0,0,date(m,strtotime($this->db->f('utbetalingsigndato'))),date(d,strtotime($this->db->f('utbetalingsigndato'))),date(y,strtotime($this->db->f('utbetalingsigndato'))));
! $invoice[$i]['transfer_date']
=
$GLOBALS['phpgw']->common->show_date($timestamp_transfer_date,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
}
else
--- 242,250 ----
if($this->db->f('utbetalingid') &&
$this->db->f('utbetalingsigndato'))
{
! // $timestamp_transfer_date=
mktime(0,0,0,date(m,strtotime($this->db->f('utbetalingsigndato'))),date(d,strtotime($this->db->f('utbetalingsigndato'))),date(y,strtotime($this->db->f('utbetalingsigndato'))));
! // $invoice[$i]['transfer_date']
=
$GLOBALS['phpgw']->common->show_date($timestamp_transfer_date,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
!
$invoice[$i]['transfer_date']=date($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'],strtotime($this->db->f('utbetalingsigndato')));
!
!
}
else
***************
*** 274,286 ****
if($invoice[$i]['current_user']==$invoice[$i]['janitor'] &&
$invoice[$i]['jan_date']):
{
!
$invoice[$i]['sign_orig']='janitor';
}
elseif($invoice[$i]['current_user']==$invoice[$i]['supervisor'] &&
$invoice[$i]['super_date']):
{
!
$invoice[$i]['sign_orig']='supervisor';
}
elseif($invoice[$i]['current_user']==$invoice[$i]['budget_responsible'] &&
$invoice[$i]['budget_date']):
{
!
$invoice[$i]['sign_orig']='budget_responsible';
}
endif;
--- 280,292 ----
if($invoice[$i]['current_user']==$invoice[$i]['janitor'] &&
$invoice[$i]['jan_date']):
{
!
$invoice[$i]['sign_orig']='sign_janitor';
}
elseif($invoice[$i]['current_user']==$invoice[$i]['supervisor'] &&
$invoice[$i]['super_date']):
{
!
$invoice[$i]['sign_orig']='sign_supervisor';
}
elseif($invoice[$i]['current_user']==$invoice[$i]['budget_responsible'] &&
$invoice[$i]['budget_date']):
{
!
$invoice[$i]['sign_orig']='sign_budget_responsible';
}
endif;
Index: class.soreport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soreport.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** class.soreport.inc.php 26 Sep 2003 18:04:34 -0000 1.9
--- class.soreport.inc.php 28 Sep 2003 17:12:41 -0000 1.10
***************
*** 118,121 ****
--- 118,138 ----
$cols.= ",$entity_table.user_id";
+ if ($cat_id > 0)
+ {
+ $this->db->query("SELECT * FROM
fm_report_type_attrib where type_id=$cat_id AND list=1");
+ while ($this->db->next_record())
+ {
+ $uicols['input_type'][] =
'text';
+ $uicols['name'][]
= $this->db->f('name');
+ $uicols['descr'][]
= $this->db->f('name');
+ $uicols['statustext'][] =
$this->db->f('descr');
+ $cols_return_extra[]= array(
+ 'name' => $this->db->f('name'),
+ 'datatype' =>
$this->db->f('datatype'),
+ 'attrib_id' =>
$this->db->f('id')
+ );
+ }
+ }
+
$joinmethod .= " $this->join fm_report_type ON
($entity_table.report_type_id = fm_report_type.id))";
$paranthesis .='(';
***************
*** 199,202 ****
--- 216,225 ----
$this->cols_extra = $this->bocommon->cols_extra;
+ if(!$cat_id>0)
+ {
+ return;
+ }
+
+
$this->db2->query($sql,__LINE__,__FILE__);
$this->total_records = $this->db2->num_rows();
***************
*** 210,213 ****
--- 233,287 ----
$report_list[$j][$cols_return[$i]] =
$this->db->f($cols_return[$i]);
$report_list[$j]['grants'] =
(int)$this->grants[$this->db->f('user_id')];
+ }
+
+ for ($i=0;$i<count($cols_return_extra);$i++)
+ {
+
if($cols_return_extra[$i]['datatype']=='R'):
+ {
+ $sql="SELECT
fm_report_type_choice.value FROM fm_report_attrib $this->join
fm_report_type_choice on fm_report_attrib.r = fm_report_type_choice.id where
entity_id='" . $this->db->f('report_id') . "' AND fm_report_attrib.attrib_id="
. $cols_return_extra[$i]['attrib_id'];
+ $this->db2->query($sql);
+ $this->db2->next_record();
+
$report_list[$j][$cols_return_extra[$i]['name']] = $this->db2->f('value');
+ }
+
elseif($cols_return_extra[$i]['datatype']=='CH'):
+ {
+ $ch=array();
+ $ch_value=array();
+ $sql="SELECT ch FROM
fm_report_attrib where entity_id='" . $this->db->f('report_id') . "' AND
fm_report_attrib.attrib_id=" . $cols_return_extra[$i]['attrib_id'];
+ $this->db2->query($sql);
+ $this->db2->next_record();
+ if($this->db2->f('ch'))
+ {
+ $ch=
unserialize($this->db2->f('ch'));
+ }
+
+ for ($k=0;$k<count($ch);$k++)
+ {
+
+ $sql="SELECT value FROM
fm_report_type_choice where id=" . $ch[$k];
+ $this->db2->query($sql);
+ while
($this->db2->next_record())
+ {
+
$ch_value[]=$this->db2->f('value');
+ }
+ }
+
+
$report_list[$j][$cols_return_extra[$i]['name']] = @implode(",", $ch_value);
+ }
+ else:
+ {
+ $this->db2->query("SELECT
c,i,n,t,d FROM fm_report_attrib where entity_id='" . $this->db->f('report_id')
. "' AND attrib_id=" . $cols_return_extra[$i]['attrib_id'] );
+ $this->db2->next_record();
+ if($this->db2->f('d'))
+ {
+
$d=date($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'],strtotime($this->db2->f('d')));
+ }
+ else
+ {
+ $d='';
+ }
+
$report_list[$j][$cols_return_extra[$i]['name']] =
$this->db2->f('c').$this->db2->f('i').$this->db2->f('n').$this->db2->f('t').$d;
+ }
+ endif;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/inc class.soreport.inc.php, 1.9, 1.10 class.soinvoice.inc.php, 1.38, 1.39,
Sigurd Nes <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] phpgwapi/inc class.phpgw.inc.php, 1.42.4.2, 1.42.4.3
- Next by Date:
[Phpgroupware-cvs] phpgwapi/inc class.common.inc.php, 1.123.2.9.2.15, 1.123.2.9.2.16 class.nextmatchs.inc.php, 1.43.2.6.2.4, 1.43.2.6.2.5 class.sessions_db.inc.php, 1.2.2.10.2.7, 1.2.2.10.2.8 class.sessions_php4.inc.php, 1.6.2.10.2.7, 1.6.2.10.2.8 footer.inc.php, 1.17.2.2.2.4, 1.17.2.2.2.5 functions.inc.php, 1.121.2.13.2.12, 1.121.2.13.2.13
- Previous by thread:
[Phpgroupware-cvs] phpgwapi/inc class.phpgw.inc.php, 1.42.4.2, 1.42.4.3
- Next by thread:
[Phpgroupware-cvs] phpgwapi/inc class.common.inc.php, 1.123.2.9.2.15, 1.123.2.9.2.16 class.nextmatchs.inc.php, 1.43.2.6.2.4, 1.43.2.6.2.5 class.sessions_db.inc.php, 1.2.2.10.2.7, 1.2.2.10.2.8 class.sessions_php4.inc.php, 1.6.2.10.2.7, 1.6.2.10.2.8 footer.inc.php, 1.17.2.2.2.4, 1.17.2.2.2.5 functions.inc.php, 1.121.2.13.2.12, 1.121.2.13.2.13
- Index(es):