From f56b46bd3e7e9e4176115d88be1a94394751b680 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 9 Dec 2020 17:14:35 +0100 Subject: [PATCH] Debug v13 --- htdocs/asset/class/asset.class.php | 4 ++-- htdocs/categories/edit.php | 2 +- htdocs/categories/index.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index ae866ff24ba..f4823ae9b6f 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -84,9 +84,9 @@ class Asset extends CommonObject 'ref' => array('type'=>'varchar(10)', 'label'=>'Ref', 'visible'=>1, 'enabled'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'showoncombobox'=>1), 'entity' => array('type'=>'integer', 'label'=>'Entity', 'visible'=>0, 'enabled'=>1, 'position'=>20, 'notnull'=>1, 'index'=>1,), 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>-1, 'searchall'=>1), + 'fk_asset_type' => array('type'=>'integer:AssetType:asset/class/asset_type.class.php', 'label'=>'AssetsType', 'visible'=>1, 'enabled'=>1, 'position'=>35, 'notnull'=>1, 'index'=>1, 'searchall'=>1), 'amount_ht' => array('type'=>'double(24,8)', 'label'=>'AmountHTShort', 'visible'=>1, 'enabled'=>1, 'position'=>40, 'notnull'=>-1, 'isameasure'=>'1', 'help'=>"Help text",), - 'amount_vat' => array('type'=>'double(24,8)', 'label'=>'AmountVAT', 'visible'=>1, 'enabled'=>1, 'position'=>40, 'notnull'=>-1, 'isameasure'=>'1', 'help'=>"Help text",), - 'fk_asset_type' => array('type'=>'integer:AssetType:asset/class/asset_type.class.php', 'label'=>'AssetsType', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>1, 'index'=>1, 'searchall'=>1), + 'amount_vat' => array('type'=>'double(24,8)', 'label'=>'AmountVAT', 'visible'=>1, 'enabled'=>1, 'position'=>41, 'notnull'=>-1, 'isameasure'=>'1', 'help'=>"Help text",), 'description' => array('type'=>'text', 'label'=>'Description', 'visible'=>-1, 'enabled'=>1, 'position'=>90, 'notnull'=>-1,), 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'visible'=>-1, 'enabled'=>1, 'position'=>91, 'notnull'=>-1,), 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'visible'=>-1, 'enabled'=>1, 'position'=>92, 'notnull'=>-1,), diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php index f634d62a6e4..f4b7e12cc30 100644 --- a/htdocs/categories/edit.php +++ b/htdocs/categories/edit.php @@ -35,7 +35,7 @@ $langs->load("categories"); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alphanohtml'); -$type = (int) GETPOST('type', 'int'); +$type = GETPOST('type', 'aZ09'); // Can be int or string $action = (GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'edit'); $confirm = GETPOST('confirm'); $cancel = GETPOST('cancel', 'alpha'); diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index 4eac3ec9a08..5adc7bbb17b 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -172,7 +172,7 @@ foreach ($fulltree as $key => $val) $counter = "".(is_countable($elements) ? count($elements) : '0').""; } - $color = $categstatic->color ? ' style="background: #'.$categstatic->color.';"' : ' style="background: #bbb"'; + $color = $categstatic->color ? ' style="background: #'.sprintf("%06s", $categstatic->color).';"' : ' style="background: #bbb"'; $data[] = array( 'rowid'=>$val['rowid'],