[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc class.uiagreement.inc.php, 1.12 class.ui
From: |
sigurdne |
Subject: |
[Phpgroupware-cvs] property/inc class.uiagreement.inc.php, 1.12 class.uiwo_hour.inc.php, 1.12 class.sopricebook.inc.php, 1.11 class.soagreement.inc.php, 1.8 class.boagreement.inc.php, 1.6 |
Date: |
Tue, 28 Jun 2005 15:23:00 +0200 |
Update of property/inc
Modified Files:
Branch: MAIN
class.uiagreement.inc.php lines: +40 -35
class.uiwo_hour.inc.php lines: +4 -5
class.sopricebook.inc.php lines: +22 -23
class.soagreement.inc.php lines: +7 -0
class.boagreement.inc.php lines: +6 -2
Log Message:
no message
====================================================
Index: property/inc/class.uiagreement.inc.php
diff -u property/inc/class.uiagreement.inc.php:1.11
property/inc/class.uiagreement.inc.php:1.12
--- property/inc/class.uiagreement.inc.php:1.11 Wed Jun 1 08:16:51 2005
+++ property/inc/class.uiagreement.inc.php Tue Jun 28 13:23:07 2005
@@ -1173,13 +1173,12 @@
$agreement =
$this->bo->read_single(array('agreement_id'=>$agreement_id));
$values =
$this->bo->read_single_item(array('agreement_id'=>$agreement_id,'id'=>$id));
-
$link_data = array
(
- 'menuaction' =>
$this->currentapp.'.uiagreement.edit_item',
+ 'menuaction' =>
$this->currentapp.'.uiagreement.edit_item',
'agreement_id' => $agreement_id,
- 'id' => $id,
- 'role' => $this->role
+ 'id' => $id,
+ 'role' => $this->role
);
@@ -1229,6 +1228,7 @@
if($id)
{
$list =
$this->bo->read_prizing(array('agreement_id'=>$agreement_id,'activity_id'=>$id));
+ $activity_descr
=$this->bo->get_activity_descr($id);
}
$uicols = $this->bo->uicols;
@@ -1240,7 +1240,6 @@
{
$set_column[]=True;
}
-//_debug_array($list);
$table_update[] = array
(
@@ -1258,39 +1257,41 @@
$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'],
+ 'activity_descr' =>
$activity_descr,
+ 'lang_descr' =>
lang('Descr'),
+ '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'),
- 'lang_cancel'
=> lang('cancel'),
- 'lang_apply'
=> lang('apply'),
+ 'lang_category' =>
lang('category'),
+ 'lang_save' =>
lang('save'),
+ 'lang_cancel' =>
lang('cancel'),
+ 'lang_apply' =>
lang('apply'),
'lang_apply_statustext' =>
lang('Apply the values'),
'lang_cancel_statustext' =>
lang('Leave the agreement untouched and return back to the list'),
'lang_save_statustext' =>
lang('Save the agreement and return back to the list'),
- 'lang_dateformat'
=> lang(strtolower($dateformat)),
+ 'lang_dateformat' =>
lang(strtolower($dateformat)),
'dateformat_validate' =>
$dateformat_validate,
- 'onKeyUp'
=> $onKeyUp,
- 'onBlur'
=> $onBlur,
- 'dateformat_source'
=> './'.$this->currentapp.'/inc/dateformat.js',
- 'lang_attributes'
=> lang('Attributes'),
- 'attributes_header'
=> $attributes_header,
- 'attributes_values'
=> $values['attributes'],
- 'lookup_functions'
=> $values['lookup_functions'],
- 'dateformat'
=> $dateformat,
-
- 'jsDateFormat'
=> $jsDateFormat,
- 'date_img'
=> $cal_info['img'],
- 'lang_datetitle'
=> lang('Select date'),
+ 'onKeyUp' =>
$onKeyUp,
+ 'onBlur' =>
$onBlur,
+ 'dateformat_source' =>
'./'.$this->currentapp.'/inc/dateformat.js',
+ 'lang_attributes' =>
lang('Attributes'),
+ 'attributes_header' =>
$attributes_header,
+ 'attributes_values' =>
$values['attributes'],
+ 'lookup_functions' =>
$values['lookup_functions'],
+ 'dateformat' =>
$dateformat,
+
+ 'jsDateFormat' =>
$jsDateFormat,
+ 'date_img' =>
$cal_info['img'],
+ 'lang_datetitle' =>
lang('Select date'),
'calendar_setup_start' =>
"Calendar.setup({inputField : 'start_date',ifFormat : '" . $jsDateFormat .
"',button : 'start_date-trigger'});",
'calendar_setup_end' =>
"Calendar.setup({inputField : 'end_date',ifFormat : '" . $jsDateFormat .
"',button : 'end_date-trigger'});",
- 'lang_agreement'
=> lang('Agreement'),
- 'agreement_name'
=> $agreement['name'],
+ 'lang_agreement' =>
lang('Agreement'),
+ 'agreement_name' =>
$agreement['name'],
'table_add'
=> $table_add,
'values'
=> $content,
@@ -1355,6 +1356,7 @@
if($id)
{
$list =
$this->bo->read_prizing(array('agreement_id'=>$agreement_id,'activity_id'=>$id));
+ $activity_descr
=$this->bo->get_activity_descr($id);
}
$uicols = $this->bo->uicols;
@@ -1364,13 +1366,16 @@
$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'],
+ 'activity_descr' =>
$activity_descr,
+ 'lang_descr' =>
lang('Descr'),
+ '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_cancel'
=> lang('cancel'),
+ 'lang_category' =>
lang('category'),
+ 'lang_cancel' =>
lang('cancel'),
'lang_cancel_statustext' =>
lang('Leave the agreement untouched and return back to the list'),
'lang_dateformat'
=> lang(strtolower($dateformat)),
====================================================
Index: property/inc/class.uiwo_hour.inc.php
diff -u property/inc/class.uiwo_hour.inc.php:1.11
property/inc/class.uiwo_hour.inc.php:1.12
--- property/inc/class.uiwo_hour.inc.php:1.11 Thu May 12 21:26:28 2005
+++ property/inc/class.uiwo_hour.inc.php Tue Jun 28 13:23:07 2005
@@ -33,7 +33,7 @@
'tender' => True,
'view' => True,
'template' => True,
- 'save_template' => True,
+ 'save_template' => True,
'prizebook' => True,
'add' => True,
'edit' => True,
@@ -50,7 +50,7 @@
$this->create_html =
CreateObject('phpgwapi.xslttemplates');
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
- $this->bo =
CreateObject($this->currentapp.'.bowo_hour',True);
+ $this->bo =
CreateObject($this->currentapp.'.bowo_hour',True);
$this->boworkorder =
CreateObject($this->currentapp.'.boworkorder');
$this->boproject =
CreateObject($this->currentapp.'.boproject');
$this->bopricebook =
CreateObject($this->currentapp.'.bopricebook');
@@ -498,8 +498,7 @@
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uilocation.stop&perm=1&acl_location='
. $this->acl2_location);
}
- $GLOBALS['phpgw']->xslttpl->add_file(array('wo_hour',
-
'menu'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('wo_hour','menu'));
$delete = get_var('delete',array('POST','GET'));
$hour_id = get_var('hour_id',array('POST','GET'));
====================================================
Index: property/inc/class.sopricebook.inc.php
diff -u property/inc/class.sopricebook.inc.php:1.10
property/inc/class.sopricebook.inc.php:1.11
--- property/inc/class.sopricebook.inc.php:1.10 Thu May 12 21:26:28 2005
+++ property/inc/class.sopricebook.inc.php Tue Jun 28 13:23:07 2005
@@ -198,7 +198,7 @@
}
else
{
- $ordermethod = ' order by
fm_vendor.org_name,activity_id';
+ $ordermethod = ' order by activity_id';
}
if ($cat_id > 0)
@@ -220,17 +220,16 @@
}
- $sql = "SELECT fm_activities.num,
fm_activities.unit, fm_activities.dim_d, fm_activities.ns3420,
fm_activities.descr AS descr,"
- . " fm_activities.base_descr,
fm_activity_price_index.activity_id, fm_vendor.org_name, fm_branch.descr AS
branch,"
- . " fm_agreement.vendor_id,
fm_activity_price_index.total_cost, fm_activity_price_index.m_cost,"
- . " fm_activity_price_index.w_cost,
fm_activity_price_index.index_count, fm_activity_price_index.this_index,
fm_agreement.id"
- . " FROM fm_activities $this->join "
- . " fm_activity_price_index ON fm_activities.id =
fm_activity_price_index.activity_id $this->join "
- . " fm_vendor ON fm_activity_price_index.vendor_id =
fm_vendor.id $this->join "
- . " fm_branch ON fm_activities.branch_id = fm_branch.id
$this->join "
- . " fm_agreement ON fm_activity_price_index.agreement_id
= fm_agreement.id "
- . " WHERE fm_agreement.status='active' AND
(fm_agreement.vendor_id $vendor_condition and current_index is not null "
- . " OR (fm_agreement.vendor_id
$vendor_condition) AND (fm_activity_price_index.this_index IS NULL))
$querymethod";
+ $sql = "SELECT fm_activities.num, fm_activities.unit,
fm_activities.dim_d, fm_activities.ns3420, fm_activities.descr AS descr,"
+ . " fm_activities.base_descr,
fm_activity_price_index.activity_id, fm_branch.descr AS branch,"
+ . " fm_agreement.vendor_id,
fm_activity_price_index.total_cost, fm_activity_price_index.m_cost,"
+ . " fm_activity_price_index.w_cost,
fm_activity_price_index.index_count, fm_activity_price_index.this_index,
fm_agreement.id"
+ . " FROM fm_activities "
+ . " $this->join fm_activity_price_index ON
fm_activities.id = fm_activity_price_index.activity_id "
+ . " $this->join fm_branch ON fm_activities.branch_id =
fm_branch.id "
+ . " $this->join fm_agreement ON
fm_activity_price_index.agreement_id = fm_agreement.id "
+ . " WHERE fm_agreement.status='active' AND
(fm_agreement.vendor_id $vendor_condition and current_index is not null "
+ . " OR (fm_agreement.vendor_id $vendor_condition) AND
(fm_activity_price_index.this_index IS NULL)) $querymethod";
//echo $sql;
@@ -253,17 +252,17 @@
$pricebook[] = array
(
'activity_id' =>
$this->db->f('activity_id'),
- 'num' =>
$this->db->f('num'),
- 'branch' =>
$this->db->f('branch'),
- 'vendor_id' =>
$this->db->f('vendor_id'),
- 'm_cost' =>
$this->db->f('m_cost'),
- 'w_cost' =>
$this->db->f('w_cost'),
+ 'num' =>
$this->db->f('num'),
+ 'branch' =>
$this->db->f('branch'),
+ 'vendor_id' =>
$this->db->f('vendor_id'),
+ 'm_cost' =>
$this->db->f('m_cost'),
+ 'w_cost' =>
$this->db->f('w_cost'),
'total_cost' =>
$this->db->f('total_cost'),
'this_index' =>
$this->db->f('this_index'),
- 'unit' =>
$this->db->f('unit'),
- 'dim_d' =>
$this->db->f('dim_d'),
- 'ns3420_id' =>
$this->db->f('ns3420'),
- 'descr' =>
stripslashes($this->db->f('descr')),
+ 'unit' =>
$this->db->f('unit'),
+ 'dim_d' =>
$this->db->f('dim_d'),
+ 'ns3420_id' =>
$this->db->f('ns3420'),
+ 'descr' =>
stripslashes($this->db->f('descr')),
'base_descr' =>
stripslashes($this->db->f('base_descr')),
'index_count' =>
$this->db->f('index_count')
);
@@ -770,7 +769,7 @@
function add_activity_vendor($values)
{
- $this->db->query("SELECT count(*) FROM
fm_activity_price_index where activity_id='" . $values['activity_id'] . "'
and vendor_id='" . $values['vendor_id'] . "'",__LINE__,__FILE__);
+ $this->db->query("SELECT count(*) FROM
fm_activity_price_index WHERE activity_id='" . $values['activity_id'] . "' and
vendor_id='" . $values['vendor_id'] . "'",__LINE__,__FILE__);
$this->db->next_record();
====================================================
Index: property/inc/class.soagreement.inc.php
diff -u property/inc/class.soagreement.inc.php:1.7
property/inc/class.soagreement.inc.php:1.8
--- property/inc/class.soagreement.inc.php:1.7 Wed Jun 1 08:16:51 2005
+++ property/inc/class.soagreement.inc.php Tue Jun 28 13:23:07 2005
@@ -1558,6 +1558,13 @@
}
return $status_entries;
}
+
+ function get_activity_descr($id)
+ {
+ $this->db->query("SELECT descr FROM fm_activities WHERE
id = $id",__LINE__,__FILE__);
+ $this->db->next_record();
+ return stripslashes($this->db->f('descr'));
+ }
}
?>
====================================================
Index: property/inc/class.boagreement.inc.php
diff -u property/inc/class.boagreement.inc.php:1.5
property/inc/class.boagreement.inc.php:1.6
--- property/inc/class.boagreement.inc.php:1.5 Thu May 12 21:26:28 2005
+++ property/inc/class.boagreement.inc.php Tue Jun 28 13:23:07 2005
@@ -758,6 +758,10 @@
return $status_list;
}
-
+
+ function get_activity_descr($id)
+ {
+ return $this->so->get_activity_descr($id);
+ }
}
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/inc class.uiagreement.inc.php, 1.12 class.uiwo_hour.inc.php, 1.12 class.sopricebook.inc.php, 1.11 class.soagreement.inc.php, 1.8 class.boagreement.inc.php, 1.6,
sigurdne <=