r307 - in trunk/magalie-web/src/main: java/com/franciaflex/magalie/web/action webapp/js
Author: bleny Date: 2013-07-12 22:50:13 +0200 (Fri, 12 Jul 2013) New Revision: 307 Url: http://forge.codelutin.com/projects/franciaflex-magalie/repository/revisions... Log: allow to not specify quantity when in kanban Modified: trunk/magalie-web/src/main/java/com/franciaflex/magalie/web/action/FulfilKanbanAction.java trunk/magalie-web/src/main/webapp/js/withdraw-item-input.js Modified: trunk/magalie-web/src/main/java/com/franciaflex/magalie/web/action/FulfilKanbanAction.java =================================================================== --- trunk/magalie-web/src/main/java/com/franciaflex/magalie/web/action/FulfilKanbanAction.java 2013-07-12 20:31:14 UTC (rev 306) +++ trunk/magalie-web/src/main/java/com/franciaflex/magalie/web/action/FulfilKanbanAction.java 2013-07-12 20:50:13 UTC (rev 307) @@ -160,36 +160,14 @@ } - if (quantity == null) { + try { - double quantityDefined; + quantity = service.getDefinedQuantity(article, destinationWarehouse); - try { + } catch (ArticleNotAvailableForKanbanException e) { - quantityDefined = service.getDefinedQuantity(article, destinationWarehouse); + addFieldError("articleBarcode", "Article non disponible par kanban"); - } catch (ArticleNotAvailableForKanbanException e) { - - addFieldError("articleBarcode", "Article non disponible par kanban"); - - return INPUT; - - } - - if (quantityDefined > 0) { - - quantity = quantityDefined; - - } - - } - - if (quantity == null || ! (quantity > 0.)) { - - askQuantity = true; - - addFieldError("quantity", "Il faut préciser une quantité pour cet article"); - return INPUT; } Modified: trunk/magalie-web/src/main/webapp/js/withdraw-item-input.js =================================================================== --- trunk/magalie-web/src/main/webapp/js/withdraw-item-input.js 2013-07-12 20:31:14 UTC (rev 306) +++ trunk/magalie-web/src/main/webapp/js/withdraw-item-input.js 2013-07-12 20:50:13 UTC (rev 307) @@ -269,7 +269,11 @@ model.withdraw(barcode, quantity); - if (model.expectedQuantity && model.withdrawn() < model.expectedQuantity) { + view.refresh(); + + var proposeAnotherLocation = ! model.expectedQuantity // pas de quantité demandée précisée au départ donc on ne sait pas s'il faut s'arrêter donc on propose au cas où + || model.withdrawn() < model.expectedQuantity // on a une quantité demandée mais on ne l'a pas encore atteinte + if (proposeAnotherLocation) { model.newEmptyStorageMovementForNextLocation(); }
participants (1)
-
bleny@users.forge.codelutin.com