fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7085] Rental: adjusted excel-export of contract pric


From: Yngve Espelid
Subject: [Fmsystem-commits] [7085] Rental: adjusted excel-export of contract price items to include all price items ( also billed)
Date: Tue, 08 Mar 2011 13:14:37 +0000

Revision: 7085
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7085
Author:   yes
Date:     2011-03-08 13:14:36 +0000 (Tue, 08 Mar 2011)
Log Message:
-----------
Rental: adjusted excel-export of contract price items to include all price 
items (also billed)

Modified Paths:
--------------
    trunk/rental/inc/class.socontract_price_item.inc.php
    trunk/rental/inc/class.uicontract.inc.php

Modified: trunk/rental/inc/class.socontract_price_item.inc.php
===================================================================
--- trunk/rental/inc/class.socontract_price_item.inc.php        2011-03-08 
12:50:05 UTC (rev 7084)
+++ trunk/rental/inc/class.socontract_price_item.inc.php        2011-03-08 
13:14:36 UTC (rev 7085)
@@ -74,6 +74,10 @@
                if(isset($filters['one_time'])){
                        $filter_clauses[] = "is_one_time";
                }
+               else if($filters['include_billed'])
+               {
+                       // Do not add filter on showing only price items that 
has not yet been billed
+               }
                else{
                        $filter_clauses[] = "NOT is_billed";
                }
@@ -102,6 +106,7 @@
                $tables = "rental_contract_price_item";
                $joins = "";
 
+               //var_dump("SELECT {$cols} FROM {$tables} {$joins} WHERE 
{$condition} {$order}");
                return "SELECT {$cols} FROM {$tables} {$joins} WHERE 
{$condition} {$order}";
        }
        

Modified: trunk/rental/inc/class.uicontract.inc.php
===================================================================
--- trunk/rental/inc/class.uicontract.inc.php   2011-03-08 12:50:05 UTC (rev 
7084)
+++ trunk/rental/inc/class.uicontract.inc.php   2011-03-08 13:14:36 UTC (rev 
7085)
@@ -182,7 +182,7 @@
                                                if(isset($price_items_only))
                                                {
                                                        //export contract price 
items
-                                                       $result_objects_pi = 
rental_socontract_price_item::get_instance()->get(null, null, null, null, null, 
null, array('contract_id' => $result->get_id(),'export'=>'true'));
+                                                       $result_objects_pi = 
rental_socontract_price_item::get_instance()->get(null, null, null, null, null, 
null, array('contract_id' => 
$result->get_id(),'export'=>'true','include_billed'=>'true'));
                                                        foreach 
($result_objects_pi as $result_pi) {
                                                                
if(isset($result_pi))
                                                                {




reply via email to

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