Projet

Général

Profil

Révision c2d3b60c

Voir les différences:

plugins/anet_epacks/front/plugin_anet_epacks.view_array_recap.php
87 87
//
88 88
function local_make_query($data, $entityid, $maintenance) {
89 89
  $query = "SELECT e.*, e.FK_enduser as entityid, g3.name as client, g4.name as serveur, g4.os_license_number, g4.os_license_id, g4.otherserial, ssh.*,
90
(g5.nbeleves+g5.nbprofs) as nbusers, g5.nbpc as nbpc, g6.name as contract
90
(g5.nbeleves+g5.nbprofs) as nbusers, g5.nbpc as nbpc, g6.name as contract, g7.name as rvd
91 91
FROM glpi_plugin_anet_epacks AS e
92 92
LEFT JOIN glpi_plugin_anet_epacks_ssh_max AS ssh ON e.FK_serveur=ssh.FK_serveur
93 93
LEFT JOIN glpi_entities AS g3 ON (e.FK_client=g3.ID OR e.FK_enduser=g3.ID)
94 94
LEFT JOIN glpi_computers AS g4 ON e.FK_serveur=g4.ID
95 95
LEFT JOIN glpi_plugin_anet_epacks_recencement_max AS g5 ON e.FK_serveur=g5.FK_serveur
96
LEFT JOIN glpi_contracts AS g6 ON e.FK_contract=g6.ID\n";
96
LEFT JOIN glpi_contracts AS g6 ON e.FK_contract=g6.ID
97
LEFT JOIN glpi_entities AS g7 ON e.FK_clientderyxeo=g7.ID\n";
97 98

  
98 99
  //WHERE e.Fk_Serveur > '0'\n";
99 100
  if($data['name'] == "revendeur" || $data['name'] == "dsi") {
......
120 121
    //On ne peut pas group by client a cause de l'historique ou on avait pas la meme structure
121 122
    //de base
122 123
    $query .= "GROUP BY e.FK_serveur
123
ORDER BY client ASC
124
ORDER BY rvd ASC
124 125
LIMIT 500;";
125 126
  }
126 127

  
......
133 134
//special pour trouver les serveurs existants mais les enduser=0 (abonnement zen pas fait ou autre ?)
134 135
function local_make_query_zarb() {
135 136
  $query = "SELECT e.*, e.FK_enduser as entityid, g3.name as client, g4.name as serveur, g4.os_license_number, g4.os_license_id, g4.otherserial, ssh.*,
136
(g5.nbeleves+g5.nbprofs) as nbusers, g5.nbpc as nbpc, g6.name as contract
137
(g5.nbeleves+g5.nbprofs) as nbusers, g5.nbpc as nbpc, g6.name as contract, g7.name as rvd
137 138
FROM glpi_plugin_anet_epacks AS e
138 139
LEFT JOIN glpi_plugin_anet_epacks_ssh_max AS ssh ON e.FK_serveur=ssh.FK_serveur
139 140
LEFT JOIN glpi_entities AS g3 ON (e.FK_client=g3.ID OR e.FK_enduser=g3.ID)
140 141
LEFT JOIN glpi_computers AS g4 ON e.FK_serveur=g4.ID
141 142
LEFT JOIN glpi_plugin_anet_epacks_recencement_max AS g5 ON e.FK_serveur=g5.FK_serveur
142
LEFT JOIN glpi_contracts AS g6 ON e.FK_contract=g6.ID\n";
143
LEFT JOIN glpi_contracts AS g6 ON e.FK_contract=g6.ID
144
LEFT JOIN glpi_entities AS g7 ON e.FK_clientderyxeo=g7.ID\n";
145

  
143 146
  $query .= "WHERE e.FK_enduser='0' AND e.FK_client!='0'\n";
144 147
  $query .= "GROUP BY e.FK_serveur
145 148
ORDER BY client ASC
......
152 155
//Special pour les "dsi" quand on convertis a la vollee les comptes post-only en dsi pour les animtice
153 156
function local_make_query_dsi($data, $entityid, $maintenance) {
154 157
  $query = "SELECT e.*, e.FK_enduser as entityid, g3.name as client, g4.name as serveur, g4.os_license_number, g4.os_license_id, g4.otherserial, ssh.*,
155
(g5.nbeleves+g5.nbprofs) as nbusers, g5.nbpc as nbpc, g6.name as contract
158
(g5.nbeleves+g5.nbprofs) as nbusers, g5.nbpc as nbpc, g6.name as contract, g7.name as rvd
156 159
FROM glpi_plugin_anet_epacks AS e
157 160
LEFT JOIN glpi_plugin_anet_epacks_ssh_max AS ssh ON e.FK_serveur=ssh.FK_serveur
158 161
LEFT JOIN glpi_entities AS g3 ON (e.FK_client=g3.ID OR e.FK_enduser=g3.ID)
159 162
LEFT JOIN glpi_computers AS g4 ON e.FK_serveur=g4.ID
160 163
LEFT JOIN glpi_plugin_anet_epacks_recencement_max AS g5 ON e.FK_serveur=g5.FK_serveur
161
LEFT JOIN glpi_contracts AS g6 ON e.FK_contract=g6.ID\n";
164
LEFT JOIN glpi_contracts AS g6 ON e.FK_contract=g6.ID
165
LEFT JOIN glpi_entities AS g7 ON e.FK_clientderyxeo=g7.ID\n";
162 166

  
163 167
  //WHERE e.Fk_Serveur > '0'\n";
164 168
  if($data['name'] == "dsi") {
......
252 256
  <td>" . $data['nbpc'] . "</td>
253 257
  <td>" . $data['nbusers'] . "</td>
254 258
  <td>" . $data['contract'] . "</td>
259
  <td>" . $data['rvd'] . "</td>
255 260
</tr>\n";
256 261
      /*
257 262
       <a href=\"../../../front/contract.php?contains[0]=" . $data['client'] . "\"><img src=\"img/stock_hand-signed.png\" title=\"Contrat\"></a>
......
280 285

  
281 286
  if($enduser == 1) {
282 287
    $query = "SELECT e.*, e.FK_enduser as entityid, g3.name as client, g4.name as serveur, g4.os_license_number, g4.os_license_id, g4.otherserial, ssh.*,
283
(sum(g5.nbeleves)+sum(g5.nbprofs)) as nbusers, g5.nbpc as nbpc, g6.name as contract
288
(sum(g5.nbeleves)+sum(g5.nbprofs)) as nbusers, g5.nbpc as nbpc, g6.name as contract, g7.name as rvd
284 289
FROM glpi_plugin_anet_epacks AS e
285 290
LEFT JOIN glpi_plugin_anet_epacks_ssh_max AS ssh ON e.FK_serveur=ssh.FK_serveur
286 291
LEFT JOIN glpi_entities AS g3 ON (e.FK_client=g3.ID OR e.FK_enduser=g3.ID)
287 292
LEFT JOIN glpi_computers AS g4 ON e.FK_serveur=g4.ID
288 293
LEFT JOIN glpi_plugin_anet_epacks_recencement_max AS g5 ON e.FK_serveur=g5.FK_serveur
289
LEFT JOIN glpi_contracts AS g6 ON e.FK_contract=g6.ID\n";
294
LEFT JOIN glpi_contracts AS g6 ON e.FK_contract=g6.ID
295
LEFT JOIN glpi_entities AS g7 ON e.FK_clientderyxeo=g7.ID\n";
296

  
290 297
    //WHERE e.Fk_Serveur > '0'\n";
291 298

  
292 299
    if($maintenance == 0 || $maintenance ==  1) {
......
309 316
  }
310 317
  else {
311 318
    //LEFT JOIN glpi_entities AS g3 ON e.FK_client=g3.ID OR e.FK_enduser=g3.ID
312
    $query = "SELECT e.*, e.FK_client as entityid, g3.name as client, g4.name as serveur, g4.os_license_number, g4.os_license_id, g4.otherserial, ssh.*, g6.name as contract
319
    $query = "SELECT e.*, e.FK_client as entityid, g3.name as client, g4.name as serveur, g4.os_license_number, g4.os_license_id, g4.otherserial, ssh.*, g6.name as contract, g7.name as rvd
313 320
FROM glpi_plugin_anet_epacks AS e
314 321
LEFT JOIN glpi_plugin_anet_epacks_ssh_max AS ssh ON e.FK_serveur=ssh.FK_serveur
315 322
LEFT JOIN glpi_entities AS g3 ON (e.FK_client=g3.ID OR e.FK_enduser=g3.ID)
316 323
LEFT JOIN glpi_computers AS g4 ON e.FK_serveur=g4.ID
317 324
LEFT JOIN glpi_plugin_anet_epacks_recencement_max AS g5 ON e.FK_serveur=g5.FK_serveur
318 325
LEFT JOIN glpi_contracts AS g6 ON e.FK_contract=g6.ID
326
LEFT JOIN glpi_entities AS g7 ON e.FK_clientderyxeo=g7.ID
319 327
WHERE e.FK_enduser='0' AND e.FK_client!='0'
320 328
ORDER BY client\n";
321 329
    //print $query;
......
370 378
  <td>" . $data['nbpc'] . "</td>
371 379
  <td>" . $data['nbusers'] . "</td>
372 380
  <td>" . $data['contract'] . "</td>
381
  <td>" . $data['rvd'] . "</td>
373 382
</tr>\n";
374 383
      /*
375 384
	  <a href=\"../../../front/contract.php?contains[0]=" . $data['client'] . "\"><img src=\"img/stock_hand-signed.png\" title=\"Contrat\"></a>
......
411 420
  <th><img src=\"img/computer.png\" alt=\"Nombre de postes\" title=\"Nombre de postes clients\"></th>
412 421
  <th><img src=\"img/stock_people.png\" alt=\"Nombre d'utilisateurs\" title=\"Nombre d'utilisateurs\"></th>
413 422
  <th><img src=\"img/stock_hand-signed.png\" title=\"Contrat\"></th>
423
  <th><img src=\"img/stock_hand-signed.png\" title=\"Revendeur\"></th>
414 424
</tr>\n";
415 425

  
416 426
}
......
421 431
  <td>" . $total_nbpc . "</td>
422 432
  <td>" . $total_nbusers . "</td>
423 433
  <td></td>
434
  <td></td>
424 435
</tr>\n";
425 436

  
426 437
  $s .= "</table>";

Formats disponibles : Unified diff

Redmine Appliance - Powered by TurnKey Linux