fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [6618] fixed display of number of contracts to be bil


From: Erik Holm-Larsen
Subject: [Fmsystem-commits] [6618] fixed display of number of contracts to be billed
Date: Thu, 18 Nov 2010 15:02:29 +0000

Revision: 6618
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6618
Author:   erikhl
Date:     2010-11-18 15:02:28 +0000 (Thu, 18 Nov 2010)
Log Message:
-----------
fixed display of number of contracts to be billed

Modified Paths:
--------------
    trunk/rental/inc/class.uibilling.inc.php
    trunk/rental/templates/base/billing_step2.php

Modified: trunk/rental/inc/class.uibilling.inc.php
===================================================================
--- trunk/rental/inc/class.uibilling.inc.php    2010-11-18 09:37:35 UTC (rev 
6617)
+++ trunk/rental/inc/class.uibilling.inc.php    2010-11-18 15:02:28 UTC (rev 
6618)
@@ -48,6 +48,7 @@
                        }
                        $contract_ids = phpgw::get_var('contract'); // Ids of 
the contracts to bill
                        $contract_ids_override = 
phpgw::get_var('override_start_date'); //Ids of the contracts that should 
override billing start date with first day in period
+                       var_dump($contract_ids_override);
                        $contract_bill_only_one_time = 
phpgw::get_var('bill_only_one_time');
                        if(($contract_ids != null && is_array($contract_ids) && 
count($contract_ids) > 0) || (isset($contract_bill_only_one_time) && 
is_array($contract_bill_only_one_time) && count($contract_bill_only_one_time) > 
0)) // User submitted contracts to bill
                        {
@@ -232,13 +233,13 @@
                                                if($type_id == 4) // Remove 
contract of a specific type (KF)
                                                {
                                                        $warningMsgs[] = 
lang('billing_removed_KF_contract') . " " . $contract->get_old_contract_id();
-                                                       $contracts[$id] = null;
+                                                       unset($contracts[$id]);
                                                        
$removed_contracts[$contract->get_id()] = $contract;
                                                } 
                                                else if(isset($total_price) && 
$total_price == 0) // Remove contract if total price is equal to zero
                                                {
                                                        $warningMsgs[] = 
lang('billing_removed_contract_part_1') . " " . 
$contract->get_old_contract_id() . " " . 
lang('billing_removed_contract_part_2');
-                                                       $contracts[$id] = null;
+                                                       unset($contracts[$id]);
                                                        $removed_contracts[$id] 
= $contract;
                                                }
                                                else // Prepare contract for 
billing
@@ -254,7 +255,7 @@
                                                                
$next_bill_timestamp = $contract->get_billing_start_date();
                                                                
$not_billed_contracts[$id] = $contract;
                                                                
$irregular_contracts[$id] = $contract;
-                                                               $contracts[$id] 
= null;
+                                                               
unset($contracts[$id]);
                                                        }
                                                        else
                                                        { 
@@ -269,7 +270,7 @@
                                                                } 
                                                                else
                                                                {
-                                                                       
$contracts[$id] = null;
+                                                                       
unset($contracts[$id]);
                                                                        
$irregular_contracts[$id] = $contract;
                                                                }
                                                        }

Modified: trunk/rental/templates/base/billing_step2.php
===================================================================
--- trunk/rental/templates/base/billing_step2.php       2010-11-18 09:37:35 UTC 
(rev 6617)
+++ trunk/rental/templates/base/billing_step2.php       2010-11-18 15:02:28 UTC 
(rev 6618)
@@ -274,12 +274,17 @@
                <tbody>
                                        <?php
                                        ksort($contracts);
+                                       //var_dump($contracts);
                                        
                                        // Run through all contracts selected 
for billing 
+                                       //$temp_index = 1;
+                                       //$temp_index2 = 1;
                                        foreach ($contracts as $id => $contract)
                                        {
+                                               //echo '<br/>'.$temp_index2 . 
'-'.$id.'=>';
                                                if(isset($contract))
                                                {
+                                                       //echo $id . '-' . 
$temp_index.' , ';
                                                ?>
                                                <tr>
                                                        <td><?php echo 
$contract->get_old_contract_id() ?>
@@ -305,7 +310,9 @@
                                                        </td>
                                                </tr>
                                                <?php
+                                               //$temp_index++;
                                                }
+                                               //$temp_index2++;
                                        }
                                ?>
                </tbody>




reply via email to

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