phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property/inc class.bopricebook.inc.php,1.3,1.4 c


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property/inc class.bopricebook.inc.php,1.3,1.4 class.sopricebook.inc.php,1.3,1.4 class.uipricebook.inc.php,1.3,1.4
Date: Tue, 04 Mar 2003 14:32:09 -0500

Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv6214/inc

Modified Files:
        class.bopricebook.inc.php class.sopricebook.inc.php 
        class.uipricebook.inc.php 
Log Message:
no message

Index: class.bopricebook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bopricebook.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.bopricebook.inc.php   4 Mar 2003 10:48:52 -0000       1.3
--- class.bopricebook.inc.php   4 Mar 2003 19:32:03 -0000       1.4
***************
*** 222,227 ****
                        $w_cost                 = 
str_replace(",",".",$values['w_cost']);
                        $total_cost             = $m_cost + $w_cost;
!                       $activity_id    = $values['activity_id'];
!                       $vendor_id              = $values['vendor_id'];
  
                        $receipt = 
$this->so->add_activity_first_prize($m_cost,$w_cost,$total_cost,$activity_id,$vendor_id,$date);
--- 222,227 ----
                        $w_cost                 = 
str_replace(",",".",$values['w_cost']);
                        $total_cost             = $m_cost + $w_cost;
!                       $activity_id    = $values['activity_id'][0];
!                       $vendor_id              = $values['vendor_id'][0];
  
                        $receipt = 
$this->so->add_activity_first_prize($m_cost,$w_cost,$total_cost,$activity_id,$vendor_id,$date);

Index: class.sopricebook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sopricebook.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.sopricebook.inc.php   4 Mar 2003 10:48:52 -0000       1.3
--- class.sopricebook.inc.php   4 Mar 2003 19:32:03 -0000       1.4
***************
*** 31,36 ****
                function 
