[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/class.sotemplate.php, 1.1.1.6
From: |
nomail |
Subject: |
[Phpgroupware-cvs] property/class.sotemplate.php, 1.1.1.6 |
Date: |
Sun, 9 May 2004 15:42:34 +0200 |
Update of /property
Modified Files:
Branch:
class.sotemplate.php
date: 2004/05/09 13:42:34; author: sigurdne; state: Exp; lines: +17 -6
Log Message:
no message
=====================================================================
Index: property/class.sotemplate.php
diff -u property/class.sotemplate.php:1.1.1.5
property/class.sotemplate.php:1.1.1.6
--- property/class.sotemplate.php:1.1.1.5 Thu Apr 29 07:10:49 2004
+++ property/class.sotemplate.php Sun May 9 13:42:34 2004
@@ -290,10 +290,12 @@
$hour['grouping_descr'] = $hour['new_grouping'];
}
+ $GLOBALS['phpgw']->db->begintrans();
+ $id =
$GLOBALS['phpgw']->db->genid('fm_template_hours_id_seq');
- $GLOBALS['phpgw']->db->Execute("INSERT into
fm_template_hours
(owner,hours_descr,unit,cost,quantity,billperae,ns3420_id,dim_d,"
+ $GLOBALS['phpgw']->db->Execute("INSERT into
fm_template_hours
(id,owner,hours_descr,unit,cost,quantity,billperae,ns3420_id,dim_d,"
. "
grouping_id,grouping_descr,record,building_part,tolerance,remark,entry_date,template_id)
"
- . " values ('" .
+ . " values ($id,'" .
$this->account . "','" .
$hour['descr'] . "','" .
$hour['unit'] . "','" .
@@ -311,7 +313,10 @@
time() . "','" .
$template_id . "')");
- $receipt['hour_id'] =
$this->db->get_last_insert_id('fm_template_hours','id');
+// $receipt['hour_id'] =
$this->db->get_last_insert_id('fm_template_hours','id');
+ $receipt['hour_id'] = $id;
+
+ $GLOBALS['phpgw']->db->committrans();
$receipt['message'][] = array('msg'=>lang('hour %1 is
added!',$hour['record']));
@@ -428,18 +433,24 @@
$values['name'] =
$this->functions->db_addslashes($values['name']);
- $GLOBALS['phpgw']->db->Execute("INSERT into fm_template
(owner,name,descr,chapter_id,entry_date) "
- . " values ('" .
+ $GLOBALS['phpgw']->db->begintrans();
+ $id =
$GLOBALS['phpgw']->db->genid('fm_template_id_seq');
+
+ $GLOBALS['phpgw']->db->Execute("INSERT into fm_template
(id,owner,name,descr,chapter_id,entry_date) "
+ . " values ($id,'" .
$this->account . "','" .
$values['name'] . "','" .
$values['descr'] . "','" .
$values['chapter_id'] . "','" .
time() . "')");
- $template_id =
$this->db->get_last_insert_id('fm_template','id');
+// $template_id =
$this->db->get_last_insert_id('fm_template','id');
+ $template_id = $id;
$receipt['template_id'] = $template_id;
$receipt['message'][] = array('msg'=>lang('template %1
is added',$values['name']));
+
+ $GLOBALS['phpgw']->db->committrans();
return $receipt;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/class.sotemplate.php, 1.1.1.6,
nomail <=