phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] projects/inc class.bobilling.inc.php, 1.9, 1.10 class


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] projects/inc class.bobilling.inc.php, 1.9, 1.10 class.bodeliveries.inc.php, 1.18, 1.19 class.boprojects.inc.php, 1.61, 1.62 class.sobilling.inc.php, 1.15, 1.16 class.sodeliveries.inc.php, 1.19, 1.20 class.uibilling.inc.php, 1.31, 1.32 hook_admin.inc.php, 1.13, 1.14
Date: Thu, 23 Oct 2003 12:15:48 +0000

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

Modified Files:
        class.bobilling.inc.php class.bodeliveries.inc.php 
        class.boprojects.inc.php class.sobilling.inc.php 
        class.sodeliveries.inc.php class.uibilling.inc.php 
        hook_admin.inc.php 
Log Message:
bugfixes

Index: hook_admin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/hook_admin.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** hook_admin.inc.php  10 Sep 2003 00:28:57 -0000      1.13
--- hook_admin.inc.php  23 Oct 2003 12:15:43 -0000      1.14
***************
*** 15,21 ****
                $file = Array
                (
!                       'Administration'        => 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.list_admins&action=pad'),
!                       'Accountancy'           => 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.list_admins&action=pbo'),
!                       'Global Categories'     => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname='
 . $appname)
                );
  //Do not modify below this line
--- 15,22 ----
                $file = Array
                (
!                       'Site Configuration'    => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' 
. $appname),
!                       'Administration'                => 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.list_admins&action=pad'),
!                       'Accountancy'                   => 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.list_admins&action=pbo'),
!                       'Global Categories'             => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname='
 . $appname)
                );
  //Do not modify below this line

Index: class.boprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.boprojects.inc.php,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -d -r1.61 -r1.62
*** class.boprojects.inc.php    29 Sep 2003 14:51:24 -0000      1.61
--- class.boprojects.inc.php    23 Oct 2003 12:15:42 -0000      1.62
***************
*** 1111,1114 ****
--- 1111,1126 ----
                        return $returncode;
                }
+ 
+               function get_site_config()
+               {
+                       $this->config = 
CreateObject('phpgwapi.config','projects');
+                       $this->config->read_repository();
+ 
+                       if ($this->config->config_data)
+                       {
+                               $items = $this->config->config_data;
+                       }
+                       return $items;
+               }
        }
  ?>

Index: class.bodeliveries.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.bodeliveries.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** class.bodeliveries.inc.php  10 Sep 2003 00:28:56 -0000      1.18
--- class.bodeliveries.inc.php  23 Oct 2003 12:15:42 -0000      1.19
***************
*** 47,50 ****
--- 47,51 ----
                        $this->soprojects       = 
CreateObject('projects.soprojects');
                        $this->contacts         = 
CreateObject('phpgwapi.contacts');
+                       $this->boprojects       = 
CreateObject('projects.boprojects');
                }
  
***************
*** 67,73 ****
                }
  
                function read_deliveries($start, $query, $sort, $order, $limit, 
$project_id)
                {
!                       $del = $this->sodeliveries->read_deliveries($start, 
$query, $sort, $order, $limit, $project_id);
                        $this->total_records = 
$this->sodeliveries->total_records;
                        return $del;
--- 68,81 ----
                }
  