add_activity_first_prize($m_cost,$w_cost,$total_cost,$activity_id,$vendor_id,$date)
                {
!                       $this->db->query("insert_ into 
fm_wo_activity_price_index (activity_id, vendor_id, index_count, this_index, 
m_cost, w_cost, total_cost, date,current_index) "
!                       . " values 
('$activity_id','$vendor_id','1','1','$m_cost','$w_cost','$total_cost','$date','1')",__LINE__,__FILE__);
  
                        $receipt['message'][] = array('msg'=>lang('First entry 
is added!'));
--- 31,35 ----
                function 
add_activity_first_prize($m_cost,$w_cost,$total_cost,$activity_id,$vendor_id,$date)
                {
!                       $this->db->query("update fm_wo_activity_price_index  
set index_count='1',this_index='1', 
m_cost='$m_cost',w_cost='$w_cost',total_cost='$total_cost',date='$date',current_index='1'
 where activity_id='$activity_id' and vendor_id= '$vendor_id' and index_count= 
'1'",__LINE__,__FILE__);
  
                        $receipt['message'][] = array('msg'=>lang('First entry 
is added!'));
***************
*** 554,558 ****
                        if ($index_count==1)
                        {
!                               $this->db->query("update 
fm_wo_activity_price_index set current_index = '0', this_index=Null, 
m_cost=Null,w_cost=Null,total_cost=Null,date=Null  where 
activity_id='$activity_id' and vendor_id= '$vendor_id' and index_count= 
'1'",__LINE__,__FILE__);
                        }
                        else
--- 553,557 ----
                        if ($index_count==1)
                        {
!                               $this->db->query("update 
fm_wo_activity_price_index set index_count = '1', current_index = '0', 
this_index=Null, m_cost=Null,w_cost=Null,total_cost=Null,date=Null  where 
activity_id='$activity_id' and vendor_id= '$vendor_id' and index_count= 
'1'",__LINE__,__FILE__);
                        }
                        else
***************
*** 579,586 ****
                        else
                        {
!                               $this->db->query("insert into 
fm_wo_activity_price_index (activity_id, vendor_id, index_count) "
                                        . " values ('" .
                                        $values['activity_id']. "','" .
!                                       $values['vendor_id']. 
"','1')",__LINE__,__FILE__);
  
                                $receipt['message'][] = 
array('msg'=>lang('Vendor has been added'));
--- 578,585 ----
                        else
                        {
!                               $this->db->query("insert into 
fm_wo_activity_price_index (activity_id, vendor_id, 
index_count,current_index,m_cost,w_cost,total_cost) "
                                        . " values ('" .
                                        $values['activity_id']. "','" .
!                                       $values['vendor_id']. 
"','1','0',NULL,NULL,NULL)",__LINE__,__FILE__);
  
                                $receipt['message'][] = 
array('msg'=>lang('Vendor has been added'));
***************
*** 589,594 ****
                        return $receipt;
                }
- 
- 
        }
  ?>
--- 588,591 ----

Index: class.uipricebook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uipricebook.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.uipricebook.inc.php   4 Mar 2003 10:48:52 -0000       1.3
--- class.uipricebook.inc.php   4 Mar 2003 19:32:03 -0000       1.4
***************
*** 44,47 ****
--- 44,48 ----
                        $this->bocommon                                 = 
CreateObject($this->currentapp.'.bocommon',True);
                        $this->socommon                                 = 
CreateObject($this->currentapp.'.socommon',True);
+                       $this->contacts                                 = 
CreateObject('phpgwapi.contacts');
  
                        $this->start                            = 
$this->bo->start;
***************
*** 72,75 ****
--- 73,77 ----
                function index()
                {
+                       
$GLOBALS['phpgw']->session->appsession('referer',$this->currentapp,'');
  
                        $GLOBALS['phpgw']->xslttpl->add_file(array('pricebook',
***************
*** 112,116 ****
                                        'index_count'                   => 
$pricebook['index_count'],
                                        'link_edit'                             
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uipricebook.edit_activity&activity_id='
 . $pricebook['activity_id']),
!                                       'link_prizing'                          
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uipricebook.prizing&activity_id='
 . $pricebook['activity_id'].'&vendor_id=' . $pricebook['vendor_id']),
                                        'lang_edit_statustext'          => 
lang('edit the pricebook'),
                                        'lang_prizing_statustext'       => 
lang('view or edit prizing history of this element'),
--- 114,118 ----
                                        'index_count'                   => 
$pricebook['index_count'],
                                        'link_edit'                             
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uipricebook.edit_activity&activity_id='
 . $pricebook['activity_id']),
!                                       'link_prizing'                          
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uipricebook.prizing&activity_id='
 . $pricebook['activity_id'].'&vendor_id=' . $pricebook['vendor_id'] 
.'&cat_id=' .$this->cat_id),
                                        'lang_edit_statustext'          => 
lang('edit the pricebook'),
                                        'lang_prizing_statustext'       => 
lang('view or edit prizing history of this element'),
***************
*** 249,257 ****
                        $links = $this->bocommon->menu();
  
!                       if(!$referer)
!                       {
!                               $referer = 
$GLOBALS['HTTP_SERVER_VARS']['HTTP_REFERER'] ? 
$GLOBALS['HTTP_SERVER_VARS']['HTTP_REFERER'] : $GLOBALS['HTTP_REFERER'];
!                       }
! 
                        $activity_id            = 
get_var('activity_id',array('GET'));
                        $vendor_id                      = 
get_var('vendor_id',array('GET'));
--- 251,255 ----
                        $links = $this->bocommon->menu();
  
!                       $cat_id                         = 
get_var('cat_id',array('GET'));
                        $activity_id            = 
get_var('activity_id',array('GET'));
                        $vendor_id                      = 
get_var('vendor_id',array('GET'));
***************
*** 259,263 ****
                        $values['date']         = get_var('date',array('POST'));
  
! //_debug_array($values);
                        if($values['submit_update'])
                        {
--- 257,269 ----
                        $values['date']         = get_var('date',array('POST'));
  
! 
!                       $referer                        = 
$GLOBALS['phpgw']->session->appsession('referer',$this->currentapp);
!                       if(!$referer)
!                       {
!                               $referer = 
$GLOBALS['HTTP_SERVER_VARS']['HTTP_REFERER'] ? 
$GLOBALS['HTTP_SERVER_VARS']['HTTP_REFERER'] : $GLOBALS['HTTP_REFERER'];
!                               $referer = $referer . '&cat_id=' . $cat_id;
!                               
$GLOBALS['phpgw']->session->appsession('referer',$this->currentapp,$referer);
!                       }
! 
                        if($values['submit_update'])
                        {
***************
*** 396,401 ****
--- 402,416 ----
  
                        $num_records    = count($pricebook_list);
+ 
+ 
+                       $vendor_data = 
$this->contacts->read_single_entry($vendor_id,array('org_name'=>'org_name'));
+                       $activity = 
$this->bo->read_single_activity($activity_id);
+ 
                        $data = array
                        (
+                               'done_action'                                   
=> $referer,
+                               'lang_done'                                     
        => lang('done'),
+                               'lang_done_statustext'                  => 
lang('Back to the list'),
+ 
                                'error'                                         
        => $receipt['error'],
                                'message'                                       
        => $receipt['message'],
***************
*** 411,415 ****
--- 426,435 ----
                                'appname'                                       
        => lang($this->currentapp),
                                'function_msg'                                  
=> lang('edit prizing'),
+                               'lang_vendor'                                   
=> lang('Vendor'),
+                               'lang_activity'                                 
=> lang('Activity'),
+ 
+                               'value_vendor_name'                             
=> $vendor_data[0]['org_name'],
                                'value_activity_id'                             
=> $activity_id,
+                               'value_activity_code'                   => 
$activity['num'],
                                'value_vendor_id'                               
=> $vendor_id,
                                'value_m_cost'                                  
=> $value_m_cost,
***************
*** 491,495 ****
                        (
                                'lang_add'                              => 
lang('add'),
!                               'lang_add_statustext'   => lang('add a 
building'),
                                'add_action'                    => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uipricebook.edit_activity&agreement='
 . $this->cat_id)
                        );
--- 511,515 ----
                        (
                                'lang_add'                              => 
lang('add'),
!                               'lang_add_statustext'   => lang('add an 
activity'),
                                'add_action'                    => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uipricebook.edit_activity&agreement='
 . $this->cat_id)
                        );
***************
*** 552,555 ****
--- 572,576 ----
                function activity_vendor()
                {
+                       
$GLOBALS['phpgw']->session->appsession('referer',$this->currentapp,'');
  
                        $GLOBALS['phpgw']->xslttpl->add_file(array('pricebook',
***************
*** 578,582 ****
                        }
  
- 
                        $pricebook_list = 
$this->bo->read_vendor_pr_activity($activity_id);
  
--- 599,602 ----
***************
*** 617,627 ****
                        );
  
-                       $table_add[] = array
-                       (
-                               'lang_add'                              => 
lang('add'),
-                               'lang_add_statustext'   => lang('add a 
building'),
-                               'add_action'                    => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uipricebook.edit_activity&agreement='
 . $this->cat_id)
-                       );
- 
                        $link_data = array
                        (
--- 637,640 ----
***************
*** 846,850 ****
                        $activity_id    = get_var('activity_id',array('GET'));
                        $vendor_id              = 
get_var('vendor_id',array('GET'));
!                       $index_count            = 
get_var('index_count',array('GET'));
                        $confirm                = 
get_var('confirm',array('POST'));
  
--- 859,863 ----
                        $activity_id    = get_var('activity_id',array('GET'));
                        $vendor_id              = 
get_var('vendor_id',array('GET'));
!                       $index_count    = get_var('index_count',array('GET'));
                        $confirm                = 
get_var('confirm',array('POST'));
  
***************
*** 886,892 ****
                                $link_data = array
                                (
!                                       'menuaction' => 
$this->currentapp.'.uipricebook.prizing',
!                                       'activity_id' => $activity_id,
!                                       'vendor_id' => $vendor_id
                                );
  
--- 899,905 ----
                                $link_data = array
                                (
!                                       'menuaction'    => 
$this->currentapp.'.uipricebook.prizing',
!                                       'activity_id'   => $activity_id,
!                                       'vendor_id'             => $vendor_id
                                );
  





reply via email to

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