[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [12752] Syncromind: Merge 12685:12750 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [12752] Syncromind: Merge 12685:12750 from trunk |
Date: |
Mon, 16 Feb 2015 09:55:49 +0000 |
Revision: 12752
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12752
Author: sigurdne
Date: 2015-02-16 09:55:48 +0000 (Mon, 16 Feb 2015)
Log Message:
-----------
Syncromind: Merge 12685:12750 from trunk
Modified Paths:
--------------
branches/dev-syncromind/phpgwapi/inc/class.vfs_fileoperation_filesystem.inc.php
branches/dev-syncromind/property/inc/class.uiXport.inc.php
branches/dev-syncromind/property/inc/soap_client/braarkiv/soap.php
branches/dev-syncromind/property/templates/base/invoice.xsl
branches/dev-syncromind/rental/inc/class.socomposite.inc.php
branches/dev-syncromind/rental/inc/class.uicomposite.inc.php
branches/dev-syncromind/rental/inc/model/class.agresso_lg04.inc.php
branches/dev-syncromind/rental/setup/phpgw_no.lang
branches/dev-syncromind/rental/templates/base/composite_list_partial.php
Property Changed:
----------------
branches/dev-syncromind/
Property changes on: branches/dev-syncromind
___________________________________________________________________
Modified: svn:mergeinfo
-
/trunk:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683
+
/trunk:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750
Modified:
branches/dev-syncromind/phpgwapi/inc/class.vfs_fileoperation_filesystem.inc.php
===================================================================
---
branches/dev-syncromind/phpgwapi/inc/class.vfs_fileoperation_filesystem.inc.php
2015-02-16 09:27:47 UTC (rev 12751)
+++
branches/dev-syncromind/phpgwapi/inc/class.vfs_fileoperation_filesystem.inc.php
2015-02-16 09:55:48 UTC (rev 12752)
@@ -31,16 +31,31 @@
}
+ private function _filesize($filename)
+ {
+ $a = fopen($filename, 'r');
+ fseek($a, 0, SEEK_END);
+ $filesize = ftell($a);
+ fclose($a);
+ return $filesize;
+ }
+
public function filesize($path_parts)
{
$path = $path_parts->real_full_path;
- return filesize($path);
+
+ if(!$filesize = @filesize($path))
+ {
+ $filesize = $this->_filesize($path);
+ }
+ return $filesize;
}
public function read($path_parts)
{
$path = $path_parts->real_full_path;
- $filesize = filesize($path);
+
+ $filesize = $this->_filesize($path);
$contents = false;
if( $filesize > 0 && $fp = fopen($path, 'rb'))
{
@@ -126,4 +141,4 @@
- }
+ }
\ No newline at end of file
Modified: branches/dev-syncromind/property/inc/class.uiXport.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uiXport.inc.php 2015-02-16
09:27:47 UTC (rev 12751)
+++ branches/dev-syncromind/property/inc/class.uiXport.inc.php 2015-02-16
09:55:48 UTC (rev 12752)
@@ -543,6 +543,7 @@
'lang_submit' =>
lang('Submit'),
'lang_cancel' =>
lang('Cancel'),
'form_action' =>
$GLOBALS['phpgw']->link('/index.php', $link_data),
+ 'cancel_action' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'property.uiinvoice.index')),
'lang_save' =>
lang('save')
);
Modified: branches/dev-syncromind/property/inc/soap_client/braarkiv/soap.php
===================================================================
--- branches/dev-syncromind/property/inc/soap_client/braarkiv/soap.php
2015-02-16 09:27:47 UTC (rev 12751)
+++ branches/dev-syncromind/property/inc/soap_client/braarkiv/soap.php
2015-02-16 09:55:48 UTC (rev 12752)
@@ -94,6 +94,7 @@
$location_url =
$c->config_data[$section]['location_url'];//'http://braarkiv.adm.bgo/service/services.asmx';
$braarkiv_user = $c->config_data[$section]['braarkiv_user'];
$braarkiv_pass = $c->config_data[$section]['braarkiv_pass'];
+ $classname = $c->config_data[$section]['arkd'];
$_POST['submitit'] = "";
@@ -179,7 +180,7 @@
$searchAndGetDocumentsWithVariants->secKey = $secKey;
$searchAndGetDocumentsWithVariants->baseclassname = 'Eiendomsarkiver';
- $searchAndGetDocumentsWithVariants->classname = 'Byggesak';
+ $searchAndGetDocumentsWithVariants->classname = $classname;//'Byggesak';
$searchAndGetDocumentsWithVariants->where = "Byggnr = {$bygningsnr}";//
AND Regdato > '2006-01-25'";
$searchAndGetDocumentsWithVariants->maxhits = '-1';
@@ -233,7 +234,12 @@
$location_id = phpgw::get_var('location_id', 'int');
$section = phpgw::get_var('section', 'string');
- $base_url =
$GLOBALS['phpgw']->link('/property/inc/soap_client/braarkiv/soap.php',array('domain'
=> $_GET['domain'], 'location_id' => $location_id, 'section' => $section));
+ $base_url =
$GLOBALS['phpgw']->link('/property/inc/soap_client/braarkiv/soap.php',array(
+ 'domain' => $_GET['domain'],
+ 'location_id' => $location_id,
+ 'section' => $section
+ )
+ );
foreach($_result['ExtendedDocument'][0]->Attributes->Attribute as
$attribute)
{
Modified: branches/dev-syncromind/property/templates/base/invoice.xsl
===================================================================
--- branches/dev-syncromind/property/templates/base/invoice.xsl 2015-02-16
09:27:47 UTC (rev 12751)
+++ branches/dev-syncromind/property/templates/base/invoice.xsl 2015-02-16
09:55:48 UTC (rev 12752)
@@ -1146,20 +1146,20 @@
<xsl:template match="export">
<xsl:apply-templates select="menu"/>
<div align="left">
- <table cellpadding="2" cellspacing="2" width="80%"
align="center">
- <xsl:choose>
- <xsl:when test="msgbox_data != ''">
- <tr>
- <td align="left" colspan="3">
- <xsl:call-template
name="msgbox"/>
- </td>
- </tr>
- </xsl:when>
- </xsl:choose>
- <xsl:variable name="form_action">
- <xsl:value-of select="form_action"/>
- </xsl:variable>
- <form method="post" name="form" action="{$form_action}">
+ <xsl:variable name="form_action">
+ <xsl:value-of select="form_action"/>
+ </xsl:variable>
+ <form method="post" name="form" action="{$form_action}">
+ <table cellpadding="2" cellspacing="2" width="80%"
align="center">
+ <xsl:choose>
+ <xsl:when test="msgbox_data != ''">
+ <tr>
+ <td align="left"
colspan="3">
+
<xsl:call-template name="msgbox"/>
+ </td>
+ </tr>
+ </xsl:when>
+ </xsl:choose>
<tr>
<td valign="top">
<xsl:value-of
select="lang_select_conv"/>
@@ -1215,17 +1215,13 @@
</input>
</td>
</tr>
- </form>
+ </table>
+ </form>
+ <table cellpadding="2" cellspacing="2" width="80%"
align="center">
<tr>
<td>
- <xsl:variable name="cancel_action">
- <xsl:value-of
select="cancel_action"/>
- </xsl:variable>
- <xsl:variable name="lang_cancel">
- <xsl:value-of
select="lang_cancel"/>
- </xsl:variable>
- <form method="post"
action="{$cancel_action}">
- <input type="submit"
name="done" value="{$lang_cancel}">
+ <form method="post"
action="{cancel_action}">
+ <input type="submit"
name="done" value="{lang_cancel}">
<xsl:attribute
name="title">
<xsl:value-of
select="lang_cancel_statustext"/>
</xsl:attribute>
Modified: branches/dev-syncromind/rental/inc/class.socomposite.inc.php
===================================================================
--- branches/dev-syncromind/rental/inc/class.socomposite.inc.php
2015-02-16 09:27:47 UTC (rev 12751)
+++ branches/dev-syncromind/rental/inc/class.socomposite.inc.php
2015-02-16 09:55:48 UTC (rev 12752)
@@ -145,6 +145,20 @@
$filter_clauses[] = "rental_composite.id =
{$this->marshal($filters[$this->get_id_field_name()],'int')}";
}
+
+ $tables = "rental_composite";
+ $joins = " {$this->left_join} rental_unit ON
(rental_composite.id = rental_unit.composite_id)";
+ $joins .= " {$this->left_join} rental_contract_composite ON
(rental_contract_composite.composite_id = rental_composite.id)";
+ $joins .= " {$this->left_join} rental_contract ON
(rental_contract.id = rental_contract_composite.contract_id)";
+
+ if(isset($filters['district_id']) && $filters['district_id'])
+ {
+ $joins .= " {$this->join} fm_locations ON
(rental_unit.location_code = fm_locations.location_code)";
+ $joins .= " {$this->join} fm_location1 ON
(fm_location1.loc1 = fm_locations.loc1)";
+ $joins .= " {$this->join} fm_part_of_town ON
(fm_location1.part_of_town_id = fm_part_of_town.part_of_town_id)";
+
+ $filter_clauses[] = "fm_part_of_town.district_id =" .
(int) $filters['district_id'];
+ }
if(count($filter_clauses))
{
$clauses[] = join(' AND ', $filter_clauses);
@@ -152,11 +166,6 @@
$condition = join(' AND ', $clauses);
- $tables = "rental_composite";
- $joins = " {$this->left_join} rental_unit ON
(rental_composite.id = rental_unit.composite_id)";
- $joins .= " {$this->left_join} rental_contract_composite ON
(rental_contract_composite.composite_id = rental_composite.id)";
- $joins .= " {$this->left_join} rental_contract ON
(rental_contract.id = rental_contract_composite.contract_id)";
-
if($return_count) // We should only return a count
{
$cols = 'COUNT(DISTINCT(rental_composite.id)) AS count';
@@ -188,7 +197,7 @@
$dir = $ascending ? 'ASC' : 'DESC';
$order = $sort_field ? "ORDER BY {$this->marshal($sort_field,
'field')} $dir ": '';
- //var_dump("SELECT {$cols} FROM {$tables} {$joins} WHERE
{$condition} {$order}");
+// _debug_array("SELECT {$cols} FROM {$tables} {$joins} WHERE
{$condition} {$order}");
return "SELECT {$cols} FROM {$tables} {$joins} WHERE
{$condition} {$order}";
}
Modified: branches/dev-syncromind/rental/inc/class.uicomposite.inc.php
===================================================================
--- branches/dev-syncromind/rental/inc/class.uicomposite.inc.php
2015-02-16 09:27:47 UTC (rev 12751)
+++ branches/dev-syncromind/rental/inc/class.uicomposite.inc.php
2015-02-16 09:55:48 UTC (rev 12752)
@@ -36,7 +36,8 @@
{
$user_rows_per_page =
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
}
- else {
+ else
+ {
$user_rows_per_page = 10;
}
// YUI variables for paging and sorting
@@ -50,6 +51,7 @@
// Create an empty result set
$result_objects = array();
$result_count = 0;
+ $district_id = phpgw::get_var('district_id', 'int');
//Retrieve a contract identifier and load corresponding
contract
$contract_id = phpgw::get_var('contract_id');
@@ -88,7 +90,7 @@
phpgwapi_cache::session_set('rental',
'composite_furnished_status', phpgw::get_var('furnished_status'));
$filters = array('furnished_status' =>
phpgw::get_var('furnished_status'),'is_active' => phpgw::get_var('is_active'),
'is_vacant' => phpgw::get_var('occupancy'),
'has_contract' => phpgw::get_var('has_contract'), 'availability_date_from' =>
phpgw::get_var('availability_date_from_hidden'),
-
'availability_date_to' => phpgw::get_var('availability_date_to_hidden'));
+
'availability_date_to' => phpgw::get_var('availability_date_to_hidden'),
'district_id' => $district_id);
$result_objects =
rental_socomposite::get_instance()->get($start_index, $num_of_objects,
$sort_field, $sort_ascending, $search_for, $search_type, $filters);
$object_count =
rental_socomposite::get_instance()->get_count($search_for, $search_type,
$filters);
break;
Modified: branches/dev-syncromind/rental/inc/model/class.agresso_lg04.inc.php
===================================================================
--- branches/dev-syncromind/rental/inc/model/class.agresso_lg04.inc.php
2015-02-16 09:27:47 UTC (rev 12751)
+++ branches/dev-syncromind/rental/inc/model/class.agresso_lg04.inc.php
2015-02-16 09:55:48 UTC (rev 12752)
@@ -188,6 +188,7 @@
$thousands_separator =
isset($GLOBALS['phpgw_info']['user']['preferences']['rental']['thousands_separator'])
?
$GLOBALS['phpgw_info']['user']['preferences']['rental']['thousands_separator']
: '.';
// We need all invoices for this billing
$invoices =
rental_soinvoice::get_instance()->get(null, null, 'id', true, null, null,
array('billing_id' => $this->billing_job->get_id()));
+ $dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
foreach($invoices as $invoice) // Runs through all
invoices
{
@@ -209,6 +210,12 @@
$current_contract_type_id =
$contract->get_contract_type_id();
$contract_type_label =
lang(rental_socontract::get_instance()->get_contract_type_label($current_contract_type_id));
$contract_id =
$contract->get_old_contract_id();
+ $party_names =
explode('<br/>', rtrim($contract->get_party_name(), '<br/>'));
+ $start_date
=
$GLOBALS['phpgw']->common->show_date($contract->get_contract_date()->get_start_date(),$dateformat);
+ $end_date
=
$GLOBALS['phpgw']->common->show_date($contract->get_contract_date()->get_end_date(),$dateformat);
+ $billing_start_date =
$GLOBALS['phpgw']->common->show_date($contract->get_billing_start_date(),$dateformat);
+ $billing_end_date =
$GLOBALS['phpgw']->common->show_date($contract->get_billing_end_date(),$dateformat);
+
/**End contract type**/
$price_item_data = array();
@@ -230,12 +237,36 @@
$serialized_party =
$invoice->get_party()->serialize();
$party_name =
$serialized_party['name'];
+ $_party_names = array();
+ if(count($party_names) > 1)
+ {
+ foreach($party_names as $value)
+ {
+ if($party_name ==
$value)
+ {
+ continue;
+ }
+ $_party_names[] =
$value;
+ }
+ }
+ else
+ {
+ $_party_names = $party_names;
+ }
+
+ $party_full_name = implode (', ',
$_party_names);
+
$this->orders[] =
$this->$get_order_excel(
+ $start_date,
+ $end_date,
+ $billing_start_date,
+ $billing_end_date,
$invoice->get_header(),
$invoice->get_party()->get_identifier(),
$party_name,
$serialized_party['address'],
+ $party_full_name,
$invoice->get_id(),
$this->billing_job->get_year(),
$this->billing_job->get_month(),
@@ -445,7 +476,32 @@
* Builds one single order of the excel file.
*
*/
- protected function get_order_excel_bk($header, $party_id,
$party_name,$party_address, $order_id, $bill_year, $bill_month, $account,
$product_item, $responsibility, $service, $building, $project, $text,
$client_ref, $counter,$account_in,$responsibility_id, $contract_type_label,
$contract_id)
+ protected function get_order_excel_bk(
+ $start_date,
+ $end_date,
+ $billing_start_date,
+ $billing_end_date,
+ $header,
+ $party_id,
+ $party_name,
+ $party_address,
+ $party_full_name,
+ $order_id,
+ $bill_year,
+ $bill_month,
+ $account,
+ $product_item,
+ $responsibility,
+ $service,
+ $building,
+ $project,
+ $text,
+ $client_ref,
+ $counter,
+ $account_in,
+ $responsibility_id,
+ $contract_type_label,
+ $contract_id)
{
//$order_id = $order_id + 39500000;
@@ -485,7 +541,31 @@
return str_replace(array("\n", "\r"), '', $order);
}
- protected function get_order_excel_nlsh($header, $party_id,
$party_name,$party_address, $order_id, $bill_year, $bill_month, $account_out,
$product_item, $responsibility, $service, $building, $project, $text,
$client_ref, $counter,$account_in,$responsibility_id, $contract_type_label,
$contract_id)
+ protected function get_order_excel_nlsh(
+ $start_date,
+ $end_date,
+ $billing_start_date,
+ $billing_end_date,
+ $header,
+ $party_id,
+ $party_name,
+ $party_address,
+ $party_full_name,
+ $order_id, $bill_year,
+ $bill_month,
+ $account_out,
+ $product_item,
+ $responsibility,
+ $service,
+ $building,
+ $project,
+ $text,
+ $client_ref,
+ $counter,
+ $account_in,
+ $responsibility_id,
+ $contract_type_label,
+ $contract_id)
{
//_debug_array(func_get_args());
@@ -493,6 +573,10 @@
$order = array
(
'contract_id' => $contract_id,
+ 'date_start' => $start_date,
+ 'date_end' =>
$end_date,
+ 'billing_start' =>
$billing_start_date,
+ 'billing_end' =>
$billing_end_date,
'Kontraktstype' =>
$contract_type_label,//FIXME
'Art/konto inntektsside' => $account_in,
'Art/konto utgiftsside' => $account_out,//FIXME
@@ -505,6 +589,7 @@
'Party' =>
$party_id,
'name' =>
$party_name,
'address' =>
$party_address,
+ 'Leieboer' =>
$party_full_name,
'amount' =>
$this->get_formatted_amount_excel($product_item['amount']),
'article description' =>
$product_item['article_description'],
'article_code' =>
$product_item['article_code'],
Modified: branches/dev-syncromind/rental/setup/phpgw_no.lang
===================================================================
--- branches/dev-syncromind/rental/setup/phpgw_no.lang 2015-02-16 09:27:47 UTC
(rev 12751)
+++ branches/dev-syncromind/rental/setup/phpgw_no.lang 2015-02-16 09:55:48 UTC
(rev 12752)
@@ -601,3 +601,5 @@
free_of_charge rental no Vederlagsfritt
extra_adjustment rental no Ekstra regulering
free_of_charge rental no Vederlagsfritt
+select rental no Velg
+district rental no Område
Modified:
branches/dev-syncromind/rental/templates/base/composite_list_partial.php
===================================================================
--- branches/dev-syncromind/rental/templates/base/composite_list_partial.php
2015-02-16 09:27:47 UTC (rev 12751)
+++ branches/dev-syncromind/rental/templates/base/composite_list_partial.php
2015-02-16 09:55:48 UTC (rev 12752)
@@ -99,7 +99,7 @@
'index.php?menuaction=rental.uicomposite.query&phpgw_return_as=json<?php
echo $url_add_on; ?>&editable=<?php echo isset($editable) && $editable ?
"true" : "false"; ?>',
columnDefs,
'<?php echo $list_id ?>_form',
- ['<?php echo $list_id
?>_ctrl_toggle_furnished_status_rental_composites','<?php echo $list_id
?>_ctrl_toggle_active_rental_composites','<?php echo $list_id
?>_ctrl_toggle_occupancy_of_rental_composites','<?php echo $list_id
?>_ctrl_toggle_has_contract_rental_composites','<?php echo $list_id
?>_ctrl_search_query'],
+ ['<?php echo $list_id
?>_ctrl_toggle_furnished_status_rental_composites','<?php echo $list_id
?>_ctrl_toggle_active_rental_composites','<?php echo $list_id
?>_district_id','<?php echo $list_id
?>_ctrl_toggle_occupancy_of_rental_composites','<?php echo $list_id
?>_ctrl_toggle_has_contract_rental_composites','<?php echo $list_id
?>_ctrl_search_query'],
'<?php echo $list_id ?>_container',
'<?php echo $list_id ?>_paginator',
'<?php echo $list_id ?>',
@@ -122,6 +122,8 @@
function composite_export(compType) {
var availabilityselect = document.getElementById('<?php echo $list_id
?>_ctrl_toggle_active_rental_composites');
var availabilityoption =
availabilityselect.options[availabilityselect.selectedIndex].value;
+ var districtselect = document.getElementById('<?php echo $list_id
?>_district_id');
+ var districtoption =
districtselect.options[districtselect.selectedIndex].value;
<?php
if(isset($config->config_data['contract_future_info']) &&
$config->config_data['contract_future_info'])
{
@@ -143,6 +145,7 @@
'&type='+compType+
'&query='+query+
'&search_option='+sOption+
+ '&district_id='+districtoption+
'&export=true';
}
</script>
@@ -187,8 +190,8 @@
<!-- Filters -->
<h3><?php echo lang('filters') ?></h3>
<?php
-
if(isset($config->config_data['contract_furnished_status']) &&
$config->config_data['contract_furnished_status'])
- {
+ if(isset($config->config_data['contract_furnished_status'])
&& $config->config_data['contract_furnished_status'])
+ {
?>
<!-- Møbleringsstatus -->
@@ -205,6 +208,18 @@
</select>
<?php }
?>
+ <label for="district_id"><?php echo lang('district')
?></label>
+ <select name="district_id" id="<?php echo $list_id
?>_district_id">
+ <?php
+ $districts =
execMethod('property.sogeneric.get_list',array('type' => 'district'));
+
+ echo "<option
value=''>" . lang('select') . "</option>";
+ foreach($districts as
$district)
+ {
+ echo "<option
value='{$district['id']}'>{$district['name']}</option>";
+ }
+ ?>
+ </select>
<label for="ctrl_toggle_active_rental_composites"><?php echo
lang('availability') ?></label>
<select name="is_active" id="<?php echo $list_id
?>_ctrl_toggle_active_rental_composites">
<option value="both" <?php echo ($status == 'both') ?
'selected' : ''?>><?php echo lang('all') ?></option>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [12752] Syncromind: Merge 12685:12750 from trunk,
Sigurd Nes <=