fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [11986] fix on billing tems


From: Erik Holm-Larsen
Subject: [Fmsystem-commits] [11986] fix on billing tems
Date: Thu, 22 May 2014 10:12:05 +0000

Revision: 11986
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11986
Author:   erikhl
Date:     2014-05-22 10:12:03 +0000 (Thu, 22 May 2014)
Log Message:
-----------
fix on billing tems

Modified Paths:
--------------
    trunk/rental/inc/class.sobilling.inc.php
    trunk/rental/templates/base/billing_step1.php

Modified: trunk/rental/inc/class.sobilling.inc.php
===================================================================
--- trunk/rental/inc/class.sobilling.inc.php    2014-05-16 12:38:17 UTC (rev 
11985)
+++ trunk/rental/inc/class.sobilling.inc.php    2014-05-22 10:12:03 UTC (rev 
11986)
@@ -210,7 +210,7 @@
                {
                        if($this->billing_terms == null)
                        {
-                               $sql     = "SELECT id, title FROM 
rental_billing_term WHERE NOT months=0 ORDER BY months DESC";
+                               $sql     = "SELECT id, title FROM 
rental_billing_term ORDER BY months DESC";
                                //FIXME Sigurd 21.june 2010: this query trigger 
fetch_single mode for next_record()
                                $this->db->query($sql, __LINE__, __FILE__, 
false, true);
                                $results = array();

Modified: trunk/rental/templates/base/billing_step1.php
===================================================================
--- trunk/rental/templates/base/billing_step1.php       2014-05-16 12:38:17 UTC 
(rev 11985)
+++ trunk/rental/templates/base/billing_step1.php       2014-05-22 10:12:03 UTC 
(rev 11986)
@@ -74,7 +74,7 @@
                                                <option value="<?php echo 
$term_id ?>-3" <?php echo ($term_id."-3" == $billing_term_selection ? 
'selected="selected"' : '')?>>3. kvartal</option>
                                                <option value="<?php echo 
$term_id ?>-4" <?php echo ($term_id."-4" == $billing_term_selection ? 
'selected="selected"' : '')?>>4. kvartal</option>
                                        <?php }
-                                       else{?>
+                                       else if($current == 3){?>
                                         <?php 
                                                $this_month = date('n');
                                                for($i = 1; $i <= 12; $i++)
@@ -83,7 +83,9 @@
                                                        <option value="<?php 
echo $term_id ?>-<?php echo $i ?>"<?php echo ($term_id."-".$i == 
$billing_term_selection ? ' selected="selected"' : '')?>><?php echo lang('month 
' . $i . ' capitalized') ?></option>
                                                        <?php
                                                }
-                                       }
+                                       }else{?>
+                                        <option value="<?php echo $term_id 
?>-1" <?php echo ($term_id."-1" == $billing_term_selection ? 
'selected="selected"' : '')?>><?php echo lang($term_title) ?></option>
+                                       <?php }
                                        $current++;?>
                                        </optgroup>
                        <?php }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]