You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2012-12-13 13:33:40

pvasener
Member
Registered: 2009-02-10
Posts: 36

[Orders Management 1.7.1] N° commande manquant dans liste des factures

Dans la liste des factures, j'ai ajouté la colonne 'Commande' mais cette colonne reste désespérement vide. Voilà la requête SQL générée:

SELECT 'xxx' AS currentuser, `glpi_plugin_order_bills`.`entities_id`, `glpi_plugin_order_bills`.`is_recursive`, `glpi_plugin_order_bills`.`number` AS ITEM_0,
`glpi_plugin_order_bills`.`id` AS ITEM_0_2, `glpi_entities`.`completename` AS ITEM_1, `glpi_entities`.`id` AS ITEM_1_2, `glpi_plugin_order_bills`.`billdate` AS ITEM_2,
`glpi_plugin_order_bills`.`validationdate` AS ITEM_3, `glpi_plugin_order_orders`.`name` AS ITEM_4, `glpi_plugin_order_orders`.`id` AS ITEM_4_2,
`glpi_suppliers`.`name` AS ITEM_5, `glpi_suppliers`.`id` AS ITEM_5_2, `glpi_plugin_order_bills`.`name` AS ITEM_6, `glpi_plugin_order_bills`.`id` AS ITEM_6_2,
`glpi_plugin_order_bills`.`comment` AS ITEM_7, `glpi_plugin_order_billstates`.`name` AS ITEM_8, `glpi_plugin_order_billtypes`.`name` AS ITEM_9,
`glpi_plugin_order_bills`.`id` AS id
FROM `glpi_plugin_order_bills`
LEFT JOIN `glpi_entities` ON (`glpi_plugin_order_bills`.`entities_id` = `glpi_entities`.`id` )
LEFT JOIN `glpi_plugin_order_orders_items` ON (`glpi_plugin_order_bills`.`id` = `glpi_plugin_order_orders_items`.`items_id`
AND `glpi_plugin_order_orders_items`.`itemtype` = 'PluginOrderBill')
LEFT JOIN `glpi_plugin_order_orders` ON (`glpi_plugin_order_orders`.`id` = `glpi_plugin_order_orders_items`.`plugin_order_orders_id`)
LEFT JOIN `glpi_suppliers` ON (`glpi_plugin_order_bills`.`suppliers_id` = `glpi_suppliers`.`id` )
LEFT JOIN `glpi_plugin_order_billstates` ON (`glpi_plugin_order_bills`.`plugin_order_billstates_id` = `glpi_plugin_order_billstates`.`id` )
LEFT JOIN `glpi_plugin_order_billtypes` ON (`glpi_plugin_order_bills`.`plugin_order_billtypes_id` = `glpi_plugin_order_billtypes`.`id` )
WHERE ( `glpi_plugin_order_bills`.`entities_id` IN ('1', '3') OR (`glpi_plugin_order_bills`.`is_recursive`='1' AND `glpi_plugin_order_bills`.`entities_id` IN ('0')) )
ORDER BY ITEM_0 ASC LIMIT 0, 50

Le lien vers la commande ma paraît bien compliqué. Je n'ai pas de itemtype 'PluginOrderBill' dans ma table 'glpi_plugin_orders_orders_items' et je ne vois pas d'ailleurs pourquoi la requête incorpore cela. Il y a simplement une référence à la commande dans la table des factures, cela devrait être plus simple non?

Last edited by pvasener (2012-12-13 13:36:24)

Offline

Board footer

Powered by FluxBB