diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index a375593dc2d..3a0d9f3c1b0 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -4763,13 +4763,13 @@ abstract class CommonObject * Return HTML string to put an input field into a page * Code very similar with showInputField of extra fields * - * @param array $val Array of properties for field to show - * @param string $key Key of attribute - * @param string $value Preselected value to show (for date type it must be in timestamp format, for amount or price it must be a php numeric value) - * @param string $moreparam To add more parametes on html input tag - * @param string $keysuffix Prefix string to add into name and id of field (can be used to avoid duplicate names) - * @param string $keyprefix Suffix string to add into name and id of field (can be used to avoid duplicate names) - * @param mixed $showsize Value for css to define size. May also be a numeric. + * @param array $val Array of properties for field to show + * @param string $key Key of attribute + * @param string $value Preselected value to show (for date type it must be in timestamp format, for amount or price it must be a php numeric value) + * @param string $moreparam To add more parametes on html input tag + * @param string $keysuffix Prefix string to add into name and id of field (can be used to avoid duplicate names) + * @param string $keyprefix Suffix string to add into name and id of field (can be used to avoid duplicate names) + * @param string|int $showsize Value for css to define size. May also be a numeric. * @return string */ function showInputField($val, $key, $value, $moreparam='', $keysuffix='', $keyprefix='', $showsize=0) @@ -4821,6 +4821,11 @@ abstract class CommonObject else return ''; } + // Use in priorit showsize from parameters, then $val['css'] then autodefine + if (empty($showsize) && ! empty($val['css'])) + { + $showsize = $val['css']; + } if (empty($showsize)) { if ($type == 'date') diff --git a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql index 14fc29dedf8..73b29cf55cd 100644 --- a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql +++ b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql @@ -96,6 +96,9 @@ ALTER TABLE llx_contratdet ADD COLUMN vat_src_code varchar(10) DEFAULT ''; INSERT INTO llx_c_type_contact(rowid, element, source, code, libelle, active ) values (42, 'propal', 'external', 'SHIPPING', 'Customer contact for delivery', 1); +ALTER TABLE llx_inventory ADD date_validation datetime DEFAULT NULL; +ALTER TABLE llx_inventory CHANGE COLUMN datec date_creation datetime DEFAULT NULL; +ALTER TABLE llx_inventory CHANGE COLUMN fk_user_author fk_user_creat integer; ALTER TABLE llx_inventory ADD UNIQUE INDEX uk_inventory_ref (ref, entity); ALTER table llx_entrepot CHANGE COLUMN label ref varchar(255); diff --git a/htdocs/install/mysql/tables/llx_inventory.sql b/htdocs/install/mysql/tables/llx_inventory.sql index ce1a2c93744..1f3c3ecb111 100644 --- a/htdocs/install/mysql/tables/llx_inventory.sql +++ b/htdocs/install/mysql/tables/llx_inventory.sql @@ -22,15 +22,16 @@ CREATE TABLE llx_inventory rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 0, ref varchar(48), - datec datetime DEFAULT NULL, + date_creation datetime DEFAULT NULL, tms timestamp, - fk_user_author integer, -- user making creation - fk_user_modif integer, -- user making last change - fk_user_valid integer, -- valideur de la fiche + fk_user_creat integer, -- user making creation + fk_user_modif integer, -- user making last change + fk_user_valid integer, -- valideur de la fiche fk_warehouse integer DEFAULT 0, status integer DEFAULT 0, title varchar(255) NOT NULL, date_inventory datetime DEFAULT NULL, + date_validation datetime DEFAULT NULL, import_key varchar(14) -- import key ) ENGINE=InnoDB; diff --git a/htdocs/product/inventory/card.php b/htdocs/product/inventory/card.php index 9e9435ac67c..e393721c47d 100644 --- a/htdocs/product/inventory/card.php +++ b/htdocs/product/inventory/card.php @@ -155,6 +155,8 @@ if ($action == 'create') print ''; print ''; + + dol_set_focus('input[name="ref"]'); } // Part to edit record diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index acc36c5b043..8e0fde69687 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -3,7 +3,6 @@ * Copyright (C) 2014-2016 Juanjo Menent * Copyright (C) 2015 Florian Henry * Copyright (C) 2015 Raphaƫl Doursenaud - * Copyright (C) ---Put here your own copyright and developer email--- * * 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 @@ -77,7 +76,7 @@ class Inventory extends CommonObject */ public $fields=array( 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'visible'=>-1, 'enabled'=>1, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>'Id',), - 'ref' => array('type'=>'varchar(64)', 'label'=>'Ref', 'visible'=>1, 'enabled'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>'Reference of object',), + 'ref' => array('type'=>'varchar(64)', 'label'=>'Ref', 'visible'=>1, 'enabled'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>'Reference of object', 'css'=>'maxwidth200'), 'entity' => array('type'=>'integer', 'label'=>'Entity', 'visible'=>0, 'enabled'=>1, 'position'=>20, 'notnull'=>1, 'index'=>1,), 'title' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>25, 'css'=>'minwidth300'), 'fk_warehouse' => array('type'=>'integer:Entrepot:product/stock/class/entrepot.class.php', 'label'=>'Warehouse', 'visible'=>1, 'enabled'=>1, 'index'=>1, 'help'=>'LinkToThirparty'), @@ -94,7 +93,7 @@ class Inventory extends CommonObject //'fk_user_valid' =>array('type'=>'integer', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>512), 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'index'=>0, 'position'=>1000), - 'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'position'=>1000, 'arrayofkeyval'=>array(0=>'Todo', 1=>'Done', -1=>'Cancel')), + 'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'position'=>1000, 'default'=>0, 'arrayofkeyval'=>array(0=>'Todo', 1=>'Done', -1=>'Cancel')), ); public $rowid; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 0a16564ab40..0f0372867a0 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -12,7 +12,7 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FI8TNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License @@ -1329,8 +1329,8 @@ div.statusref img { } img.photoref, div.photoref { border: 1px solid #CCC; - -webkit-box-shadow: 3px 3px 4px #DDD; - box-shadow: 3px 3px 4px #DDD; + -webkit-box-shadow: 2px 2px 4px #ccc; + box-shadow: 2px 2px 4px #ccc; padding: 4px; height: 80px; width: 80px; @@ -2539,7 +2539,7 @@ div.refidpadding { } div.refid { font-weight: bold; - color: #868; + color: #625; font-size: 160%; } div.refidno {