[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7094] added "one time price items" to pdf contract
From: |
Lars Hopland Nestås |
Subject: |
[Fmsystem-commits] [7094] added "one time price items" to pdf contract |
Date: |
Wed, 09 Mar 2011 07:47:02 +0000 |
Revision: 7094
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7094
Author: larshn
Date: 2011-03-09 07:47:02 +0000 (Wed, 09 Mar 2011)
Log Message:
-----------
added "one time price items" to pdf contract
Modified Paths:
--------------
trunk/rental/inc/class.uimakepdf.inc.php
Modified: trunk/rental/inc/class.uimakepdf.inc.php
===================================================================
--- trunk/rental/inc/class.uimakepdf.inc.php 2011-03-09 07:45:39 UTC (rev
7093)
+++ trunk/rental/inc/class.uimakepdf.inc.php 2011-03-09 07:47:02 UTC (rev
7094)
@@ -344,15 +344,32 @@
$price_items =
rental_socontract_price_item::get_instance()->get(null, null, null, null, null,
null, array('contract_id' => $contract->get_id()));
-
+ $months =
rental_socontract::get_instance()->get_months_in_term($contract->get_term_id());
+
+
+
+ $one_time_price_items = array();
+ $termin_price_items = array();
+
+ foreach ($price_items as $item){
+ if($item->is_one_time()){
+
array_push($one_time_price_items, $item);
+ }else{
+
array_push($termin_price_items, $item);
+ }
+ }
+
$data = array
(
'contract' => $contract,
+ 'months' => $months,
'contract_party' => $party,
'contract_dates' =>
$contract_dates,
'composite' => $composite,
'units' => $units,
'price_items' =>$price_items,
+ 'one_time_price_items' =>
$one_time_price_items,
+ 'termin_price_items' =>
$termin_price_items,
'notification' => $notification,
'editable' => $editable,
'message' => isset($message) ?
$message : phpgw::get_var('message'),
@@ -362,7 +379,9 @@
);
$contract->check_consistency();
-
+
+
+
$this->get_pdf_templates();
$template_file =
'pdf/'.$this->pdf_templates[$_GET[pdf_template]][1];
$this->render($template_file, $data);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7094] added "one time price items" to pdf contract,
Lars Hopland Nestås <=