[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [13506] rental: price item type
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [13506] rental: price item type |
Date: |
Thu, 25 Jun 2015 11:27:29 +0000 |
Revision: 13506
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13506
Author: sigurdne
Date: 2015-06-25 11:27:28 +0000 (Thu, 25 Jun 2015)
Log Message:
-----------
rental: price item type
Modified Paths:
--------------
trunk/rental/inc/class.socontract_price_item.inc.php
trunk/rental/inc/model/class.contract_price_item.inc.php
trunk/rental/setup/phpgw_no.lang
trunk/rental/templates/base/price_item_partial.php
Modified: trunk/rental/inc/class.socontract_price_item.inc.php
===================================================================
--- trunk/rental/inc/class.socontract_price_item.inc.php 2015-06-25
11:26:59 UTC (rev 13505)
+++ trunk/rental/inc/class.socontract_price_item.inc.php 2015-06-25
11:27:28 UTC (rev 13506)
@@ -97,20 +97,25 @@
if($return_count) // We should only return a count
{
- $cols = 'COUNT(DISTINCT(id)) AS count';
+ $cols = 'COUNT(DISTINCT(rental_contract_price_item.id))
AS count';
$order = "";
}
else if(isset($filters['export']))
{
- $cols = 'id, price_item_id, contract_id, area, count,
agresso_id, title, is_area, price, total_price, is_one_time, date_start,
date_end';
+ $cols = "rental_contract_price_item.id,
rental_contract_price_item.price_item_id,"
+ . " rental_contract_price_item.contract_id,
rental_contract_price_item.area, rental_contract_price_item.count,"
+ . " rental_contract_price_item.agresso_id,
rental_contract_price_item.title, rental_contract_price_item.is_area,"
+ . " rental_contract_price_item.price,
rental_contract_price_item.total_price, rental_contract_price_item.is_one_time,"
+ . " rental_contract_price_item.date_start,
rental_contract_price_item.date_end";
}
else
{
- $cols = '*';
+ $cols = 'rental_contract_price_item.*,
rental_price_item.type';
}
$tables = "rental_contract_price_item";
- $joins = "";
+// $joins = "";
+ $joins = "{$this->join} rental_price_item ON
(rental_price_item.id = rental_contract_price_item.price_item_id)";
//var_dump("SELECT {$cols} FROM {$tables} {$joins} WHERE
{$condition} {$order}");
return "SELECT {$cols} FROM {$tables} {$joins} WHERE
{$condition} {$order}";
@@ -134,6 +139,9 @@
$price_item->set_total_price($this->unmarshal($this->db->f('total_price'),'float'));
$price_item->set_date_start($this->unmarshal($this->db->f('date_start'),'int'));
$price_item->set_date_end($this->unmarshal($this->db->f('date_end'),'int'));
+ $price_type_id = (int)$this->db->f('type');
+ $price_item->set_price_type_id($price_type_id);
+ $price_item->set_price_type_title($price_type_id);
}
return $price_item;
}
Modified: trunk/rental/inc/model/class.contract_price_item.inc.php
===================================================================
--- trunk/rental/inc/model/class.contract_price_item.inc.php 2015-06-25
11:26:59 UTC (rev 13505)
+++ trunk/rental/inc/model/class.contract_price_item.inc.php 2015-06-25
11:27:28 UTC (rev 13506)
@@ -201,7 +201,8 @@
// in "date" parser which requires a format
like: 2009/07/30 to work.
// EHL: Removed 2009-10-27, due to change to
int datatype.
'date_start' =>
$this->get_date_start()!=NULL?date($date_format, $this->get_date_start()):null,
- 'date_end' =>
$this->get_date_end()!=NULL?date($date_format, $this->get_date_end()):null
+ 'date_end' =>
$this->get_date_end()!=NULL?date($date_format, $this->get_date_end()):null,
+ 'price_type_title' =>
lang($this->get_price_type_title()),
);
}
Modified: trunk/rental/setup/phpgw_no.lang
===================================================================
--- trunk/rental/setup/phpgw_no.lang 2015-06-25 11:26:59 UTC (rev 13505)
+++ trunk/rental/setup/phpgw_no.lang 2015-06-25 11:27:28 UTC (rev 13506)
@@ -1,3 +1,5 @@
+day rental no Dag
+hour rental no Time
1-6 characters rental no 1-6 tegn
6 characters rental no 6 tegn
account_in rental no Art/konto inntektsside
Modified: trunk/rental/templates/base/price_item_partial.php
===================================================================
--- trunk/rental/templates/base/price_item_partial.php 2015-06-25 11:26:59 UTC
(rev 13505)
+++ trunk/rental/templates/base/price_item_partial.php 2015-06-25 11:27:28 UTC
(rev 13506)
@@ -79,6 +79,11 @@
sortable: true
},
{
+ key: "price_type_title",
+ label: "<?php echo lang('type') ?>",
+ sortable: false
+ },
+ {
key: "id",
hidden: true
},
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [13506] rental: price item type,
Sigurd Nes <=