phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] projects/inc class.sobilling.inc.php, 1.16, 1.17 clas


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] projects/inc class.sobilling.inc.php, 1.16, 1.17 class.sodeliveries.inc.php, 1.20, 1.21 class.soprojects.inc.php, 1.47, 1.48
Date: Fri, 14 Nov 2003 13:04:07 +0000

Update of /cvsroot/phpgroupware/projects/inc
In directory subversions:/tmp/cvs-serv4718/inc

Modified Files:
        class.sobilling.inc.php class.sodeliveries.inc.php 
        class.soprojects.inc.php 
Log Message:
sapdb support table column update

Index: class.sodeliveries.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.sodeliveries.inc.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** class.sodeliveries.inc.php  23 Oct 2003 12:15:42 -0000      1.20
--- class.sodeliveries.inc.php  14 Nov 2003 13:04:03 -0000      1.21
***************
*** 52,59 ****
                {
                        $values['delivery_num'] = 
$this->db->db_addslashes($values['delivery_num']);
!                       $this->db->query("INSERT INTO phpgw_p_delivery 
(num,project_id,date,customer,owner) VALUES ('" . $values['delivery_num'] . "',"
                                                        . 
intval($values['project_id']) . ',' . time() . ',' . 
intval($values['customer']) . ',' . $this->account . ')',__LINE__,__FILE__);
  
!                       $this->db2->query("SELECT id from phpgw_p_delivery 
WHERE num='" . $values['delivery_num'] . "'",__LINE__,__FILE__);
                        $this->db2->next_record();
                        $delivery_id = $this->db2->f('id');
--- 52,59 ----
                {
                        $values['delivery_num'] = 
$this->db->db_addslashes($values['delivery_num']);
!                       $this->db->query("INSERT INTO phpgw_p_delivery 
(d_number,project_id,d_date,customer,owner) VALUES ('" . 
$values['delivery_num'] . "',"
                                                        . 
intval($values['project_id']) . ',' . time() . ',' . 
intval($values['customer']) . ',' . $this->account . ')',__LINE__,__FILE__);
  
!                       $this->db2->query("SELECT id from phpgw_p_delivery 
WHERE d_number='" . $values['delivery_num'] . "'",__LINE__,__FILE__);
                        $this->db2->next_record();
                        $delivery_id = $this->db2->f('id');
***************
*** 75,79 ****
  
                        $values['delivery_num'] = 
$this->db->db_addslashes($values['delivery_num']);
!                       $this->db->query("UPDATE phpgw_p_delivery set num='" . 
$values['delivery_num'] . "',date=" . intval($values['date']) . ',customer='
                                                                . 
intval($values['customer']) . ' where id=' . 
$values['delivery_id'],__LINE__,__FILE__);
  
--- 75,79 ----
  
                        $values['delivery_num'] = 
$this->db->db_addslashes($values['delivery_num']);
!                       $this->db->query("UPDATE phpgw_p_delivery set 
d_number='" . $values['delivery_num'] . "',d_date=" . intval($values['date']) . 
',customer='
                                                                . 
intval($values['customer']) . ' where id=' . 
$values['delivery_id'],__LINE__,__FILE__);
  
***************
*** 175,202 ****
                        else
                        {
!                               $ordermethod = ' order by date asc';
                        }
  
                        if ($query)
                        {
!                               $querymethod = " AND (phpgw_p_delivery.num like 
'%$query%' OR phpgw_p_projects.title like '%$query%')";
                        }
  
                        if ($owner)
                        {
!                               $acl_select = ' AND phpgw_p_invoice.owner=' . 
$this->account;
                        }
  
                        if ($project_id)
                        {
!                               $sql = 'SELECT phpgw_p_delivery.id as 
id,phpgw_p_delivery.num,title,phpgw_p_delivery.date,'
!                                       . 
'phpgw_p_delivery.project_id,phpgw_p_delivery.customer FROM 
phpgw_p_delivery,phpgw_p_projects WHERE '
!                                       . 'phpgw_p_delivery.project_id=' . 
$project_id . ' AND phpgw_p_delivery.project_id=phpgw_p_projects.id';
                        }
                else
                        {
!                               $sql = 'SELECT phpgw_p_delivery.id as 
id,phpgw_p_delivery.num,title,phpgw_p_delivery.date,'
!                                       . 
'phpgw_p_delivery.project_id,phpgw_p_delivery.customer FROM 
phpgw_p_delivery,phpgw_p_projects WHERE '
!                                       . 
'phpgw_p_delivery.project_id=phpgw_p_projects.id';
                        }
  
--- 175,201 ----
                        else
                        {
!                               $ordermethod = ' order by d_date asc';
                        }
  
                        if ($query)
                        {
!                               $querymethod = " AND (d_number like '%$query%' 
OR title like '%$query%')";
                        }
  
                        if ($owner)
                        {
!                               $acl_select = ' AND phpgw_p_delivery.owner=' . 
$this->account;
                        }
  
                        if ($project_id)
                        {
!                               $sql = 'SELECT phpgw_p_delivery.id as 
id,d_number,title,d_date,phpgw_p_delivery.project_id,phpgw_p_delivery.customer '
!                                       . 'FROM 
phpgw_p_delivery,phpgw_p_projects WHERE phpgw_p_delivery.project_id=' . 
$project_id
!                                       . ' AND 
phpgw_p_delivery.project_id=phpgw_p_projects.id';
                        }
                else
                        {
!                               $sql = 'SELECT phpgw_p_delivery.id as 
id,d_number,title,d_date,phpgw_p_delivery.project_id,phpgw_p_delivery.customer '
!                                       . 'FROM 
phpgw_p_delivery,phpgw_p_projects WHERE 
phpgw_p_delivery.project_id=phpgw_p_projects.id';
                        }
  
***************
*** 219,225 ****
                                        'delivery_id'   => $this->db->f('id'),
                                        'project_id'    => 
$this->db->f('project_id'),
!                                       'delivery_num'  => $this->db->f('num'),
                                        'title'                 => 
$this->db->f('title'),
!                                       'date'                  => 
$this->db->f('date'),
                                        'customer'              => 
$this->db->f('customer')
                                );
--- 218,224 ----
                                        'delivery_id'   => $this->db->f('id'),
                                        'project_id'    => 
$this->db->f('project_id'),
!                                       'delivery_num'  => 
$this->db->f('d_number'),
                                        'title'                 => 
$this->db->f('title'),
!                                       'date'                  => 
$this->db->f('d_date'),
                                        'customer'              => 
$this->db->f('customer')
                                );
***************
*** 230,245 ****
                function read_single_delivery($delivery_id)
                {
!                       $this->db->query('SELECT 
phpgw_p_delivery.customer,phpgw_p_delivery.num,phpgw_p_delivery.project_id,phpgw_p_delivery.date,'
!                                                       . 
'phpgw_p_projects.title,phpgw_p_projects.num as pnum FROM 
phpgw_p_delivery,phpgw_p_projects WHERE '
!                                                       . 
'phpgw_p_delivery.id=' . intval($delivery_id) . ' AND 
phpgw_p_delivery.project_id=phpgw_p_projects.id',__LINE__,__FILE__);
  
                        if ($this->db->next_record())
                        {
                                $del['date']                    = 
$this->db->f('date');
!                               $del['delivery_num']    = $this->db->f('num');
                                $del['title']                   = 
$this->db->f('title');
                                $del['customer']                = 
$this->db->f('customer');
                                $del['project_id']              = 
$this->db->f('project_id');
!                               $del['project_num']             = 
$this->db->f('pnum');
                        }
                        return $del;
--- 229,244 ----
                function read_single_delivery($delivery_id)
                {
!                       $this->db->query('SELECT 
phpgw_p_delivery.customer,d_number,phpgw_p_delivery.project_id,d_date,title,p_number
 '
!                                                       . 'FROM 
phpgw_p_delivery,phpgw_p_projects WHERE phpgw_p_delivery.id=' . 
intval($delivery_id)
!                                                       . ' AND 
phpgw_p_delivery.project_id=phpgw_p_projects.id',__LINE__,__FILE__);
  
                        if ($this->db->next_record())
                        {
                                $del['date']                    = 
$this->db->f('date');
!                               $del['delivery_num']    = 
$this->db->f('d_number');
                                $del['title']                   = 
$this->db->f('title');
                                $del['customer']                = 
$this->db->f('customer');
                                $del['project_id']              = 
$this->db->f('project_id');
!                               $del['project_num']             = 
$this->db->f('p_number');
                        }
                        return $del;
***************
*** 254,258 ****
                                $editexists = ' and id !=' . 
$values['delivery_id'];
                        }
!                       $this->db->query("select count(*) from phpgw_p_delivery 
where num='" . $values['delivery_num'] . "'" . $editexists,__LINE__,__FILE__);
  
                        $this->db->next_record();
--- 253,257 ----
                                $editexists = ' and id !=' . 
$values['delivery_id'];
                        }
!                       $this->db->query("select count(*) from phpgw_p_delivery 
where d_number='" . $values['delivery_num'] . "'" . 
$editexists,__LINE__,__FILE__);
  
                        $this->db->next_record();

Index: class.sobilling.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.sobilling.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** class.sobilling.inc.php     23 Oct 2003 12:15:42 -0000      1.16
--- class.sobilling.inc.php     14 Nov 2003 13:04:03 -0000      1.17
***************
*** 67,76 ****
                        else
                        {
!                               $ordermethod = ' order by date asc';
                        }
  
                        if ($query)
                        {
!                               $querymethod = " AND (phpgw_p_invoice.num like 
'%$query%' OR title like '%$query%' " . "OR sum like '%$query%') ";
                        }
  
--- 67,76 ----
                        else
                        {
!                               $ordermethod = ' order by i_date asc';
                        }
  
                        if ($query)
                        {
!                               $querymethod = " AND (i_number like '%$query%' 
OR title like '%$query%' " . "OR sum like '%$query%') ";
                        }
  
***************
*** 82,93 ****
                        if ($project_id)
                        {
!                               $sql = 'SELECT phpgw_p_invoice.id as 
id,phpgw_p_invoice.num,title,phpgw_p_invoice.date,sum,phpgw_p_invoice.project_id,'
!                               . 'phpgw_p_invoice.customer FROM 
phpgw_p_invoice,phpgw_p_projects WHERE 
phpgw_p_invoice.project_id=phpgw_p_projects.id '
!                               . 'AND phpgw_p_projects.id=' . $project_id . ' 
AND phpgw_p_invoice.project_id=' . $project_id;
                        }
                        else
                        {
!                               $sql = 'SELECT phpgw_p_invoice.id as 
id,phpgw_p_invoice.num,title,phpgw_p_invoice.date,sum,phpgw_p_invoice.project_id,'
!                               . 'phpgw_p_invoice.customer FROM 
phpgw_p_invoice,phpgw_p_projects WHERE 
phpgw_p_invoice.project_id=phpgw_p_projects.id';
                        }
  
--- 82,93 ----
                        if ($project_id)
                        {
!                               $sql = 'SELECT phpgw_p_invoice.id as 
id,i_number,i_date,phpgw_p_invoice.project_id,phpgw_p_invoice.customer,sum,title
 '
!                                       . 'FROM 
phpgw_p_invoice,phpgw_p_projects WHERE 
phpgw_p_invoice.project_id=phpgw_p_projects.id '
!                                       . 'AND phpgw_p_projects.id=' . 
$project_id . ' AND phpgw_p_invoice.project_id=' . $project_id;
                        }
                        else
                        {
!                               $sql = 'SELECT phpgw_p_invoice.id as 
id,i_number,title,i_date,sum,phpgw_p_invoice.project_id,phpgw_p_invoice.customer
 '
!                                       . 'FROM 
phpgw_p_invoice,phpgw_p_projects WHERE 
phpgw_p_invoice.project_id=phpgw_p_projects.id';
                        }
  
***************
*** 109,115 ****
                                (
                                        'invoice_id'    => $this->db->f('id'),
!                                       'invoice_num'   => $this->db->f('num'),
                                        'title'                 => 
$this->db->f('title'),
!                                       'date'                  => 
$this->db->f('date'),
                                        'sum'                   => 
$this->db->f('sum'),
                                        'project_id'    => 
$this->db->f('project_id'),
--- 109,115 ----
                                (
                                        'invoice_id'    => $this->db->f('id'),
!                                       'invoice_num'   => 
$this->db->f('i_number'),
                                        'title'                 => 
$this->db->f('title'),
!                                       'date'                  => 
$this->db->f('i_date'),
                                        'sum'                   => 
$this->db->f('sum'),
                                        'project_id'    => 
$this->db->f('project_id'),
***************
*** 129,133 ****
                        }
  
!                       $this->db->query("select count(*) from phpgw_p_invoice 
where num='" . $values['invoice_num'] . "'" . $editexists,__LINE__,__FILE__);
  
                        $this->db->next_record();
--- 129,133 ----
                        }
  
!                       $this->db->query("select count(*) from phpgw_p_invoice 
where i_number='" . $values['invoice_num'] . "'" . 
$editexists,__LINE__,__FILE__);
  
                        $this->db->next_record();
***************
*** 146,153 ****
                {
                        $values['invoice_num'] = 
$this->db->db_addslashes($values['invoice_num']);
!                       $this->db->query("INSERT INTO phpgw_p_invoice 
(num,sum,project_id,customer,date,owner) VALUES ('" . $values['invoice_num'] . 
"',0,"
                                                        . 
intval($values['project_id']) . ',' . intval($values['customer']) . ',' . 
intval($values['date']) . ',' . $this->account . ')',__LINE__,__FILE__);
  
!                       $this->db2->query("SELECT id from phpgw_p_invoice WHERE 
num='" . $values['invoice_num'] . "'",__LINE__,__FILE__);
                        $this->db2->next_record();
                        $invoice_id = $this->db2->f('id');
--- 146,153 ----
                {
                        $values['invoice_num'] = 
$this->db->db_addslashes($values['invoice_num']);
!                       $this->db->query("INSERT INTO phpgw_p_invoice 
(i_number,sum,project_id,customer,i_date,owner) VALUES ('" . 
$values['invoice_num'] . "',0,"
                                                        . 
intval($values['project_id']) . ',' . intval($values['customer']) . ',' . 
intval($values['date']) . ',' . $this->account . ')',__LINE__,__FILE__);
  
!                       $this->db2->query("SELECT id from phpgw_p_invoice WHERE 
i_number='" . $values['invoice_num'] . "'",__LINE__,__FILE__);
                        $this->db2->next_record();
                        $invoice_id = $this->db2->f('id');
***************
*** 186,190 ****
                        $values['invoice_id']   = intval($values['invoice_id']);
  
!                       $this->db->query("UPDATE phpgw_p_invoice set num='" . 
$values['invoice_num'] . "',date=" . intval($values['date']) . ',customer='
                                                        . 
intval($values['customer']) . ' WHERE id=' . 
$values['invoice_id'],__LINE__,__FILE__);
  
--- 186,190 ----
                        $values['invoice_id']   = intval($values['invoice_id']);
  
!                       $this->db->query("UPDATE phpgw_p_invoice set 
i_number='" . $values['invoice_num'] . "',i_date=" . intval($values['date']) . 
',customer='
                                                        . 
intval($values['customer']) . ' WHERE id=' . 
$values['invoice_id'],__LINE__,__FILE__);
  
***************
*** 299,314 ****
                function read_single_invoice($invoice_id)
                {
!                       $this->db->query('SELECT 
phpgw_p_invoice.customer,phpgw_p_invoice.num,phpgw_p_invoice.project_id,phpgw_p_invoice.date,'
!                                                       . 
'phpgw_p_invoice.sum,phpgw_p_projects.title,phpgw_p_projects.num as pnum FROM 
phpgw_p_invoice,phpgw_p_projects WHERE '
                                                        . 'phpgw_p_invoice.id=' 
. intval($invoice_id) . ' AND 
phpgw_p_invoice.project_id=phpgw_p_projects.id',__LINE__,__FILE__);
  
                        if ($this->db->next_record())
                        {
!                               $bill['date']                   = 
$this->db->f('date');
!                               $bill['invoice_num']    = $this->db->f('num');
                                $bill['title']                  = 
$this->db->f('title');
                                $bill['customer']               = 
$this->db->f('customer');
                                $bill['project_id']             = 
$this->db->f('project_id');
!                               $bill['project_num']    = $this->db->f('pnum');
                                $bill['sum']                    = 
$this->db->f('sum');
                        }
--- 299,314 ----
                function read_single_invoice($invoice_id)
                {
!                       $this->db->query('SELECT 
phpgw_p_invoice.customer,phpgw_p_invoice.i_number,phpgw_p_invoice.project_id,phpgw_p_invoice.i_date,'
!                                                       . 
'phpgw_p_invoice.sum,phpgw_p_projects.title,phpgw_p_projects.p_number FROM 
phpgw_p_invoice,phpgw_p_projects WHERE '
                                                        . 'phpgw_p_invoice.id=' 
. intval($invoice_id) . ' AND 
phpgw_p_invoice.project_id=phpgw_p_projects.id',__LINE__,__FILE__);
  
                        if ($this->db->next_record())
                        {
!                               $bill['date']                   = 
$this->db->f('i_date');
!                               $bill['invoice_num']    = 
$this->db->f('i_number');
                                $bill['title']                  = 
$this->db->f('title');
                                $bill['customer']               = 
$this->db->f('customer');
                                $bill['project_id']             = 
$this->db->f('project_id');
!                               $bill['project_num']    = 
$this->db->f('p_number');
                                $bill['sum']                    = 
$this->db->f('sum');
                        }

Index: class.soprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.soprojects.inc.php,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** class.soprojects.inc.php    23 Sep 2003 23:43:44 -0000      1.47
--- class.soprojects.inc.php    14 Nov 2003 13:04:03 -0000      1.48
***************
*** 324,328 ****
  
                        $this->db->query('INSERT into phpgw_p_projects 
(owner,access,category,entry_date,start_date,end_date,coordinator,customer,status,'
!                                                       . 
'descr,title,budget,num,parent,time_planned,date_created,processor,investment_nr,pcosts,main,level,previous)
 VALUES (' . $this->account
                                                        . ",'" . 
(isset($values['access'])?$values['access']:'public') . "'," . 
intval($values['cat']) . ',' . time() . ',' . intval($values['sdate']) . ','
                                                        . 
intval($values['edate']) . ',' . intval($values['coordinator']) . ',' . 
intval($values['customer']) . ",'" . $values['status']
--- 324,328 ----
  
                        $this->db->query('INSERT into phpgw_p_projects 
(owner,access,category,entry_date,start_date,end_date,coordinator,customer,status,'
!                                                       . 
'descr,title,budget,p_number,parent,time_planned,date_created,processor,investment_nr,pcosts,main,level,previous)
 VALUES (' . $this->account
                                                        . ",'" . 
(isset($values['access'])?$values['access']:'public') . "'," . 
intval($values['cat']) . ',' . time() . ',' . intval($values['sdate']) . ','
                                                        . 
intval($values['edate']) . ',' . intval($values['coordinator']) . ',' . 
intval($values['customer']) . ",'" . $values['status']
***************
*** 485,489 ****
                                                        . time() . ", 
start_date=" . intval($values['sdate']) . ", end_date=" . 
intval($values['edate']) . ", coordinator="
                                                        . 
intval($values['coordinator']) . ", customer=" . intval($values['customer']) . 
", status='" . $values['status'] . "', descr='"
!                                                       . $values['descr'] . 
"', title='" . $values['title'] . "', budget=" . $values['budget'] . ", num='"
                                                        . $values['number'] . 
"', time_planned=" . intval($values['ptime']) . ', processor=' . $this->account 
. ", investment_nr='"
                                                        . 
$values['investment_nr'] . "', pcosts=" . $values['pcosts'] . ', parent=' . 
$values['parent']
--- 485,489 ----
                                                        . time() . ", 
start_date=" . intval($values['sdate']) . ", end_date=" . 
intval($values['edate']) . ", coordinator="
                                                        . 
intval($values['coordinator']) . ", customer=" . intval($values['customer']) . 
", status='" . $values['status'] . "', descr='"
!                                                       . $values['descr'] . 
"', title='" . $values['title'] . "', budget=" . $values['budget'] . ", 
p_number='"
                                                        . $values['number'] . 
"', time_planned=" . intval($values['ptime']) . ', processor=' . $this->account 
. ", investment_nr='"
                                                        . 
$values['investment_nr'] . "', pcosts=" . $values['pcosts'] . ', parent=' . 
$values['parent']
***************
*** 600,604 ****
                        }
  
!                       $this->db->query('SELECT 
phpgw_p_activities.id,num,descr,billperae,activity_id from 
phpgw_p_activities,phpgw_p_projectactivities '
                                                        . 'WHERE 
phpgw_p_projectactivities.project_id=' . $project_id . ' AND 
phpgw_p_activities.id='
                                                        . 
'phpgw_p_projectactivities.activity_id' . $bill_filter,__LINE__,__FILE__);
--- 600,604 ----
                        }
  
!                       $this->db->query('SELECT 
phpgw_p_activities.id,a_number,descr,billperae,activity_id from 
phpgw_p_activities,phpgw_p_projectactivities '
                                                        . 'WHERE 
phpgw_p_projectactivities.project_id=' . $project_id . ' AND 
phpgw_p_activities.id='
                                                        . 
'phpgw_p_projectactivities.activity_id' . $bill_filter,__LINE__,__FILE__);
***************
*** 608,612 ****
                                $act[] = array
                                (
!                                       'num'           => $this->db->f('num'),
                                        'descr'         => 
$this->db->f('descr'),
                                        'billperae'     => 
$this->db->f('billperae')
--- 608,612 ----
                                $act[] = array
                                (
!                                       'num'           => 
$this->db->f('a_number'),
                                        'descr'         => 
$this->db->f('descr'),
                                        'billperae'     => 
$this->db->f('billperae')
***************
*** 633,637 ****
                        }
  
!                       $this->db->query('SELECT id,num,descr,billperae FROM 
phpgw_p_activities ORDER BY descr asc');
                        while ($this->db->next_record())
                        {
--- 633,637 ----
                        }
  
!                       $this->db->query('SELECT id,a_number,descr,billperae 
FROM phpgw_p_activities ORDER BY descr asc');
                        while ($this->db->next_record())
                        {
***************
*** 645,649 ****
                                }
                                $activities_list .= '>' . 
$GLOBALS['phpgw']->strip_html($this->db->f('descr')) . ' ['
!                                                                               
. $GLOBALS['phpgw']->strip_html($this->db->f('num')) . ']';
                                if($billable)
                                {
--- 645,649 ----
                                }
                                $activities_list .= '>' . 
$GLOBALS['phpgw']->strip_html($this->db->f('descr')) . ' ['
!                                                                               
. $GLOBALS['phpgw']->strip_html($this->db->f('a_number')) . ']';
                                if($billable)
                                {
***************
*** 673,677 ****
                        }
  
!                       $this->db->query('SELECT a.id, a.num, a.descr, 
a.billperae, pa.activity_id FROM phpgw_p_activities as a, 
phpgw_p_projectactivities as pa'
                                                        . ' WHERE 
pa.project_id=' . intval($pro_parent) . $bill_filter . ' AND 
pa.activity_id=a.id ORDER BY a.descr asc');
                        while ($this->db->next_record())
--- 673,677 ----
                        }
  
!                       $this->db->query('SELECT a.id, a.a_number, a.descr, 
a.billperae, pa.activity_id FROM phpgw_p_activities as a, 
phpgw_p_projectactivities as pa'
                                                        . ' WHERE 
pa.project_id=' . intval($pro_parent) . $bill_filter . ' AND 
pa.activity_id=a.id ORDER BY a.descr asc');
                        while ($this->db->next_record())
***************
*** 692,696 ****
  
                                $activities_list .= '>' . 
$GLOBALS['phpgw']->strip_html($this->db->f('descr')) . ' ['
!                                                                               
. $GLOBALS['phpgw']->strip_html($this->db->f('num')) . ']';
  
                                if($billable)
--- 692,696 ----
  
                                $activities_list .= '>' . 
$GLOBALS['phpgw']->strip_html($this->db->f('descr')) . ' ['
!                                                                               
. $GLOBALS['phpgw']->strip_html($this->db->f('a_number')) . ']';
  
                                if($billable)
***************
*** 706,710 ****
                function select_hours_activities($project_id, $activity = '')
                {
!                       $this->db->query('SELECT activity_id,num, 
descr,billperae,billable FROM phpgw_p_projectactivities,phpgw_p_activities 
WHERE project_id ='
                                                        . intval($project_id) . 
' AND phpgw_p_projectactivities.activity_id=phpgw_p_activities.id order by 
descr asc',__LINE__,__FILE__);
  
--- 706,710 ----
                function select_hours_activities($project_id, $activity = '')
                {
!                       $this->db->query('SELECT 
activity_id,a_number,descr,billperae,billable FROM 
phpgw_p_projectactivities,phpgw_p_activities WHERE project_id ='
                                                        . intval($project_id) . 
' AND phpgw_p_projectactivities.activity_id=phpgw_p_activities.id order by 
descr asc',__LINE__,__FILE__);
  
***************
*** 717,721 ****
                                }
                                $hours_act .= '>' . 
$GLOBALS['phpgw']->strip_html($this->db->f('descr')) . ' ['
!                                                                       . 
$GLOBALS['phpgw']->strip_html($this->db->f('num')) . ']';
  
                                if($this->db->f('billable') == 'Y')
--- 717,721 ----
                                }
                                $hours_act .= '>' . 
$GLOBALS['phpgw']->strip_html($this->db->f('descr')) . ' ['
!                                                                       . 
$GLOBALS['phpgw']->strip_html($this->db->f('p_number')) . ']';
  
                                if($this->db->f('billable') == 'Y')
***************
*** 733,740 ****
                        if ($action == 'act')
                        {                       
!                               $this->db->query('SELECT num,descr from 
phpgw_p_activities where id=' . $pro_id,__LINE__,__FILE__);
                                if ($this->db->next_record())
                                {
!                                       $bla = 
$GLOBALS['phpgw']->strip_html($this->db->f('descr')) . ' [' . 
$GLOBALS['phpgw']->strip_html($this->db->f('num')) . ']';
                                }
                        }
--- 733,740 ----
                        if ($action == 'act')
                        {                       
!                               $this->db->query('SELECT a_number,descr from 
phpgw_p_activities where id=' . $pro_id,__LINE__,__FILE__);
                                if ($this->db->next_record())
                                {
!                                       $bla = 
$GLOBALS['phpgw']->strip_html($this->db->f('descr')) . ' [' . 
$GLOBALS['phpgw']->strip_html($this->db->f('a_number')) . ']';
                                }
                        }
***************
*** 751,755 ****
                                switch ($action)
                                {
!                                       case 'pro':                     $column 
= 'num,title'; break;
                                        case 'edate':           $column = 
'end_date'; break;
                                        case 'sdate':           $column = 
'start_date'; break;
--- 751,755 ----
                                switch ($action)
                                {
!                                       case 'pro':                     $column 
= 'p_number,title'; break;
                                        case 'edate':           $column = 
'end_date'; break;
                                        case 'sdate':           $column = 
'start_date'; break;
***************
*** 781,786 ****
                        switch ($action)
                        {
!                               case 'act'      : $p_table = ' 
phpgw_p_activities '; break;
!                               default         : $p_table = ' 
phpgw_p_projects'; break;
                        }
  
--- 781,786 ----
                        switch ($action)
                        {
!                               case 'act'      : $p_table = ' 
phpgw_p_activities '; $column = ' a_number';break;
!                               default         : $p_table = ' 
phpgw_p_projects'; $column = ' p_number'; break;
                        }
  
***************
*** 792,796 ****
                                }
  
!                               $this->db->query("select count(*) from $p_table 
where num='$num'" .  $editexists,__LINE__,__FILE__);
                        }
  
--- 792,796 ----
                                }
  
!                               $this->db->query("select count(*) from $p_table 
where $column='$num'" .  $editexists,__LINE__,__FILE__);
                        }
  
***************
*** 972,976 ****
                        $prefix = 'P-' . $this->year . '-';
  
!                       $this->db->query("select max(num) from phpgw_p_projects 
where num like ('$prefix%') and parent=0");
                        $this->db->next_record();
                        $max = 
$this->add_leading_zero(substr($this->db->f(0),-4));
--- 972,976 ----
                        $prefix = 'P-' . $this->year . '-';
  
!                       $this->db->query("select max(p_number) from 
phpgw_p_projects where p_number like ('$prefix%') and parent=0");
                        $this->db->next_record();
                        $max = 
$this->add_leading_zero(substr($this->db->f(0),-4));
***************
*** 981,989 ****
                function create_jobid($pro_parent)
                {
!                       $this->db->query('select num from phpgw_p_projects 
where id=' . $pro_parent);
                        $this->db->next_record();
                        $prefix = $this->db->f('num') . '/';
  
!                       $this->db->query("select max(num) from phpgw_p_projects 
where num like ('$prefix%')");
                        $this->db->next_record();
                        $max = 
$this->add_leading_zero(substr($this->db->f(0),-4));
--- 981,989 ----
                function create_jobid($pro_parent)
                {
!                       $this->db->query('select p_number from phpgw_p_projects 
where id=' . $pro_parent);
                        $this->db->next_record();
                        $prefix = $this->db->f('num') . '/';
  
!                       $this->db->query("select max(p_number) from 
phpgw_p_projects where p_number like ('$prefix%')");
                        $this->db->next_record();
                        $max = 
$this->add_leading_zero(substr($this->db->f(0),-4));
***************
*** 996,1000 ****
                        $prefix = 'A-' . $this->year . '-';
  
!                       $this->db->query("select max(num) from 
phpgw_p_activities where num like ('$prefix%')");
                        $this->db->next_record();
                        $max = 
$this->add_leading_zero(substr($this->db->f(0),-4));
--- 996,1000 ----
                        $prefix = 'A-' . $this->year . '-';
  
!                       $this->db->query("select max(a_number) from 
phpgw_p_activities where a_number like ('$prefix%')");
                        $this->db->next_record();
                        $max = 
$this->add_leading_zero(substr($this->db->f(0),-4));
***************
*** 1006,1010 ****
                {
                        $prefix = 'D-' . $this->year . '-';
!                       $this->db->query("select max(num) from phpgw_p_delivery 
where num like ('$prefix%')");
                        $this->db->next_record();
                        $max = 
$this->add_leading_zero(substr($this->db->f(0),-4));
--- 1006,1010 ----
                {
                        $prefix = 'D-' . $this->year . '-';
!                       $this->db->query("select max(d_number) from 
phpgw_p_delivery where d_number like ('$prefix%')");
                        $this->db->next_record();
                        $max = 
$this->add_leading_zero(substr($this->db->f(0),-4));
***************
*** 1016,1020 ****
                {
                        $prefix = 'I-' . $this->year . '-';
!                       $this->db->query("select max(num) from phpgw_p_invoice 
where num like ('$prefix%')");
                        $this->db->next_record();
                        $max = 
$this->add_leading_zero(substr($this->db->f(0),-4));
--- 1016,1020 ----
                {
                        $prefix = 'I-' . $this->year . '-';
!                       $this->db->query("select max(i_number) from 
phpgw_p_invoice where i_number like ('$prefix%')");
                        $this->db->next_record();
                        $max = 
$this->add_leading_zero(substr($this->db->f(0),-4));
***************
*** 1036,1040 ****
                        if ($query)
                        {
!                               $filtermethod = " where (descr like '%$query%' 
or num like '%$query%' or minperae like '%$query%' or billperae like 
'%$query%')";
  
                                if ($cat_id)
--- 1036,1040 ----
                        if ($query)
                        {
!                               $filtermethod = " where (descr like '%$query%' 
or a_number like '%$query%' or minperae like '%$query%' or billperae like 
'%$query%')";
  
                                if ($cat_id)
***************
*** 1069,1073 ****
                                $act[$i]['activity_id'] = $this->db->f('id');
                                $act[$i]['cat']                 = 
$this->db->f('category');
!                               $act[$i]['number']              = 
$this->db->f('num');
                                $act[$i]['descr']               = 
$this->db->f('descr');
                                $act[$i]['remarkreq']   = 
$this->db->f('remarkreq');
--- 1069,1073 ----
                                $act[$i]['activity_id'] = $this->db->f('id');
                                $act[$i]['cat']                 = 
$this->db->f('category');
!                               $act[$i]['number']              = 
$this->db->f('a_number');
                                $act[$i]['descr']               = 
$this->db->f('descr');
                                $act[$i]['remarkreq']   = 
$this->db->f('remarkreq');
***************
*** 1087,1091 ****
                                $act['activity_id']     = $this->db->f('id');
                                $act['cat']                     = 
$this->db->f('category');
!                               $act['number']          = $this->db->f('num');
                                $act['descr']           = $this->db->f('descr');
                                $act['remarkreq']       = 
$this->db->f('remarkreq');
--- 1087,1091 ----
                                $act['activity_id']     = $this->db->f('id');
                                $act['cat']                     = 
$this->db->f('category');
!                               $act['number']          = 
$this->db->f('a_number');
                                $act['descr']           = $this->db->f('descr');
                                $act['remarkreq']       = 
$this->db->f('remarkreq');
***************
*** 1102,1106 ****
                        $values['billperae']    = $values['billperae'] + 0.0;
  
!                       $this->db->query("insert into phpgw_p_activities 
(num,category,descr,remarkreq,billperae,minperae) values ('"
                                                        . $values['number'] . 
"'," . intval($values['cat']) . ",'" . $values['descr'] . "','" . 
$values['remarkreq'] . "',"
                                                        . $values['billperae'] 
. ','  . intval($values['minperae']) . ')',__LINE__,__FILE__);
--- 1102,1106 ----
                        $values['billperae']    = $values['billperae'] + 0.0;
  
!                       $this->db->query("insert into phpgw_p_activities 
(a_number,category,descr,remarkreq,billperae,minperae) values ('"
                                                        . $values['number'] . 
"'," . intval($values['cat']) . ",'" . $values['descr'] . "','" . 
$values['remarkreq'] . "',"
                                                        . $values['billperae'] 
. ','  . intval($values['minperae']) . ')',__LINE__,__FILE__);
***************
*** 1113,1117 ****
                        $values['billperae']    = $values['billperae'] + 0.0;
  
!                       $this->db->query("update phpgw_p_activities set num='" 
. $values['number'] . "', category=" . intval($values['cat'])
                                                        . ",remarkreq='" . 
$values['remarkreq'] . "',descr='" . $values['descr'] . "',billperae="
                                                        . $values['billperae'] 
. ',minperae=' . intval($values['minperae']) . ' where id=' . 
intval($values['activity_id']),__LINE__,__FILE__);
--- 1113,1117 ----
                        $values['billperae']    = $values['billperae'] + 0.0;
  
!                       $this->db->query("update phpgw_p_activities set 
a_number='" . $values['number'] . "', category=" . intval($values['cat'])
                                                        . ",remarkreq='" . 
$values['remarkreq'] . "',descr='" . $values['descr'] . "',billperae="
                                                        . $values['billperae'] 
. ',minperae=' . intval($values['minperae']) . ' where id=' . 
intval($values['activity_id']),__LINE__,__FILE__);





reply via email to

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