diff --git a/htdocs/hrm/establishment/card.php b/htdocs/hrm/establishment/card.php index 11179d218f869d5784828b01e4bd73e08c543dd3..9917113ff396b61899e099ecc8a31640f59d28c6 100644 --- a/htdocs/hrm/establishment/card.php +++ b/htdocs/hrm/establishment/card.php @@ -48,6 +48,10 @@ foreach ($tmpstatus2label as $key => $val) $status2label[$key]=$langs->trans($va $object = new Establishment($db); +// Load object +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once + + /* * Actions */ @@ -128,7 +132,8 @@ else if ($action == 'update') $error ++; } - if (empty($error)) { + if (empty($error)) + { $object->name = GETPOST('name', 'alpha'); $object->address = GETPOST('address', 'alpha'); $object->zip = GETPOST('zipcode', 'alpha'); diff --git a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql index 1309c1dc2255b66a2410390afeee5775e040dc1b..cbc0dd75a56f253183334e49fddb2538865d5aa0 100644 --- a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql +++ b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql @@ -537,3 +537,7 @@ INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17804', 'Sociedad Civil', 1); INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17805', 'Sociedad AnĂ³nima', 1); + +-- VMYSQL4.1 ALTER TABLE llx_establishment CHANGE COLUMN fk_user_mod fk_user_mod integer NULL; +-- VPGSQL8.2 ALTER TABLE llx_establishment ALTER COLUMN fk_user_mod DROP NOT NULL; + diff --git a/htdocs/install/mysql/tables/llx_establishment.sql b/htdocs/install/mysql/tables/llx_establishment.sql index fcf57ac28b63759c9a0e1e3bdd728166c482d419..667d512762d97ced085c835ae028d02e9c29c8ff 100644 --- a/htdocs/install/mysql/tables/llx_establishment.sql +++ b/htdocs/install/mysql/tables/llx_establishment.sql @@ -33,7 +33,7 @@ CREATE TABLE llx_establishment ( profid3 varchar(20), phone varchar(20), fk_user_author integer NOT NULL, - fk_user_mod integer NOT NULL, + fk_user_mod integer, datec datetime NOT NULL, tms timestamp NOT NULL, status tinyint DEFAULT 1