[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6747] Merge 6744:6746 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [6747] Merge 6744:6746 from trunk |
Date: |
Mon, 10 Jan 2011 21:49:46 +0000 |
Revision: 6747
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6747
Author: sigurdne
Date: 2011-01-10 21:49:46 +0000 (Mon, 10 Jan 2011)
Log Message:
-----------
Merge 6744:6746 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/booking/jasper/templates/application.jrxml
branches/Version-1_0-branch/bookingfrontend/inc/class.uiapplication.inc.php
branches/Version-1_0-branch/property/inc/class.soproject.inc.php
branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
Property Changed:
----------------
branches/Version-1_0-branch/
Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
-
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743
+
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746
Modified: branches/Version-1_0-branch/booking/jasper/templates/application.jrxml
===================================================================
--- branches/Version-1_0-branch/booking/jasper/templates/application.jrxml
2011-01-10 21:46:14 UTC (rev 6746)
+++ branches/Version-1_0-branch/booking/jasper/templates/application.jrxml
2011-01-10 21:49:46 UTC (rev 6747)
@@ -25,14 +25,6 @@
<style name="Sans_Bold" fontName="FreeSerif" fontSize="10"
isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
<style name="Sans_Italic" fontName="FreeSerif" fontSize="10"
isBold="false" isItalic="true" isUnderline="false" isStrikeThrough="false"/>
<style name="Sans_Bold_Italic" fontName="FreeSerif" fontSize="10"
isBold="true" isItalic="true" isUnderline="false" isStrikeThrough="false"/>
- <subDataset name="resources">
- <parameter name="APPLICATION_ID" class="java.lang.Integer"/>
- <queryString>
- <![CDATA[SELECT bb_resource.name AS resource_name,
bb_resource.type AS resource_type FROM
bb_application,bb_application_resource,bb_resource WHERE bb_application.id =
$P!{APPLICATION_ID} AND bb_application.id =
bb_application_resource.application_id AND bb_application_resource.resource_id
= bb_resource.id]]>
- </queryString>
- <field name="resource_name" class="java.lang.String"/>
- <field name="resource_type" class="java.lang.String"/>
- </subDataset>
<parameter name="BK_APPLICATION_ID" class="java.lang.String"/>
<parameter name="BK_BUILDING_NAME" class="java.lang.String"/>
<queryString>
@@ -92,26 +84,6 @@
</textElement>
<text><![CDATA[Leie av kommunale bygg, anlegg
og byrom.]]></text>
</staticText>
- <componentElement>
- <reportElement x="227" y="131" width="312"
height="13"/>
- <jr:list
xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components"
xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components
http://jasperreports.sourceforge.net/xsd/components.xsd"
printOrder="Horizontal">
- <datasetRun subDataset="resources">
- <datasetParameter
name="APPLICATION_ID">
-
<datasetParameterExpression><![CDATA[$F{application_id}]]></datasetParameterExpression>
- </datasetParameter>
-
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
- </datasetRun>
- <jr:listContents height="13"
width="312">
- <textField>
- <reportElement
style="Sans_Bold" x="0" y="0" width="312" height="13"/>
- <textElement>
- <font
isUnderline="false" pdfFontName="Helvetica" isPdfEmbedded="true"/>
- </textElement>
- <textFieldExpression
class="java.lang.String"><![CDATA[$F{resource_name}]]></textFieldExpression>
- </textField>
- </jr:listContents>
- </jr:list>
- </componentElement>
<staticText>
<reportElement style="headers" x="6" y="105"
width="546" height="20"/>
<textElement/>
Modified:
branches/Version-1_0-branch/bookingfrontend/inc/class.uiapplication.inc.php
===================================================================
--- branches/Version-1_0-branch/bookingfrontend/inc/class.uiapplication.inc.php
2011-01-10 21:46:14 UTC (rev 6746)
+++ branches/Version-1_0-branch/bookingfrontend/inc/class.uiapplication.inc.php
2011-01-10 21:49:46 UTC (rev 6747)
@@ -53,7 +53,7 @@
catch(Exception $e)
{
$errors[] = $e->getMessage();
- echo
"<pre>\nErrors:";print_r($errors);echo "\nID:";print_r($id);echo
"\nJasperParam:";print_r($jasper_parameters);exit;
+ echo
"<pre>\nErrors:";print_r($errors);exit;
}
}
Modified: branches/Version-1_0-branch/property/inc/class.soproject.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soproject.inc.php
2011-01-10 21:46:14 UTC (rev 6746)
+++ branches/Version-1_0-branch/property/inc/class.soproject.inc.php
2011-01-10 21:49:46 UTC (rev 6747)
@@ -108,7 +108,7 @@
$sort =
isset($data['sort'])?$data['sort']:'DESC';
$order =
isset($data['order'])?$data['order']:'';
$cat_id = isset($data['cat_id']) &&
$data['cat_id'] ? $data['cat_id'] : 0;
- $status_id =
isset($data['status_id'])?$data['status_id']:'';
+ $status_id = isset($data['status_id']) &&
$data['status_id'] ? $data['status_id'] : 'open';
$start_date = isset($data['start_date']) &&
$data['start_date'] ? (int)$data['start_date'] : 0;
$end_date = isset($data['end_date']) &&
$data['end_date'] ? (int)$data['end_date'] : 0;
$allrows =
isset($data['allrows'])?$data['allrows']:'';
@@ -371,12 +371,27 @@
$where= 'AND';
}
- if ($status_id)
+ if ($status_id && $status_id != 'all')
{
- $filtermethod .= " $where
fm_project.status='$status_id' ";
+
+ if($status_id == 'open')
+ {
+ $_status_filter = array();
+ $this->db->query("SELECT * FROM
fm_project_status WHERE closed IS NULL");
+ while($this->db->next_record())
+ {
+ $_status_filter[] =
$this->db->f('id');
+ }
+ $filtermethod .= " $where
fm_project.status IN ('" . implode("','", $_status_filter) . "')";
+ }
+ else
+ {
+ $filtermethod .= " $where
fm_project.status='$status_id' ";
+ }
$where= 'AND';
}
+
if($wo_hour_cat_id)
{
$filtermethod .= " $where
fm_wo_hours_category.id=$wo_hour_cat_id ";
Modified: branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
2011-01-10 21:46:14 UTC (rev 6746)
+++ branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
2011-01-10 21:49:46 UTC (rev 6747)
@@ -130,7 +130,7 @@
$sort = isset($data['sort']) &&
$data['sort'] ? $data['sort'] : 'DESC';
$order = isset($data['order']) ?
$data['order'] : '';
$cat_id = isset($data['cat_id']) &&
$data['cat_id'] ? $data['cat_id'] : 0;
- $status_id = isset($data['status_id']) &&
$data['status_id'] ? $data['status_id'] : 0;
+ $status_id = isset($data['status_id']) &&
$data['status_id'] ? $data['status_id'] : 'open';
$start_date = isset($data['start_date']) &&
$data['start_date'] ? (int)$data['start_date'] : 0;
$end_date = isset($data['end_date']) &&
$data['end_date'] ? (int)$data['end_date'] : 0;
$allrows = isset($data['allrows']) ?
$data['allrows'] : '';
@@ -366,11 +366,18 @@
if ($order)
{
- $ordermethod = " order by $order $sort";
+ if($order == 'workorder_id')
+ {
+ $ordermethod = " ORDER BY
fm_workorder.project_id {$sort},fm_workorder.id {$sort}";
+ }
+ else
+ {
+ $ordermethod = " ORDER BY $order $sort";
+ }
}
else
{
- $ordermethod = ' order by fm_workorder.id DESC';
+ $ordermethod = ' ORDER BY
fm_workorder.project_id DESC,fm_workorder.id DESC';
}
$where= 'WHERE';
@@ -400,9 +407,23 @@
$where= 'AND';
}
- if ($status_id)
+ if ($status_id && $status_id != 'all')
{
- $filtermethod .= " $where
fm_workorder.status='$status_id' ";
+
+ if($status_id == 'open')
+ {
+ $_status_filter = array();
+ $this->db->query("SELECT * FROM
fm_workorder_status WHERE delivered IS NULL AND closed IS NULL");
+ while($this->db->next_record())
+ {
+ $_status_filter[] =
$this->db->f('id');
+ }
+ $filtermethod .= " $where
fm_workorder.status IN ('" . implode("','", $_status_filter) . "')";
+ }
+ else
+ {
+ $filtermethod .= " $where
fm_workorder.status='$status_id' ";
+ }
$where= 'AND';
}
Modified: branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
2011-01-10 21:46:14 UTC (rev 6746)
+++ branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
2011-01-10 21:49:46 UTC (rev 6747)
@@ -248,8 +248,8 @@
array_unshift
($values_combo_box[1]['cat_list'],$default_value);
$values_combo_box[2] =
$this->bo->select_status_list('filter',$this->status_id);
- $default_value = array
('id'=>'','name'=>lang('no status'));
- array_unshift
($values_combo_box[2],$default_value);
+ array_unshift ($values_combo_box[2],array
('id'=>'all','name'=> lang('all')));
+ array_unshift ($values_combo_box[2],array
('id'=>'open','name'=> lang('open')));
$values_combo_box[3] =
$this->bocommon->select_category_list(array('format'=>'filter','selected' =>
$this->wo_hour_cat_id,'type' =>'wo_hours','order'=>'id'));
$default_value = array
('id'=>'','name'=>lang('no hour category'));
@@ -618,6 +618,17 @@
)),
'parameters' =>
$parameters
);
+ $datatable['rowactions']['action'][] =
array
+ (
+ 'my_name'
=> 'edit',
+ 'statustext'
=> lang('Add a workorder to this project'),
+ 'text'
=> lang('Add a workorder to this project'),
+ 'action'
=> $GLOBALS['phpgw']->link('/index.php',array
+ (
+ 'menuaction'
=> 'property.uiworkorder.edit',
+ )),
+ 'parameters' =>
$parameters2
+ );
}
else
{
@@ -1710,6 +1721,7 @@
unset($values['location_data']);
+
unset($values['p']);
$receipt = $this->bo->save($values, 'add',
array());
Modified: branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
2011-01-10 21:46:14 UTC (rev 6746)
+++ branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
2011-01-10 21:49:46 UTC (rev 6747)
@@ -262,8 +262,8 @@
array_unshift
($values_combo_box[1]['cat_list'],$default_value);
$values_combo_box[2] =
$this->bo->select_status_list('filter',$this->status_id);
- $default_value = array ('id'=>'','name'=>
lang('no status'));
- array_unshift
($values_combo_box[2],$default_value);
+ array_unshift ($values_combo_box[2],array
('id'=>'all','name'=> lang('all')));
+ array_unshift ($values_combo_box[2],array
('id'=>'open','name'=> lang('open')));
$values_combo_box[3] =
$this->bocommon->select_category_list(array('format'=>'filter','selected' =>
$this->wo_hour_cat_id,'type' =>'wo_hours','order'=>'id'));
$default_value = array ('id'=>'','name'=>
lang('no hour category'));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6747] Merge 6744:6746 from trunk,
Sigurd Nes <=