phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc class.sopricebook.inc.php, 1.6.2.8 class


From: sigurdne
Subject: [Phpgroupware-cvs] property/inc class.sopricebook.inc.php, 1.6.2.8 class.sos_agreement.inc.php, 1.10.2.11 class.soagreement.inc.php, 1.3.2.10 class.uiagreement.inc.php, 1.3.2.8
Date: Thu, 24 Feb 2005 14:41:23 -0000

Update of property/inc

Modified Files:
     Branch: proposed-0_9_18-branch
            class.sopricebook.inc.php lines: +0 -0
            class.sos_agreement.inc.php lines: +19 -9
            class.soagreement.inc.php lines: +17 -7
            class.uiagreement.inc.php lines: +2 -3

Log Message:
no message

====================================================

====================================================
Index: property/inc/class.sos_agreement.inc.php
diff -u property/inc/class.sos_agreement.inc.php:1.10.2.10 
property/inc/class.sos_agreement.inc.php:1.10.2.11
--- property/inc/class.sos_agreement.inc.php:1.10.2.10  Mon Dec 27 13:58:52 2004
+++ property/inc/class.sos_agreement.inc.php    Thu Jan 13 12:09:00 2005
@@ -40,7 +40,6 @@
                        $this->join                     = $this->bocommon->join;
                        $this->left_join        = $this->bocommon->left_join;
                        $this->like                     = $this->bocommon->like;
-//                     $this->role             = 's_agreement';
                }

                function select_category_list()
@@ -666,6 +665,23 @@
                                $s_agreement['member_of']=',' . 
implode(',',$s_agreement['member_of']) . ',';
                        }

+
+                       $this->db->transaction_begin();
+                       $id = $this->bocommon->increment_id('workorder');
+
+                       $vals[] = $id;
+                       $vals[] = $s_agreement['name'];
+                       $vals[] = $s_agreement['descr'];
+                       $vals[] = time();
+                       $vals[] = $s_agreement['cat_id'];
+                       $vals[] = $s_agreement['member_of'];
+                       $vals[] = $s_agreement['start_date'];
+                       $vals[] = $s_agreement['end_date'];
+                       $vals[] = $s_agreement['termination_date'];
+                       $vals[] = $s_agreement['vendor_id'];
+                       $vals[] = $s_agreement['b_account_id'];
+                       $vals[] = $this->account;
+
                        while (is_array($s_agreement['extra']) && 
list($input_name,$value) = each($s_agreement['extra']))
                        {
                                if($value)
@@ -690,17 +706,11 @@
                        if($cols)
                        {
                                $cols   = "," . implode(",", $cols);
-                               $vals   = "," . 
$this->bocommon->validate_db_insert($vals);
+                               $vals   = 
$this->bocommon->validate_db_insert($vals);
                        }

-                       $this->db->transaction_begin();
-               //      $id = $this->bocommon->next_id($table);
-                       $id = $this->bocommon->increment_id('workorder');
                        $this->db->query("INSERT INTO $table 
(id,name,descr,entry_date,category,member_of,start_date,end_date,termination_date,vendor_id,account_id,user_id
 $cols) "
-                               . "VALUES ($id,'" . $s_agreement['name'] ."','" 
. $s_agreement['descr'] ."','" . time() . "','" . $s_agreement['cat_id'] . 
"','" . $s_agreement['member_of']
-                               . "','" . $s_agreement['start_date'] . "','" . 
$s_agreement['end_date'] . "','" . $s_agreement['termination_date']
-                               . "','" . $s_agreement['vendor_id'] . "','" . 
$s_agreement['b_account_id']
-                               . "','" . $this->account . "' $vals)");
+                               . "VALUES ($vals)",__LINE__,__FILE__);

                        $this->db->query("INSERT INTO fm_orders (id,type) 
VALUES ($id,'s_agreement')");


====================================================
Index: property/inc/class.soagreement.inc.php
diff -u property/inc/class.soagreement.inc.php:1.3.2.9 
property/inc/class.soagreement.inc.php:1.3.2.10
--- property/inc/class.soagreement.inc.php:1.3.2.9      Mon Dec 27 13:58:53 2004
+++ property/inc/class.soagreement.inc.php      Thu Jan 13 12:09:00 2005
@@ -723,6 +723,7 @@
                                {
                                        $item['agreement_id']   = 
(int)$this->db->f('agreement_id');
                                        $item['id']                             
= (int)$this->db->f('id');
+                                       $item['num']                    = 
$this->db->f('num');
                                        $item['entry_date']             = 
$this->db->f('entry_date');
                                        $item['m_cost']                 = 
$this->db->f('m_cost');
                                        $item['w_cost']                 = 
$this->db->f('w_cost');
@@ -751,6 +752,20 @@
                                $agreement['member_of']=',' . 
implode(',',$agreement['member_of']) . ',';
                        }

+                       $this->db->transaction_begin();
+                       $id = $this->bocommon->next_id($table);
+                       $vals[] = $id;
+                       $vals[] = $agreement['name'];
+                       $vals[] = $agreement['descr'];
+                       $vals[] = time();
+                       $vals[] = $agreement['cat_id'];
+                       $vals[] = $agreement['start_date'];
+                       $vals[] = $agreement['end_date'];
+                       $vals[] = $agreement['termination_date'];
+                       $vals[] = $agreement['vendor_id'];
+                       $vals[] = $this->account;
+
+
                        while (is_array($agreement['extra']) && 
list($input_name,$value) = each($agreement['extra']))
                        {
                                if($value)
@@ -780,16 +795,11 @@
                        if($cols)
                        {
                                $cols   = "," . implode(",", $cols);
-                               $vals   = "," . 
$this->bocommon->validate_db_insert($vals);
+                               $vals   = 
$this->bocommon->validate_db_insert($vals);
                        }

-                       $this->db->transaction_begin();
-                       $id = $this->bocommon->next_id($table);
                        $this->db->query("INSERT INTO $table 
(id,name,descr,entry_date,category,start_date,end_date,termination_date,vendor_id,user_id
 $cols) "
-                               . "VALUES ($id,'" . $agreement['name'] ."','" . 
$agreement['descr'] ."','" . time() . "','" . $agreement['cat_id']
-                               . "','" . $agreement['start_date'] . "','" . 
$agreement['end_date'] . "','" . $agreement['termination_date']
-                               . "','" . $agreement['vendor_id']
-                               . "','" . $this->account . "' $vals)");
+                               . "VALUES ($vals)",__LINE__,__FILE__);

                        $receipt['agreement_id']= 
$id;//$this->db->get_last_insert_id($table,'id');


====================================================
Index: property/inc/class.uiagreement.inc.php
diff -u property/inc/class.uiagreement.inc.php:1.3.2.7 
property/inc/class.uiagreement.inc.php:1.3.2.8
--- property/inc/class.uiagreement.inc.php:1.3.2.7      Thu Nov 18 22:12:08 2004
+++ property/inc/class.uiagreement.inc.php      Thu Jan 13 12:09:00 2005
@@ -1264,14 +1264,13 @@
                                'lang_update_statustext'        => lang('update 
selected investments')
                        );

-
-
                        $data = array
                        (
                                'msgbox_data'                                   
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
                                'edit_url'                                      
        => $GLOBALS['phpgw']->link('/index.php',$link_data),
                                'lang_id'                                       
        => lang('ID'),
                                'value_id'                                      
        => $values['id'],
+                               'value_num'                                     
        => $values['num'],
                                'value_agreement_id'                    => 
$agreement_id,
                                'lang_category'                                 
=> lang('category'),
                                'lang_save'                                     
        => lang('save'),






reply via email to

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