From 85b78babae915f186cc473323891df389a2127a4 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 1 Jan 2012 19:12:14 +0800 Subject: [PATCH] Fix: add default values for country --- htdocs/societe/canvas/actions_card_common.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index 72aa7c8d30a..361a1aff7bd 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -496,6 +496,8 @@ abstract class ActionsCardCommon $this->tpl['select_town'] = $formcompany->select_ziptown($this->object->town,'town',array('zipcode','selectcountry_id','departement_id')); // Country + $this->object->country_id = ($this->object->country_id ? $this->object->country_id : $mysoc->country_id); + $this->object->country_code = ($this->object->country_code ? $this->object->country_code : $mysoc->country_code); $this->tpl['select_country'] = $form->select_country($this->object->country_id,'country_id'); $countrynotdefined = $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')';