diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index 748eb4414ab..27178de88f9 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -397,8 +397,8 @@ if (empty($reshook))
$object->note = $object->note_private;
}
$object->customcode = GETPOST('customcode', 'alpha');
- $object->country_id = GETPOST('country_id', 'int');
- $object->state_id = GETPOST('state_id', 'int');
+ $object->country_id = GETPOST('country_id', 'int');
+ $object->state_id = GETPOST('state_id', 'int');
$object->status = GETPOST('statut', 'int');
$object->status_buy = GETPOST('statut_buy', 'int');
$object->status_batch = GETPOST('status_batch', 'aZ09');
@@ -868,7 +868,7 @@ llxHeader('', $title, $helpurl);
$form = new Form($db);
$formfile = new FormFile($db);
-$formproduct = new FormProduct($db);
+$formproduct = new FormProduct($db);
$formcompany = new FormCompany($db);
if (!empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db);
@@ -903,18 +903,16 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
}
$objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates
$objcanvas->display_canvas($action); // Show template
-} else {
-
+} else {
// -----------------------------------------
// When used in standard mode
// -----------------------------------------
if ($action == 'create' && $usercancreate)
{
-
//WYSIWYG Editor
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
-
-print ''."\n";
-
- // We set country_id, country_code and country for the selected country
- $object->country_id = GETPOST('country_id') ? GETPOST('country_id') : $object->country_id;
- if ($object->country_id)
- {
- $tmparray = getCountry($object->country_id, 'all');
- $object->country_code = $tmparray['code'];
- $object->country = $tmparray['label'];
- }
-
-
+
+ // We set country_id, country_code and country for the selected country
+ $object->country_id = GETPOST('country_id') ? GETPOST('country_id') : $object->country_id;
+ if ($object->country_id)
+ {
+ $tmparray = getCountry($object->country_id, 'all');
+ $object->country_code = $tmparray['code'];
+ $object->country = $tmparray['label'];
+ }
+
+
$type = $langs->trans('Product');
if ($object->isService()) $type = $langs->trans('Service');
//print load_fiche_titre($langs->trans('Modify').' '.$type.' : '.(is_object($object->oldcopy)?$object->oldcopy->ref:$object->ref), "");
@@ -1411,7 +1406,7 @@ print '