order icon indicating copy to clipboard operation
order copied to clipboard

Order with empty item

Open Megachip opened this issue 7 years ago • 2 comments

Somehow I managed it to add nothing with a quantity of 1 to an order. Sadly, this can't be removed and also I can't add any further items. image

GLPI: 9.2.4 Orders: 2.0.2

Megachip avatar Jul 25 '18 10:07 Megachip

Hi,

Adding element without choosing an itemtype should not be allowed. Some checks have to be added.

To fix your problem quickly, you can remove items from DB using this SQL command. It should not have side effects: DELETE FROM `glpi_plugin_order_orders_items` WHERE `plugin_order_orders_id` = 9 AND `itemtype` = '';.

Regards

cedric-anne avatar Jul 26 '18 11:07 cedric-anne

Hi,

had an related error. A missing reference was the issue. Someone purged a product reference and an old order could not be viewed anymore. Tab "Order item" -> error, tab "Item delivered" -> error and tab "associated items" -> affected items were not listed.

Reproduction: Delete a reference or change the plugin_order_references_id into a non-existing one (for testing).

GLPI: 9.3.1 Order: 2.1.1

More checks would be nice.

Regards

Phorms avatar Nov 12 '18 17:11 Phorms