WIP Generic stats page
This commit is contained in:
parent
0db77c1de6
commit
f752551914
@ -8034,11 +8034,12 @@ class Form
|
|||||||
/**
|
/**
|
||||||
* Output the component to make advanced search criteries
|
* Output the component to make advanced search criteries
|
||||||
*
|
*
|
||||||
* @param array $arrayofcriterias Array of available search criterias. Example: array($object->element => $object->fields, 'otherfamily' => otherarrayoffields, ...)
|
* @param array $arrayofcriterias Array of available search criterias. Example: array($object->element => $object->fields, 'otherfamily' => otherarrayoffields, ...)
|
||||||
* @param array $search_component_params Array of selected search criterias
|
* @param array $search_component_params Array of selected search criterias
|
||||||
* @return string HTML component for advanced search
|
* @param array $arrayofinputfieldsalreadyoutput Array of input fields already inform. The component will not generate a hidden input field if it is in this list.
|
||||||
|
* @return string HTML component for advanced search
|
||||||
*/
|
*/
|
||||||
public function searchComponent($arrayofcriterias, $search_component_params)
|
public function searchComponent($arrayofcriterias, $search_component_params, $arrayofhiddenfieldstoadd = array())
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
@ -8046,12 +8047,33 @@ class Form
|
|||||||
|
|
||||||
$ret .= '<div class="nowrap centpercent">';
|
$ret .= '<div class="nowrap centpercent">';
|
||||||
//$ret .= '<button type="submit" class="liste_titre button_removefilter" name="button_removefilter_x" value="x"><span class="fa fa-remove"></span></button>';
|
//$ret .= '<button type="submit" class="liste_titre button_removefilter" name="button_removefilter_x" value="x"><span class="fa fa-remove"></span></button>';
|
||||||
$ret .= '<a href="ee" class="dropdown-toggle unsetcolor">';
|
$ret .= '<a href="#" class="dropdownsearch-toggle unsetcolor paddingright">';
|
||||||
$ret .= '<span class="fas fa-filter linkobject boxfilter" title="Filter" id="idsubimgproductdistribution"></span>';
|
$ret .= '<span class="fas fa-filter linkobject boxfilter" title="Filter" id="idsubimgproductdistribution"></span>';
|
||||||
$ret .= $langs->trans("Filters");
|
$ret .= $langs->trans("Filters");
|
||||||
$ret .= '</a>';
|
$ret .= '</a>';
|
||||||
$ret .= '<button type="submit" class="liste_titre button_search paddingleftonly" name="button_search_x" value="x"><span class="fa fa-search"></span></button>';
|
//$ret .= '<button type="submit" class="liste_titre button_search paddingleftonly" name="button_search_x" value="x"><span class="fa fa-search"></span></button>';
|
||||||
$ret .= '<input type="text" name="search_component_params" class="search_component_params centpercent">';
|
$ret .= '<div name="search_component_params" class="search_component_params inline-block centpercent">';
|
||||||
|
$ret .= '<input type="text" name="search_component_params_input" class="search_component_params_input" placeholder="'.$langs->trans("Search").'" value="'.GETPOST("search_component_params_input").'">';
|
||||||
|
$ret .= '</div>';
|
||||||
|
foreach($arrayofcriterias as $criterias) {
|
||||||
|
foreach($criterias as $criteriafamilykey => $criteriafamilyval) {
|
||||||
|
if (in_array('search_'.$criteriafamilykey, $arrayofhiddenfieldstoadd)) continue;
|
||||||
|
if (in_array($criteriafamilykey, array('rowid', 'ref_ext', 'entity', 'extraparams'))) continue;
|
||||||
|
if (in_array($criteriafamilyval['type'], array('date', 'datetime', 'timestamp'))) {
|
||||||
|
$ret .= '<input type="hidden" name="search_'.$criteriafamilykey.'_start">';
|
||||||
|
$ret .= '<input type="hidden" name="search_'.$criteriafamilykey.'_startyear">';
|
||||||
|
$ret .= '<input type="hidden" name="search_'.$criteriafamilykey.'_startmonth">';
|
||||||
|
$ret .= '<input type="hidden" name="search_'.$criteriafamilykey.'_startday">';
|
||||||
|
$ret .= '<input type="hidden" name="search_'.$criteriafamilykey.'_end">';
|
||||||
|
$ret .= '<input type="hidden" name="search_'.$criteriafamilykey.'_endyear">';
|
||||||
|
$ret .= '<input type="hidden" name="search_'.$criteriafamilykey.'_endmonth">';
|
||||||
|
$ret .= '<input type="hidden" name="search_'.$criteriafamilykey.'_endday">';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$ret .= '<input type="hidden" name="search_'.$criteriafamilykey.'">';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
$ret .= '</div>';
|
$ret .= '</div>';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -171,7 +171,7 @@ function dol_verifyHash($chain, $hash, $type = '0')
|
|||||||
* @param string $features Features to check (it must be module name. Examples: 'societe', 'contact', 'produit&service', 'produit|service', ...)
|
* @param string $features Features to check (it must be module name. Examples: 'societe', 'contact', 'produit&service', 'produit|service', ...)
|
||||||
* @param int $objectid Object ID if we want to check a particular record (optional) is linked to a owned thirdparty (optional).
|
* @param int $objectid Object ID if we want to check a particular record (optional) is linked to a owned thirdparty (optional).
|
||||||
* @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity for multicompany modume. Param not used if objectid is null (optional).
|
* @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity for multicompany modume. Param not used if objectid is null (optional).
|
||||||
* @param string $feature2 Feature to check, second level of permission (optional). Can be a 'or' check with 'level1|level2'.
|
* @param string $feature2 Feature to check, second level of permission (optional). Can be a 'or' check with 'sublevela|sublevelb'.
|
||||||
* @param string $dbt_keyfield Field name for socid foreign key if not fk_soc. Not used if objectid is null (optional)
|
* @param string $dbt_keyfield Field name for socid foreign key if not fk_soc. Not used if objectid is null (optional)
|
||||||
* @param string $dbt_select Field name for select if not rowid. Not used if objectid is null (optional)
|
* @param string $dbt_select Field name for select if not rowid. Not used if objectid is null (optional)
|
||||||
* @param int $isdraft 1=The object with id=$objectid is a draft
|
* @param int $isdraft 1=The object with id=$objectid is a draft
|
||||||
|
|||||||
@ -37,7 +37,7 @@ FormatedExportDesc3=When data to export are selected, you can choose the format
|
|||||||
Sheet=Sheet
|
Sheet=Sheet
|
||||||
NoImportableData=No importable data (no module with definitions to allow data imports)
|
NoImportableData=No importable data (no module with definitions to allow data imports)
|
||||||
FileSuccessfullyBuilt=File generated
|
FileSuccessfullyBuilt=File generated
|
||||||
SQLUsedForExport=SQL Request used to build export file
|
SQLUsedForExport=SQL Request used to extract data
|
||||||
LineId=Id of line
|
LineId=Id of line
|
||||||
LineLabel=Label of line
|
LineLabel=Label of line
|
||||||
LineDescription=Description of line
|
LineDescription=Description of line
|
||||||
|
|||||||
@ -1015,6 +1015,7 @@ ContactAddedAutomatically=Contact added from contact thirdparty roles
|
|||||||
More=More
|
More=More
|
||||||
ShowDetails=Show details
|
ShowDetails=Show details
|
||||||
CustomReports=Custom reports
|
CustomReports=Custom reports
|
||||||
|
StatisticsOn=Statistics on
|
||||||
SelectYourGraphOptionsFirst=Select your graph options to build a graph
|
SelectYourGraphOptionsFirst=Select your graph options to build a graph
|
||||||
Measures=Measures
|
Measures=Measures
|
||||||
XAxis=X-Axis
|
XAxis=X-Axis
|
||||||
|
|||||||
@ -128,7 +128,7 @@ class Societe extends CommonObject
|
|||||||
public $fields = array(
|
public $fields = array(
|
||||||
'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'index'=>1, 'position'=>1, 'comment'=>'Id'),
|
'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'index'=>1, 'position'=>1, 'comment'=>'Id'),
|
||||||
'nom' =>array('type'=>'varchar(128)', 'label'=>'Name', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1, 'comment'=>'Reference of object'),
|
'nom' =>array('type'=>'varchar(128)', 'label'=>'Name', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1, 'comment'=>'Reference of object'),
|
||||||
'name_alias' =>array('type'=>'varchar(128)', 'label'=>'Name', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1, 'comment'=>'Reference of object'),
|
'name_alias' =>array('type'=>'varchar(128)', 'label'=>'AliasNames', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1, 'comment'=>'Reference of object'),
|
||||||
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'default'=>1, 'notnull'=>1, 'index'=>1, 'position'=>20),
|
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'default'=>1, 'notnull'=>1, 'index'=>1, 'position'=>20),
|
||||||
'note_public' =>array('type'=>'text', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>60),
|
'note_public' =>array('type'=>'text', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>60),
|
||||||
'note_private' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>61),
|
'note_private' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>61),
|
||||||
@ -3779,6 +3779,7 @@ class Societe extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if we must use revenue stamps feature or not according to country (country of $mysocin most cases).
|
* Check if we must use revenue stamps feature or not according to country (country of $mysocin most cases).
|
||||||
|
* Table c_revenuestamp contains the country and value of stamp per invoice.
|
||||||
*
|
*
|
||||||
* @return boolean true or false
|
* @return boolean true or false
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user