[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6574] rental: updated contracts list for regulations
From: |
Joakim Hop |
Subject: |
[Fmsystem-commits] [6574] rental: updated contracts list for regulations |
Date: |
Wed, 10 Nov 2010 12:16:44 +0000 |
Revision: 6574
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6574
Author: joakim_hop
Date: 2010-11-10 12:16:44 +0000 (Wed, 10 Nov 2010)
Log Message:
-----------
rental: updated contracts list for regulations
Modified Paths:
--------------
trunk/rental/inc/class.uiadjustment.inc.php
trunk/rental/templates/base/adjustment.php
Modified: trunk/rental/inc/class.uiadjustment.inc.php
===================================================================
--- trunk/rental/inc/class.uiadjustment.inc.php 2010-11-10 11:41:53 UTC (rev
6573)
+++ trunk/rental/inc/class.uiadjustment.inc.php 2010-11-10 12:16:44 UTC (rev
6574)
@@ -156,7 +156,7 @@
$adjustment_date =
strtotime(phpgw::get_var('adjustment_date_hidden'));
if(isset($adjustment)){
- $adjustment->set_year(phpgw::get_var('year'));
+
$adjustment->set_year(phpgw::get_var('adjustment_year'));
$adjustment->set_adjustment_date($adjustment_date);
$adjustment->set_price_item_id(0);
if(isset($responsibility_id) &&
$responsibility_id > 0)
Modified: trunk/rental/templates/base/adjustment.php
===================================================================
--- trunk/rental/templates/base/adjustment.php 2010-11-10 11:41:53 UTC (rev
6573)
+++ trunk/rental/templates/base/adjustment.php 2010-11-10 12:16:44 UTC (rev
6574)
@@ -61,7 +61,28 @@
<label for="adjustment_year"><?php echo lang('year')
?></label>
</dt>
<dd>
- <?php echo $adjustment->get_year(); ?>
+ <?php
+
+ if ($editable) {
+ ?>
+ <select name="adjustment_year"
id="adjustment_year">
+ <?php
+ $this_year = date('Y');
+ $years =
rental_contract::get_year_range();
+ foreach($years as $year)
+ {
+ ?>
+ <option value="<?php echo $year
?>"<?php echo $this_year == $year ? ' selected="selected"' : '' ?>><?php echo
$year ?></option>
+ <?php
+ }
+ ?>
+ </select>
+ <?php
+ }
+ else{
+ echo $adjustment->get_year();
+ }
+ ?>
</dd>
<dt>
<label for="adjustment_date"><?php echo
lang('adjustment_date') ?></label>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6574] rental: updated contracts list for regulations,
Joakim Hop <=