You are not logged in.
Hi all,
this is my first post, so please forgive me if something is wrong.
I have a software in glpi_software, lets assume
ID 1120
FK_entities 0
name Microsoft SuperSoft
comments
location 0
tech_num 0
platform -1
is_update 0
update_software -1
FK_glpi_enterprise 130
deleted 0 is_template 0
tplname
date_mod xxx
notes NULL
FK_users 0
FK_groups -1
state 0
ticket_tco 0.0000
category 0
and some licences in glpi_licenses
ID, SID, version , serial, EXPIRE, oem, oem_computer, buy, comments
3278 1120 SuperSoft 2007 NULL 0 -1 1
3279 1120 SuperSoft 2007 NULL 0 -1 1
2349 1120 SuperSoft 2000 NULL 0 -1 1
2350 1120 SuperSoft 2000 NULL 0 -1 1
2351 1120 SuperSoft 2000 NULL 0 -1 1
All licences are 'free' ( not installed , glpi_inst_software is empty )
Now I am trying to decrease number of licences for SuperSoft 2000,
from 3 to 2.
GLPI removes record from glpi_licenses which contains SuperSoft 2007,
3278 or 3279, but should remove 2349 or 2350 or 2351.
Final result is like
DELETE FROM glpi_licenses where sid = 1120 and id =
( select max(id) from glpi_licenses where sid = 1120)
but should be
DELETE FROM glpi_licenses where sid = 1120 and id =
( select max(id) from glpi_licenses where sid = 1120
and version = 'SuperSoft 2000')
Question are:
1) Am I right ?
2) If I am right - how to correct this error ?
Where (I mean file ) the relevant function (SQL query) is stored ?
best regards
pluton
Last edited by pluton (2010-09-23 09:56:26)
Offline
Why don't you use the GUI ?
Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/
Offline
Why don't you use the GUI ?
Of course I do.
Is it possible to use GLPI without GUI ?
best regards
pluton
Offline
Hi all,
...
Help yourself
...\www\html\glpi1\inc\software.function.php
line 600
Previous:
$SEARCH_LICENCE = "(glpi_licenses.sID = " . $lic->fields["sID"] . " AND glpi_licenses.serial = '" . $lic->fields["serial"] . "' AND glpi_licenses.oem = '" . $lic->fields["oem"] . "' AND glpi_licenses.oem_computer = '" . $lic->fields["oem_computer"] . "' AND glpi_licenses.buy = '" . $lic->fields["buy"] . "' ";
Replace to:
$SEARCH_LICENCE = "(glpi_licenses.sID = " . $lic->fields["sID"] . " AND glpi_licenses.serial = '" . $lic->fields["serial"] . "' AND glpi_licenses.version = '" . $lic->fields["version"] . "' AND glpi_licenses.oem = '" . $lic->fields["oem"] . "' AND glpi_licenses.oem_computer = '" . $lic->fields["oem_computer"] . "' AND glpi_licenses.buy = '" . $lic->fields["buy"] . "' ";
best regards
pluton
Offline