-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Hello,
First, thanks for this plugin.
I'd like to add the Counter of printer in a column of the global view.
I already check a little the code and make this :
$tab[6090]['table'] = 'glpi_plugin_printercounters_counters'; $tab[6090]['field'] = 'value'; $tab[6090]['name'] = __('Printercounters', 'printercounters').' - '.__('Counter', 'printercounters'); $tab[6090]['datatype'] = 'number'; $tab[6090]['massiveaction'] = false; $tab[6090]['joinparams'] = ['jointype' => 'child', 'condition' => "AND NEWTABLE.value= (SELECTglpi_plugin_printercounters_counters.valueFROMglpi_plugin_printercounters_countersINNER JOINglpi_plugin_printercounters_recordsONglpi_plugin_printercounters_counters.plugin_printercounters_records_id=glpi_plugin_printercounters_records.idINNER JOINglpi_plugin_printercounters_items_recordmodelsONglpi_plugin_printercounters_records.plugin_printercounters_items_recordmodels_id = glpi_plugin_printercounters_items_recordmodels.idWHEREglpi_plugin_printercounters_items_recordmodels.items_id = REFTABLE.id) ", 'beforejoin' => ['table' => 'glpi_plugin_printercounters_items_recordmodels', 'joinparams' => ['jointype' => 'itemtype_item']] ];
But I don't really understand how works the joinparams, so I someone could help please.