< Logiciel Pastèque < API
Fix for pasteque server issue #15
Issue 15: Doublons appears in inventory
Found on 6.0
Caused by: adding movements with 0 quantities duplicates stockcurrent line with null attributesetinstance_id.
Fix for 7.0: don't save movements with 0 as quantity in StockService
Rebuild a broken STOCKCURRENT table
Use the following script to rebuild the broken table from STOCKDIARY
MySQL :
-- Kill the crappy STOCKCURRENT
TRUNCATE STOCKCURRENT;
-- Rebuild from STOCKDIARY
INSERT INTO STOCKCURRENT (LOCATION, PRODUCT, ATTRIBUTESETINSTANCE_ID, UNITS)
SELECT LOCATION, PRODUCT, ATTRIBUTESETINSTANCE_ID, SUM(UNITS) AS UNITS FROM STOCKDIARY GROUP BY LOCATION, PRODUCT, ATTRIBUTESETINSTANCE_ID;
Cet article est issu de Wikibooks. Le texte est sous licence Creative Commons - Attribution - Partage dans les Mêmes. Des conditions supplémentaires peuvent s'appliquer aux fichiers multimédias.