+               function get_site_config()
+               {
+                       return $this->boprojects->get_site_config();
+               }
+ 
                function read_deliveries($start, $query, $sort, $order, $limit, 
$project_id)
                {
!                       $co = $this->get_site_config();
!                       $del = 
$this->sodeliveries->read_deliveries(array('start' => $start,'query' => 
$query,'sort' => $sort,'order' => $order,'limit' => $limit,
!                                                                               
                                        'project_id' => $project_id,'owner' => 
$co['invoice_acl']));
                        $this->total_records = 
$this->sodeliveries->total_records;
                        return $del;

Index: class.bobilling.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.bobilling.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** class.bobilling.inc.php     10 Sep 2003 00:28:56 -0000      1.9
--- class.bobilling.inc.php     23 Oct 2003 12:15:41 -0000      1.10
***************
*** 46,54 ****
                        $this->soprojects       = 
CreateObject('projects.soprojects');
                        $this->contacts         = 
CreateObject('phpgwapi.contacts');
                }
  
                function read_invoices($start, $query, $sort, $order, $limit, 
$project_id)
                {
!                       $bill = $this->sobilling->read_invoices($start, $query, 
$sort, $order, $limit, $project_id);
                        $this->total_records = $this->sobilling->total_records;
                        return $bill;
--- 46,63 ----
                        $this->soprojects       = 
CreateObject('projects.soprojects');
                        $this->contacts         = 
CreateObject('phpgwapi.contacts');
+                       $this->boprojects       = 
CreateObject('projects.boprojects');
+               }
+ 
+               function get_site_config()
+               {
+                       return $this->boprojects->get_site_config();
                }
  
                function read_invoices($start, $query, $sort, $order, $limit, 
$project_id)
                {
!                       $co = $this->get_site_config();
! 
!                       $bill = $this->sobilling->read_invoices(array('start' 
=> $start,'query' => $query, 'sort' => $sort,'order' => $order,'limit' => 
$limit,
!                                                                               
                                'project_id' => $project_id,'owner' => 
$co['invoice_acl']));
                        $this->total_records = $this->sobilling->total_records;
                        return $bill;

Index: class.sodeliveries.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.sodeliveries.inc.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** class.sodeliveries.inc.php  10 Sep 2003 00:28:57 -0000      1.19
--- class.sodeliveries.inc.php  23 Oct 2003 12:15:42 -0000      1.20
***************
*** 52,57 ****
                {
                        $values['delivery_num'] = 
$this->db->db_addslashes($values['delivery_num']);
!                       $this->db->query("INSERT INTO phpgw_p_delivery 
(num,project_id,date,customer) VALUES ('" . $values['delivery_num'] . "',"
!                                                       . 
intval($values['project_id']) . ',' . time() . ',' . 
intval($values['customer']) . ')',__LINE__,__FILE__);
  
                        $this->db2->query("SELECT id from phpgw_p_delivery 
WHERE num='" . $values['delivery_num'] . "'",__LINE__,__FILE__);
--- 52,57 ----
                {
                        $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__);
***************
*** 159,165 ****
  
  
!               function read_deliveries($start, $query = '', $sort = '', 
$order = '', $limit = True, $project_id = '')
                {
!                       $project_id = intval($project_id);
  
                        if ($order)
--- 159,171 ----
  
  
!               function read_deliveries($values)
                {
!                       $project_id = intval($values['project_id']);
!                       $sort           = 
(isset($values['sort'])?$values['sort']:'ASC');
!                       $order          = $values['order'];
!                       $query          = $values['query'];
!                       $owner          = ($values['owner'] == 
'yes'?True:False);
!                       $limit          = 
(isset($values['limit'])?$values['limit']:True);
!                       $start          = intval($values['start']);
  
                        if ($order)
***************
*** 177,180 ****
--- 183,191 ----
                        }
  
+                       if ($owner)
+                       {
+                               $acl_select = ' AND phpgw_p_invoice.owner=' . 
$this->account;
+                       }
+ 
                        if ($project_id)
                        {
***************
*** 190,203 ****
                        }
  
!                       $this->db2->query($sql,__LINE__,__FILE__);
                        $this->total_records = $this->db2->num_rows();
  
                        if ($limit)
                        {
!                               $this->db->limit_query($sql . 
$querymethod,$start,__LINE__,__FILE__);
                        }
                        else
                        {
!                               $this->db->query($sql . 
$querymethod,__LINE__,__FILE__);
                        }
  
--- 201,214 ----
                        }
  
!                       $this->db2->query($sql . $acl_select,__LINE__,__FILE__);
                        $this->total_records = $this->db2->num_rows();
  
                        if ($limit)
                        {
!                               $this->db->limit_query($sql  . $acl_select . 
$querymethod,$start,__LINE__,__FILE__);
                        }
                        else
                        {
!                               $this->db->query($sql  . $acl_select . 
$querymethod,__LINE__,__FILE__);
                        }
  

Index: class.sobilling.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.sobilling.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** class.sobilling.inc.php     10 Sep 2003 00:28:57 -0000      1.15
--- class.sobilling.inc.php     23 Oct 2003 12:15:42 -0000      1.16
***************
*** 34,39 ****
                function sobilling()
                {
!                       $this->db       = $GLOBALS['phpgw']->db;
!                       $this->db2      = $this->db;
                }
  
--- 34,40 ----
                function sobilling()
                {
!                       $this->db               = $GLOBALS['phpgw']->db;
!                       $this->db2              = $this->db;
!                       $this->account  = 
$GLOBALS['phpgw_info']['user']['account_id'];
                }
  
***************
*** 50,56 ****
                }
  
!               function read_invoices($start, $query = '', $sort = '', $order 
= '', $limit = True, $project_id = '')
                {
!                       $project_id = intval($project_id);
  
                        if ($order)
--- 51,63 ----
                }
  
!               function read_invoices($values)
                {
!                       $project_id = intval($values['project_id']);
!                       $sort           = 
(isset($values['sort'])?$values['sort']:'ASC');
!                       $order          = $values['order'];
!                       $query          = $values['query'];
!                       $owner          = ($values['owner'] == 
'yes'?True:False);
!                       $limit          = 
(isset($values['limit'])?$values['limit']:True);
!                       $start          = intval($values['start']);
  
                        if ($order)
***************
*** 68,71 ****
--- 75,83 ----
                        }
  
+                       if ($owner)
+                       {
+                               $acl_select = ' AND phpgw_p_invoice.owner=' . 
$this->account;
+                       }
+ 
                        if ($project_id)
                        {
***************
*** 80,93 ****
                        }
  
!                       $this->db2->query($sql,__LINE__,__FILE__);
                        $this->total_records = $this->db2->num_rows();
  
                        if ($limit)
                        {
!                               $this->db->limit_query($sql . 
$querymethod,$start,__LINE__,__FILE__);
                        }
                        else
                        {
!                               $this->db->query($sql . 
$querymethod,__LINE__,__FILE__);
                        }
  
--- 92,105 ----
                        }
  
!                       $this->db2->query($sql . $acl_select,__LINE__,__FILE__);
                        $this->total_records = $this->db2->num_rows();
  
                        if ($limit)
                        {
!                               $this->db->limit_query($sql  . $acl_select. 
$querymethod,$start,__LINE__,__FILE__);
                        }
                        else
                        {
!                               $this->db->query($sql  . $acl_select. 
$querymethod,__LINE__,__FILE__);
                        }
  
***************
*** 134,139 ****
                {
                        $values['invoice_num'] = 
$this->db->db_addslashes($values['invoice_num']);
!                       $this->db->query("INSERT INTO phpgw_p_invoice 
(num,sum,project_id,customer,date) VALUES ('" . $values['invoice_num'] . "',0,"
!                                                       . 
intval($values['project_id']) . ',' . intval($values['customer']) . ',' . 
intval($values['date']) . ')',__LINE__,__FILE__);
  
                        $this->db2->query("SELECT id from phpgw_p_invoice WHERE 
num='" . $values['invoice_num'] . "'",__LINE__,__FILE__);
--- 146,151 ----
                {
                        $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__);

Index: class.uibilling.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.uibilling.inc.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** class.uibilling.inc.php     10 Sep 2003 00:28:57 -0000      1.31
--- class.uibilling.inc.php     23 Oct 2003 12:15:43 -0000      1.32
***************
*** 402,406 ****
                        }
  
!                       $bill = $this->bobilling->read_invoices($this->start, 
$this->query, $this->sort, $this->order, True, $project_id);
  
  // -------------------- nextmatch variable template-declarations 
-----------------------------
--- 402,406 ----
                        }
  
!                       $bill = 
$this->bobilling->read_invoices($this->start,$this->query,$this->sort,$this->order,True,$project_id);
  
  // -------------------- nextmatch variable template-declarations 
-----------------------------





reply via email to

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