issue #1579 : Add models and select client
This commit is contained in:
parent
86bc121292
commit
c9f5ceb2c9
@ -482,6 +482,11 @@ class GestionController extends Zend_Controller_Action
|
||||
|
||||
$idClient = $request->getParam('idClient', null);
|
||||
|
||||
$clientM = new Application_Model_Sdv1Clients();
|
||||
$sql = $clientM->select()->where('actif=?',1);
|
||||
$selectClient = $clientM->fetchAll($sql);
|
||||
$this->view->assign('selectClient',$selectClient);
|
||||
|
||||
if ($idClient !== null) {
|
||||
$paramsM = new Application_Model_CiblageCustomerParams();
|
||||
$sql = $paramsM->select()->where('idClient = ?', $idClient);
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class Application_Model_CodePostaux extends Zend_Db_Table_Abstract
|
||||
class Application_Model_CiblageCodePostaux extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'fields_codepostaux';
|
||||
protected $_schema = 'ciblage';
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class Application_Model_Comptages extends Zend_Db_Table_Abstract
|
||||
class Application_Model_CiblageComptages extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'ciblage_comptages';
|
||||
protected $_schema = 'ciblage';
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class Application_Model_Criteres extends Zend_Db_Table_Abstract
|
||||
class Application_Model_CiblageCriteres extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'ciblage_criteres';
|
||||
protected $_schema = 'ciblage';
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class Application_Model_CustomerParams extends Zend_Db_Table_Abstract
|
||||
class Application_Model_CiblageCustomerParams extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'customer_params';
|
||||
protected $_schema = 'ciblage';
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class Application_Model_Departements extends Zend_Db_Table_Abstract
|
||||
class Application_Model_CiblageDepartements extends Zend_Db_Table_Abstract
|
||||
{
|
||||
public $_name = 'fields_departements';
|
||||
protected $_schema = 'ciblage';
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class Application_Model_EnrichissementIdentifiants extends Zend_Db_Table_Abstract
|
||||
class Application_Model_CiblageEnrichissementIdentifiants extends Zend_Db_Table_Abstract
|
||||
{
|
||||
public $_name = 'enrichissement_identifiants';
|
||||
protected $_schema = 'ciblage';
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class Application_Model_EnrichissementProfils extends Zend_Db_Table_Abstract
|
||||
class Application_Model_CiblageEnrichissementProfils extends Zend_Db_Table_Abstract
|
||||
{
|
||||
public $_name = 'enrichissement_profils';
|
||||
protected $_schema = 'ciblage';
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class Application_Model_FormeJuridique extends Zend_Db_Table_Abstract
|
||||
class Application_Model_CiblageFormeJuridique extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'fields_formejuridique';
|
||||
protected $_primary = 'fjCode';
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class Application_Model_MinMax extends Zend_Db_Table_Abstract
|
||||
class Application_Model_CiblageMinMax extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'fields_minmax';
|
||||
protected $_schema = 'ciblage';
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class Application_Model_Naf extends Zend_Db_Table_Abstract
|
||||
class Application_Model_CiblageNaf extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'fields_naf';
|
||||
protected $_schema = 'ciblage';
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class Application_Model_Prefs extends Zend_Db_Table_Abstract
|
||||
class Application_Model_CiblagePrefs extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'customer_prefs';
|
||||
protected $_schema = 'ciblage';
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class Application_Model_Regions extends Zend_Db_Table_Abstract
|
||||
class Application_Model_CiblageRegions extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'fields_regions';
|
||||
protected $_schema = 'ciblage';
|
||||
|
@ -13,8 +13,13 @@
|
||||
<?php }?>
|
||||
|
||||
<div>
|
||||
<label>idClient</label>
|
||||
<input type="text" name="idClient" value="<?=$this->idClient?>"/>
|
||||
<label>Client</label>
|
||||
<select name="idClient">
|
||||
<?php foreach ( $this->selectClient as $client ) {?>
|
||||
<?php $select = ''; if ($this->idClient==$client->id) { $select = ' selected'; }?>
|
||||
<option value="<?=$client->id?>"<?=$select?>><?=$client->nom?></option>
|
||||
<?php }?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
Loading…
Reference in New Issue
Block a user