[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16991] rental: add remote customer id
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16991] rental: add remote customer id |
Date: |
Mon, 21 Aug 2017 08:52:57 -0400 (EDT) |
Revision: 16991
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16991
Author: sigurdne
Date: 2017-08-21 08:52:56 -0400 (Mon, 21 Aug 2017)
Log Message:
-----------
rental: add remote customer id
Modified Paths:
--------------
trunk/rental/inc/class.soparty.inc.php
trunk/rental/inc/class.uiparty.inc.php
trunk/rental/inc/model/class.party.inc.php
trunk/rental/setup/phpgw_no.lang
trunk/rental/setup/setup.inc.php
trunk/rental/setup/tables_current.inc.php
trunk/rental/setup/tables_update.inc.php
trunk/rental/templates/base/party.xsl
Modified: trunk/rental/inc/class.soparty.inc.php
===================================================================
--- trunk/rental/inc/class.soparty.inc.php 2017-08-20 18:52:42 UTC (rev
16990)
+++ trunk/rental/inc/class.soparty.inc.php 2017-08-21 12:52:56 UTC (rev
16991)
@@ -270,6 +270,7 @@
{
$columns[] = 'party.id AS party_id';
$columns[] = 'party.identifier';
+ $columns[] = 'party.customer_id';
$columns[] = 'party.first_name';
$columns[] = 'party.last_name';
$columns[] = 'party.comment';
@@ -356,6 +357,7 @@
$values = array(
'identifier = ' .
$this->marshal($party->get_identifier(), 'string'),
+ 'customer_id = ' .
$this->marshal($party->get_customer_id(), 'int'),
'first_name = ' .
$this->marshal($party->get_first_name(), 'string'),
'last_name = ' .
$this->marshal($party->get_last_name(), 'string'),
'title = ' .
$this->marshal($party->get_title(), 'string'),
@@ -423,6 +425,7 @@
$party->set_last_name($this->unmarshal($this->db->f('last_name'), 'string'));
$party->set_location_id($this->unmarshal($this->db->f('org_location_id'),
'int'));
$party->set_identifier($this->unmarshal($this->db->f('identifier'), 'string'));
+
$party->set_customer_id($this->unmarshal($this->db->f('customer_id'), 'int'));
$party->set_mobile_phone($this->unmarshal($this->db->f('mobile_phone'),
'string'));
$party->set_place($this->unmarshal($this->db->f('place'), 'string'));
$party->set_postal_code($this->unmarshal($this->db->f('postal_code'),
'string'));
Modified: trunk/rental/inc/class.uiparty.inc.php
===================================================================
--- trunk/rental/inc/class.uiparty.inc.php 2017-08-20 18:52:42 UTC (rev
16990)
+++ trunk/rental/inc/class.uiparty.inc.php 2017-08-21 12:52:56 UTC (rev
16991)
@@ -913,6 +913,7 @@
'party_id' => $party_id,
'value_name' => $party->get_name(),
'value_identifier' => $party->get_identifier(),
+ 'value_customer_id' =>
$party->get_customer_id(),
'value_firstname' => $party->get_first_name(),
'value_lastname' => $party->get_last_name(),
'value_job_title' => $party->get_title(),
@@ -975,6 +976,7 @@
{
// ... set all parameters
$party->set_identifier(phpgw::get_var('identifier'));
+
$party->set_customer_id(phpgw::get_var('customer_id', 'int'));
$party->set_first_name(phpgw::get_var('firstname'));
$party->set_last_name(phpgw::get_var('lastname'));
$party->set_title(phpgw::get_var('title'));
Modified: trunk/rental/inc/model/class.party.inc.php
===================================================================
--- trunk/rental/inc/model/class.party.inc.php 2017-08-20 18:52:42 UTC (rev
16990)
+++ trunk/rental/inc/model/class.party.inc.php 2017-08-21 12:52:56 UTC (rev
16991)
@@ -12,6 +12,7 @@
public static $so;
protected $id;
+ protected $customer_id;
protected $identifier;
protected $first_name;
protected $last_name;
@@ -108,11 +109,26 @@
return $this->id;
}
+ public function set_customer_id( $customer_id )
+ {
+ $this->customer_id = $customer_id;
+ }
+
+ public function get_customer_id()
+ {
+ return $this->customer_id;
+ }
+
public function set_identifier( $identifier )
{
$this->identifier = $identifier;
}
+ public function get_identifier()
+ {
+ return $this->identifier;
+ }
+
public function get_org_enhet_id()
{
return $this->org_enhet_id;
@@ -153,11 +169,6 @@
$this->sync_problems[] = $sync_problem;
}
- public function get_identifier()
- {
- return $this->identifier;
- }
-
public function set_first_name( $first_name )
{
$this->first_name = $first_name;
@@ -443,6 +454,7 @@
return array(
'id' => $this->id,
'name' => $this->get_name(),
+ 'customer_id' => $this->customer_id,
'identifier' => $this->identifier,
'firstname' => $this->first_name,
'lastname' => $this->last_name,
Modified: trunk/rental/setup/phpgw_no.lang
===================================================================
--- trunk/rental/setup/phpgw_no.lang 2017-08-20 18:52:42 UTC (rev 16990)
+++ trunk/rental/setup/phpgw_no.lang 2017-08-21 12:52:56 UTC (rev 16991)
@@ -682,4 +682,5 @@
select date rental no Velg dato
select file to upload rental no Velg fil for opplasting
synchronized: %1 rental no Synkronisert: %1
-syncronize all rental no Synkroniser alle
\ No newline at end of file
+syncronize all rental no Synkroniser alle
+customer id rental no Kundenummer
\ No newline at end of file
Modified: trunk/rental/setup/setup.inc.php
===================================================================
--- trunk/rental/setup/setup.inc.php 2017-08-20 18:52:42 UTC (rev 16990)
+++ trunk/rental/setup/setup.inc.php 2017-08-21 12:52:56 UTC (rev 16991)
@@ -1,6 +1,6 @@
<?php
$setup_info['rental']['name'] = 'rental'; // Module identifier
- $setup_info['rental']['version'] = '0.1.0.37'; // Current module version
+ $setup_info['rental']['version'] = '0.1.0.38'; // Current module version
$setup_info['rental']['app_order'] = 51; // (?)
$setup_info['rental']['tables'] = array(
'rental_party', // All contract participants, tenants etc.
Modified: trunk/rental/setup/tables_current.inc.php
===================================================================
--- trunk/rental/setup/tables_current.inc.php 2017-08-20 18:52:42 UTC (rev
16990)
+++ trunk/rental/setup/tables_current.inc.php 2017-08-21 12:52:56 UTC (rev
16991)
@@ -219,6 +219,7 @@
'fd' => array(
'id' => array('type' => 'auto', 'nullable' =>
false),
'identifier' => array('type' => 'varchar',
'precision' => '255', 'nullable' => true),
+ 'customer_id' => array('type' => 'int',
'precision' => '4', 'nullable' => true),
'first_name' => array('type' => 'varchar',
'precision' => '255', 'nullable' => true),
'last_name' => array('type' => 'varchar',
'precision' => '255', 'nullable' => true),
'comment' => array('type' => 'text'),
Modified: trunk/rental/setup/tables_update.inc.php
===================================================================
--- trunk/rental/setup/tables_update.inc.php 2017-08-20 18:52:42 UTC (rev
16990)
+++ trunk/rental/setup/tables_update.inc.php 2017-08-21 12:52:56 UTC (rev
16991)
@@ -976,4 +976,22 @@
$GLOBALS['setup_info']['rental']['currentver'] =
'0.1.0.37';
return $GLOBALS['setup_info']['rental']['currentver'];
}
- }
\ No newline at end of file
+ }
+
+ $test[] = '0.1.0.37';
+ function rental_upgrade0_1_0_37()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+ $GLOBALS['phpgw_setup']->oProc->AddColumn('rental_party',
'customer_id', array(
+ 'type' => 'int',
+ 'precision' => 4,
+ 'nullable' => true
+ ));
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['rental']['currentver'] =
'0.1.0.38';
+ return $GLOBALS['setup_info']['rental']['currentver'];
+ }
+ }
Modified: trunk/rental/templates/base/party.xsl
===================================================================
--- trunk/rental/templates/base/party.xsl 2017-08-20 18:52:42 UTC (rev
16990)
+++ trunk/rental/templates/base/party.xsl 2017-08-21 12:52:56 UTC (rev
16991)
@@ -53,6 +53,13 @@
</div>
<div class="pure-control-group">
<label>
+ <xsl:value-of
select="php:function('lang', 'customer id')"/>
+ </label>
+ <input type="text"
name="customer_id" value="{value_customer_id}">
+ </input>
+ </div>
+ <div class="pure-control-group">
+ <label>
<xsl:value-of
select="php:function('lang', 'firstname')"/>
</label>
<input type="text"
id="firstname" name="firstname" value="{value_firstname}">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16991] rental: add remote customer id,
sigurdne <=