phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc/class.sos_agreement.inc.php, 1.2


From: nomail
Subject: [Phpgroupware-cvs] property/inc/class.sos_agreement.inc.php, 1.2
Date: Fri, 11 Jun 2004 20:45:50 +0200

Update of /property/inc
Modified Files:
        Branch: 
          class.sos_agreement.inc.php

date: 2004/06/11 18:45:50;  author: sigurdne;  state: Exp;  lines: +7 -0

Log Message:
no message
=====================================================================
Index: property/inc/class.sos_agreement.inc.php
diff -u property/inc/class.sos_agreement.inc.php:1.1 
property/inc/class.sos_agreement.inc.php:1.2
--- property/inc/class.sos_agreement.inc.php:1.1        Fri Jun 11 17:13:13 2004
+++ property/inc/class.sos_agreement.inc.php    Fri Jun 11 18:45:50 2004
@@ -638,6 +638,8 @@
                                . "','" . $s_agreement['vendor_id'] . "','" . 
$s_agreement['b_account_id']
                                . "','" . $this->account . "' $vals)");
 
+                       $this->db->query("INSERT INTO fm_orders (id,type) 
VALUES ($id,'s_agreement')");
+
                        $receipt['s_agreement_id']= 
$id;//$this->db->get_last_insert_id($table,'id');
 
                        $receipt['message'][] = array('msg'=>lang('s_agreement 
%1 has been saved',$receipt['s_agreement_id']));
@@ -896,7 +898,12 @@
                function delete($s_agreement_id)
                {
                        $table = 'fm_s_agreement';
+                       $this->db->transaction_begin();
                        $this->db->query("DELETE FROM $table WHERE id=" . 
intval($s_agreement_id));
+                       $this->db->query("DELETE FROM fm_s_agreement_detail 
WHERE agreement_id=" . intval($s_agreement_id));
+                       $this->db->query("DELETE FROM fm_s_agreement_pricing 
WHERE agreement_id=" . intval($s_agreement_id));
+                       $this->db->query("DELETE FROM fm_orders WHERE id=" . 
intval($s_agreement_id));
+                       $this->db->transaction_commit();
                }
 
                function read_attrib($data)




reply via email to

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