diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index 7e9c2c051c12dfb0f473c5d0579875133c86ba61..3e1f752b863732daf5033adba9575dd2c5a52352 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -99,18 +99,18 @@ class ActionsContactCardCommon if ($objsoc->typent_code == 'TE_PRIVATE') { if (dol_strlen(trim($this->object->address)) == 0) $this->tpl['address'] = $objsoc->address; - if (dol_strlen(trim($this->object->zip)) == 0) $this->object->zip = $objsoc->cp; - if (dol_strlen(trim($this->object->town)) == 0) $this->object->town = $objsoc->ville; - if (dol_strlen(trim($this->object->phone_pro)) == 0) $this->object->phone_pro = $objsoc->tel; + if (dol_strlen(trim($this->object->zip)) == 0) $this->object->zip = $objsoc->zip; + if (dol_strlen(trim($this->object->town)) == 0) $this->object->town = $objsoc->town; + if (dol_strlen(trim($this->object->phone_pro)) == 0) $this->object->phone_pro = $objsoc->phone; if (dol_strlen(trim($this->object->fax)) == 0) $this->object->fax = $objsoc->fax; if (dol_strlen(trim($this->object->email)) == 0) $this->object->email = $objsoc->email; } // Zip - $this->tpl['select_zip'] = $formcompany->select_ziptown($this->object->cp,'zipcode',array('town','selectpays_id','departement_id'),6); + $this->tpl['select_zip'] = $formcompany->select_ziptown($this->object->zip,'zipcode',array('town','selectpays_id','departement_id'),6); // Town - $this->tpl['select_town'] = $formcompany->select_ziptown($this->object->ville,'town',array('zipcode','selectpays_id','departement_id')); + $this->tpl['select_town'] = $formcompany->select_ziptown($this->object->town,'town',array('zipcode','selectpays_id','departement_id')); if (dol_strlen(trim($this->object->fk_pays)) == 0) $this->object->fk_pays = $objsoc->pays_id; @@ -212,7 +212,7 @@ class ActionsContactCardCommon $this->tpl['address'] = dol_nl2br($this->object->address); - $this->tpl['zip'] = ($this->object->cp?$this->object->cp.' ':''); + $this->tpl['zip'] = ($this->object->zip?$this->object->zip.' ':''); $img=picto_from_langcode($this->object->pays_code); $this->tpl['country'] = ($img?$img.' ':'').$this->object->pays; diff --git a/htdocs/societe/canvas/default/tpl/card_view.tpl.php b/htdocs/societe/canvas/default/tpl/card_view.tpl.php index 5fa70007d8165c1aeb6b6634475071e5ab78f4f2..06c419fcfacc503482347bebce948ca7ce7fa85d 100644 --- a/htdocs/societe/canvas/default/tpl/card_view.tpl.php +++ b/htdocs/societe/canvas/default/tpl/card_view.tpl.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr> +/* Copyright (C) 2010-2011 Regis Houssin <regis@dolibarr.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -243,7 +243,7 @@ function CheckVAT(a) { <?php } ?> <?php if ($user->rights->societe->contact->creer) { ?> -<a class="butAction" href="<?php echo DOL_URL_ROOT.'/contact/fiche.php?socid='.$this->control->tpl['id'].'&action=create&canvas='.$canvas; ?>"><?php echo $langs->trans("AddContact"); ?></a> +<a class="butAction" href="<?php echo DOL_URL_ROOT.'/contact/fiche.php?socid='.$this->control->tpl['id'].'&action=create&canvas=default'; ?>"><?php echo $langs->trans("AddContact"); ?></a> <?php } ?> <?php if ($user->rights->societe->supprimer) { ?> diff --git a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php index 5ace3d3158aecd170354aa502a013f1e75812ddb..5c13670e3fecc2b5f4d7033fbe1a4f8be974bded 100644 --- a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr> +/* Copyright (C) 2010-2011 Regis Houssin <regis@dolibarr.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -176,7 +176,7 @@ <?php } ?> <?php if ($user->rights->societe->contact->creer) { ?> -<a class="butAction" href="<?php echo DOL_URL_ROOT.'/contact/fiche.php?socid='.$this->control->tpl['id'].'&action=create&canvas='.$canvas; ?>"><?php echo $langs->trans("AddContact"); ?></a> +<a class="butAction" href="<?php echo DOL_URL_ROOT.'/contact/fiche.php?socid='.$this->control->tpl['id'].'&action=create&canvas=default'; ?>"><?php echo $langs->trans("AddContact"); ?></a> <?php } ?> <?php if ($user->rights->societe->supprimer) { ?>