[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: inv/inc class.soinvoice.inc.php,NONE,1.1 class.s
From: |
Bettina Gille <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: inv/inc class.soinvoice.inc.php,NONE,1.1 class.soinventory.inc.php,1.8,1.9 class.uiinventory.inc.php,1.9,1.10 |
Date: |
Fri, 05 Apr 2002 19:28:34 -0500 |
Update of /cvsroot/phpgroupware/inv/inc
In directory subversions:/tmp/cvs-serv12088/inc
Modified Files:
class.soinventory.inc.php class.uiinventory.inc.php
Added Files:
class.soinvoice.inc.php
Log Message:
update
***** Error reading new file: [Errno 2] No such file or directory:
'class.soinvoice.inc.php'
Index: class.soinventory.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/inv/inc/class.soinventory.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.soinventory.inc.php 5 Apr 2002 23:35:03 -0000 1.8
--- class.soinventory.inc.php 6 Apr 2002 00:28:32 -0000 1.9
***************
*** 29,132 ****
{
var $db;
function soinventory()
{
$this->db = $GLOBALS['phpgw']->db;
! $this->db2 = $this->db;
}
! function read_orders($start, $limit = True, $query = '',
$filter = '', $sort = '', $order = '',$status = 'active')
! {
! if ($status == 'archive')
! {
! $statussort = " AND status='archive'";
! }
! else
! {
! $statussort = " AND status != 'archive'";
! }
!
! if (!$sort)
! {
! $sort = "ASC";
! }
!
! if ($order)
! {
! $ordermethod = " order by $order $sort";
! }
! else
! {
! $ordermethod = "order by num asc";
! }
!
! if (! $filter)
! {
! $filter = 'none';
! }
!
! if ($filter != 'private')
! {
! if ($filter != 'none')
! {
! $filtermethod = " access like
'%,$filter,%' ";
! }
! else
! {
! $filtermethod = " ( owner=" .
$phpgw_info['user']['account_id'];
! if (is_array($this->grants))
! {
! $grants = $this->grants;
! while (list($user) =
each($grants))
! {
! $public_user_list[] =
$user;
! }
! reset($public_user_list);
! $filtermethod .= " OR
(access='public' AND owner in(" . implode(',',$public_user_list) . ")))";
! }
! else
! {
! $filtermethod .= ' )';
! }
! }
! }
! else
! {
! $filtermethod = ' owner=' .
$phpgw_info['user']['account_id'] . ' ';
! }
!
! if ($query)
! {
! $querymethod = " AND (num like '%$query%' OR
descr like '%$query%')";
! }
!
! $sql = "select * from phpgw_inv_orders WHERE
$filtermethod $querymethod $statussort";
!
! $this->db2->query($sql,__LINE__,__FILE__);
! $this->total_records = $this->db2->num_rows();
! $this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
!
! $i = 0;
! while ($this->db->next_record())
! {
! $orders[$i]['id'] =
$this->db->f('id');
! $orders[$i]['owner'] = $this->db->f('owner');
! $orders[$i]['access'] =
$this->db->f('access');
! $orders[$i]['num'] =
$this->db->f('num');
! $orders[$i]['date'] =
$this->db->f('date');
! $orders[$i]['customer'] =
$this->db->f('customer');
! $orders[$i]['descr'] = $this->db->f('descr');
! $orders[$i]['status'] =
$this->db->f('status');
! $i++;
! }
! return $orders;
! }
!
! function get_status_id($sname='archive')
{
$this->db->query("SELECT status_id from
phpgw_inv_statuslist WHERE status_name='archive'",__LINE__,__FILE__);
$this->db->next_record();
! $status_id = $this->db->f('status_id');
! return $status_id;
}
--- 29,45 ----
{
var $db;
+ var $account;
function soinventory()
{
$this->db = $GLOBALS['phpgw']->db;
! $this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
}
! function get_status_id()
{
$this->db->query("SELECT status_id from
phpgw_inv_statuslist WHERE status_name='archive'",__LINE__,__FILE__);
$this->db->next_record();
! return $this->db->f('status_id');
}
***************
*** 259,264 ****
function read_rooms($start, $limit = True, $query = '', $filter
= '', $sort = '', $order = '')
{
- global $phpgw,$phpgw_info;
-
if (!$sort)
{
--- 172,175 ----
***************
*** 288,292 ****
else
{
! $filtermethod = " ( room_owner=" .
$phpgw_info['user']['account_id'];
if (is_array($this->grants))
{
--- 199,203 ----
else
{
! $filtermethod = " ( room_owner=" .
$this->account;
if (is_array($this->grants))
{
***************
*** 307,311 ****
else
{
! $filtermethod = ' room_owner=' .
$phpgw_info['user']['account_id'] . ' ';
}
--- 218,222 ----
else
{
! $filtermethod = ' room_owner=' . $this->account
. ' ';
}
***************
*** 317,324 ****
$sql = "select * from phpgw_inv_stockrooms WHERE
$filtermethod $querymethod";
- $this->db2->query($sql,__LINE__,__FILE__);
-
- $this->total_records = $this->db2->num_rows();
-
if ($limit)
{
--- 228,231 ----
***************
*** 330,335 ****
}
! $i = 0;
while ($this->db->next_record())
{
--- 237,243 ----
}
! $this->total_records = $this->db->num_rows();
+ $i = 0;
while ($this->db->next_record())
{
***************
*** 346,351 ****
function select_room_list($selected = '')
{
- global $phpgw;
-
$rooms =
$this->read_rooms($start,False,$query,$filter,$sort,$order);
--- 254,257 ----
***************
*** 502,506 ****
function max_product_number($number)
{
! $this->db->query("select max(id) from
phpgw_inv_products where id like ('$number%')");
if ($this->db->next_record())
{
--- 408,412 ----
function max_product_number($number)
{
! $this->db->query("select max(id) from
phpgw_inv_products where id like ('$number%')",__LINE__,__FILE__);
if ($this->db->next_record())
{
Index: class.uiinventory.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/inv/inc/class.uiinventory.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** class.uiinventory.inc.php 5 Apr 2002 23:35:03 -0000 1.9
--- class.uiinventory.inc.php 6 Apr 2002 00:28:32 -0000 1.10
***************
*** 554,620 ****
}
- function preferences()
- {
- $submit = $GLOBALS['HTTP_POST_VARS']['submit'];
- $prefs = $GLOBALS['HTTP_POST_VARS']['prefs'];
- $abid = $GLOBALS['HTTP_POST_VARS']['abid'];
-
- if ($submit)
- {
- $prefs['abid'] = $abid;
- $this->boinv->save_prefs($prefs);
-
- Header('Location: ' .
$GLOBALS['phpgw']->link('/preferences/index.php'));
- $GLOBALS['phpgw']->common->phpgw_exit();
- }
-
- $GLOBALS['phpgw']->common->phpgw_header();
- echo parse_navbar();
-
- $this->t->set_file(array('prefs' => 'preferences.tpl'));
-
-
$this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=inv.uiinventory.preferences'));
-
$this->t->set_var('addressbook_link',$GLOBALS['phpgw']->link('/inv/addressbook.php','query='));
- $this->t->set_var('lang_action',lang('Inventory
preferences'));
- $this->t->set_var('lang_address',lang('Select your
address'));
- $this->t->set_var('lang_select',lang('Select per button
!'));
- $this->t->set_var('lang_print_format',lang('Select
print format'));
- $this->t->set_var('lang_def_cat',lang('Default
category'));
- $this->t->set_var('lang_select_def_cat',lang('Select
default category'));
-
- $prefs = $this->boinv->read_prefs();
-
- if (isset($prefs['abid']))
- {
- $abid = $prefs['abid'];
- $entry =
$this->boinv->read_single_contact($abid);
-
- if ($entry[0]['org_name'] == '') {
$this->t->set_var('name',$entry[0]['n_given'] . ' ' . $entry[0]['n_family']); }
- else {
$this->t->set_var('name',$entry[0]['org_name'] . ' [ ' . $entry[0]['n_given'] .
' ' . $entry[0]['n_family'] . ' ]'); }
- }
- else
- {
- $this->t->set_var('name',$name);
- }
-
- $this->t->set_var('abid',$abid);
-
- if ($prefs['print_format']=='html'):
- $format_sel[0]=' selected';
- elseif ($prefs['print_format']=='pdf'):
- $format_sel[1]=' selected';
- endif;
-
- $print_format = '<option value="html"' . $format_sel[0]
.'>' . lang('HTML') . '</option>' . "\n"
- . '<option value="pdf"' .
$format_sel[1] . '>' . lang('PDF') . '</option>' . "\n";
-
- $this->t->set_var('print_format',$print_format);
-
-
$this->t->set_var('category_list',$this->boinv->cats->formated_list(array('format'
=> 'select','type' => 'all','selected' => $prefs['cat_id'])));
-
- $this->t->set_var('lang_save',lang('Save'));
- $this->t->pfp('out','prefs');
- }
-
function view_product()
{
--- 554,557 ----
***************
*** 910,913 ****
--- 847,913 ----
$this->t->set_var('lang_yes',lang('Yes'));
$this->t->pfp('out','status_delete');
+ }
+
+ function preferences()
+ {
+ $submit = $GLOBALS['HTTP_POST_VARS']['submit'];
+ $prefs = $GLOBALS['HTTP_POST_VARS']['prefs'];
+ $abid = $GLOBALS['HTTP_POST_VARS']['abid'];
+
+ if ($submit)
+ {
+ $prefs['abid'] = $abid;
+ $this->boinv->save_prefs($prefs);
+
+ Header('Location: ' .
$GLOBALS['phpgw']->link('/preferences/index.php'));
+ $GLOBALS['phpgw']->common->phpgw_exit();
+ }
+
+ $GLOBALS['phpgw']->common->phpgw_header();
+ echo parse_navbar();
+
+ $this->t->set_file(array('prefs' => 'preferences.tpl'));
+
+
$this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=inv.uiinventory.preferences'));
+
$this->t->set_var('addressbook_link',$GLOBALS['phpgw']->link('/inv/addressbook.php','query='));
+ $this->t->set_var('lang_action',lang('Inventory
preferences'));
+ $this->t->set_var('lang_address',lang('Select your
address'));
+ $this->t->set_var('lang_select',lang('Select per button
!'));
+ $this->t->set_var('lang_print_format',lang('Select
print format'));
+ $this->t->set_var('lang_def_cat',lang('Default
category'));
+ $this->t->set_var('lang_select_def_cat',lang('Select
default category'));
+
+ $prefs = $this->boinv->read_prefs();
+
+ if (isset($prefs['abid']))
+ {
+ $abid = $prefs['abid'];
+ $entry =
$this->boinv->read_single_contact($abid);
+
+ if ($entry[0]['org_name'] == '') {
$this->t->set_var('name',$entry[0]['n_given'] . ' ' . $entry[0]['n_family']); }
+ else {
$this->t->set_var('name',$entry[0]['org_name'] . ' [ ' . $entry[0]['n_given'] .
' ' . $entry[0]['n_family'] . ' ]'); }
+ }
+ else
+ {
+ $this->t->set_var('name',$name);
+ }
+
+ $this->t->set_var('abid',$abid);
+
+ if ($prefs['print_format']=='html'):
+ $format_sel[0]=' selected';
+ elseif ($prefs['print_format']=='pdf'):
+ $format_sel[1]=' selected';
+ endif;
+
+ $print_format = '<option value="html"' . $format_sel[0]
.'>' . lang('HTML') . '</option>' . "\n"
+ . '<option value="pdf"' .
$format_sel[1] . '>' . lang('PDF') . '</option>' . "\n";
+
+ $this->t->set_var('print_format',$print_format);
+
+
$this->t->set_var('category_list',$this->boinv->cats->formated_list(array('format'
=> 'select','type' => 'all','selected' => $prefs['cat_id'])));
+
+ $this->t->set_var('lang_save',lang('Save'));
+ $this->t->pfp('out','prefs');
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: inv/inc class.soinvoice.inc.php,NONE,1.1 class.soinventory.inc.php,1.8,1.9 class.uiinventory.inc.php,1.9,1.10,
Bettina Gille <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: inv/inc class.boinventory.inc.php,1.8,1.9 class.soinventory.inc.php,1.7,1.8 class.uiinventory.inc.php,1.8,1.9
- Next by Date:
[Phpgroupware-cvs] CVS: calendar/inc class.uiicalendar.inc.php,1.3,1.3.2.1
- Previous by thread:
[Phpgroupware-cvs] CVS: inv/inc class.boinventory.inc.php,1.8,1.9 class.soinventory.inc.php,1.7,1.8 class.uiinventory.inc.php,1.8,1.9
- Next by thread:
[Phpgroupware-cvs] CVS: calendar/inc class.uiicalendar.inc.php,1.3,1.3.2.1
- Index(es):