Author: bleny Date: 2013-05-29 14:54:54 +0200 (Wed, 29 May 2013) New Revision: 211 Url: http://forge.codelutin.com/projects/franciaflex-magalie/repository/revisions... Log: refs #2168 implementation of simple withdraw (missing driver licence and article availability) Added: trunk/magalie-services/src/main/java/com/franciaflex/magalie/services/SimpleWithdrawItemTask.java trunk/magalie-services/src/main/java/com/franciaflex/magalie/services/service/SimpleWithdrawItemService.java trunk/magalie-web/src/main/java/com/franciaflex/magalie/web/action/PrepareWithdrawItemAction.java trunk/magalie-web/src/main/java/com/franciaflex/magalie/web/action/SimpleWithdrawItemAction.java trunk/magalie-web/src/main/webapp/WEB-INF/content/prepare-withdraw-item-input.jsp trunk/magalie-web/src/main/webapp/WEB-INF/content/simple-withdraw-item-input.jsp Removed: trunk/magalie-web/src/main/webapp/WEB-INF/content/fulfil-kanban-input.jsp Modified: trunk/magalie-persistence/src/main/java/com/franciaflex/magalie/persistence/Locations.java trunk/magalie-persistence/src/main/java/com/franciaflex/magalie/persistence/StoredArticles.java trunk/magalie-services/src/main/java/com/franciaflex/magalie/services/service/FulfilKanbanService.java trunk/magalie-services/src/main/java/com/franciaflex/magalie/services/service/StorageTransferService.java trunk/magalie-web/src/main/java/com/franciaflex/magalie/web/Activity.java trunk/magalie-web/src/main/java/com/franciaflex/magalie/web/action/FulfilKanbanAction.java trunk/magalie-web/src/main/webapp/WEB-INF/content/choose-activity.jsp Modified: trunk/magalie-persistence/src/main/java/com/franciaflex/magalie/persistence/Locations.java =================================================================== --- trunk/magalie-persistence/src/main/java/com/franciaflex/magalie/persistence/Locations.java 2013-05-29 12:30:22 UTC (rev 210) +++ trunk/magalie-persistence/src/main/java/com/franciaflex/magalie/persistence/Locations.java 2013-05-29 12:54:54 UTC (rev 211) @@ -25,6 +25,7 @@ import com.franciaflex.magalie.persistence.entity.Location; import com.franciaflex.magalie.persistence.entity.MagalieUser; +import com.google.common.base.Function; import com.google.common.base.Predicate; import com.google.common.base.Predicates; import com.google.common.collect.Lists; @@ -75,6 +76,14 @@ } } + protected static class GetBarcode implements Function<Location, String> { + + @Override + public String apply(Location location) { + return location.getBarcode(); + } + } + public static Predicate<Location> accessibleLocationPredicate(MagalieUser magalieUser) { return new AccessibleLocationPredicate(magalieUser); } @@ -117,4 +126,13 @@ ); return isAcceptableForReception; } + + public static Predicate<Location> barcodeEquals(String originLocationBarcode) { + return Predicates.compose(Predicates.equalTo(originLocationBarcode), getBarcodeFunction()); + } + + public static Function<Location, String> getBarcodeFunction() { + return new GetBarcode(); + } + } Modified: trunk/magalie-persistence/src/main/java/com/franciaflex/magalie/persistence/StoredArticles.java =================================================================== --- trunk/magalie-persistence/src/main/java/com/franciaflex/magalie/persistence/StoredArticles.java 2013-05-29 12:30:22 UTC (rev 210) +++ trunk/magalie-persistence/src/main/java/com/franciaflex/magalie/persistence/StoredArticles.java 2013-05-29 12:54:54 UTC (rev 211) @@ -172,4 +172,8 @@ return Functions.compose(Articles.getSupplierFunction(), getArticleFunction()); } + public static Predicate<StoredArticle> locationBarcodeEquals(String originLocationBarcode) { + return Predicates.compose(Locations.barcodeEquals(originLocationBarcode), getLocationFunction()); + } + } Added: trunk/magalie-services/src/main/java/com/franciaflex/magalie/services/SimpleWithdrawItemTask.java =================================================================== --- trunk/magalie-services/src/main/java/com/franciaflex/magalie/services/SimpleWithdrawItemTask.java (rev 0) +++ trunk/magalie-services/src/main/java/com/franciaflex/magalie/services/SimpleWithdrawItemTask.java 2013-05-29 12:54:54 UTC (rev 211) @@ -0,0 +1,31 @@ +package com.franciaflex.magalie.services; + +import com.franciaflex.magalie.persistence.entity.StoredArticle; + +import java.util.List; + +public class SimpleWithdrawItemTask { + + protected List<StoredArticle> storedArticles; + + // TODO brendan 29/05/13 + protected boolean driverLicenseRequired; + + protected boolean articleUnavailable; + + public SimpleWithdrawItemTask(List<StoredArticle> storedArticles) { + this.storedArticles = storedArticles; + } + + public List<StoredArticle> getStoredArticles() { + return storedArticles; + } + + public boolean isDriverLicenseRequired() { + return driverLicenseRequired; + } + + public boolean isArticleUnavailable() { + return articleUnavailable; + } +} Modified: trunk/magalie-services/src/main/java/com/franciaflex/magalie/services/service/FulfilKanbanService.java =================================================================== --- trunk/magalie-services/src/main/java/com/franciaflex/magalie/services/service/FulfilKanbanService.java 2013-05-29 12:30:22 UTC (rev 210) +++ trunk/magalie-services/src/main/java/com/franciaflex/magalie/services/service/FulfilKanbanService.java 2013-05-29 12:54:54 UTC (rev 211) @@ -23,10 +23,8 @@ * #L% */ -import com.franciaflex.magalie.persistence.Locations; import com.franciaflex.magalie.persistence.MagaliePersistenceContext; import com.franciaflex.magalie.persistence.dao.KanbanDao; -import com.franciaflex.magalie.persistence.dao.LocationDao; import com.franciaflex.magalie.persistence.dao.WarehouseDao; import com.franciaflex.magalie.persistence.entity.Article; import com.franciaflex.magalie.persistence.entity.Building; @@ -91,8 +89,12 @@ Building building = destinationWarehouse.getBuilding(); - Location destinationLocation = getDestinationLocation(destinationWarehouse); + SimpleWithdrawItemService simpleWithdrawItemService = + serviceContext.newService(SimpleWithdrawItemService.class); + Location destinationLocation = + simpleWithdrawItemService.getDestinationLocation(destinationWarehouse); + BookArticleRequest bookArticleRequest = new BookArticleRequest( magalieUser, building, article, @@ -105,18 +107,6 @@ } - protected Location getDestinationLocation(Warehouse destinationWarehouse) { - - MagaliePersistenceContext persistenceContext = serviceContext.getPersistenceContext(); - - LocationDao locationDao = persistenceContext.getLocationDao(); - - Location location = locationDao.find(Locations.codeForWarehouseWithoutLocations(), destinationWarehouse); - - return location; - - } - public List<Warehouse> getDestinationWarehouses(Building building) { MagaliePersistenceContext persistenceContext = serviceContext.getPersistenceContext(); Added: trunk/magalie-services/src/main/java/com/franciaflex/magalie/services/service/SimpleWithdrawItemService.java =================================================================== --- trunk/magalie-services/src/main/java/com/franciaflex/magalie/services/service/SimpleWithdrawItemService.java (rev 0) +++ trunk/magalie-services/src/main/java/com/franciaflex/magalie/services/service/SimpleWithdrawItemService.java 2013-05-29 12:54:54 UTC (rev 211) @@ -0,0 +1,122 @@ +package com.franciaflex.magalie.services.service; + +import com.franciaflex.magalie.persistence.Locations; +import com.franciaflex.magalie.persistence.MagaliePersistenceContext; +import com.franciaflex.magalie.persistence.dao.LocationDao; +import com.franciaflex.magalie.persistence.dao.StorageMovementDao; +import com.franciaflex.magalie.persistence.dao.WarehouseDao; +import com.franciaflex.magalie.persistence.entity.Article; +import com.franciaflex.magalie.persistence.entity.Building; +import com.franciaflex.magalie.persistence.entity.Location; +import com.franciaflex.magalie.persistence.entity.MagalieUser; +import com.franciaflex.magalie.persistence.entity.StorageMovement; +import com.franciaflex.magalie.persistence.entity.StoredArticle; +import com.franciaflex.magalie.persistence.entity.Warehouse; +import com.franciaflex.magalie.services.MagalieService; +import com.franciaflex.magalie.services.MagalieServiceContext; +import com.franciaflex.magalie.services.SimpleWithdrawItemTask; +import com.franciaflex.magalie.services.exception.InvalidMagalieBarcodeException; +import com.google.common.collect.Lists; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.util.Date; + +public class SimpleWithdrawItemService implements MagalieService { + + private static final Log log = LogFactory.getLog(SimpleWithdrawItemService.class); + + protected MagalieServiceContext serviceContext; + + @Override + public void setServiceContext(MagalieServiceContext serviceContext) { + this.serviceContext = serviceContext; + } + + public SimpleWithdrawItemTask getSimpleWithdrawItemTask(Building building, String articleBarcode) throws InvalidMagalieBarcodeException { + + ArticleStorageService articleStorageService = + serviceContext.newService(ArticleStorageService.class); + + MagalieBarcodeService magalieBarcodeService = + serviceContext.newService(MagalieBarcodeService.class); + + Article article = magalieBarcodeService.getArticle(articleBarcode); + + Iterable<StoredArticle> storedArticles = + articleStorageService.getStoredArticles(building, article); + + SimpleWithdrawItemTask simpleWithdrawItemTask = + new SimpleWithdrawItemTask(Lists.newArrayList(storedArticles)); + + return simpleWithdrawItemTask; + + } + + public void confirmStorageMovement(MagalieUser magalieUser, String destinationWarehouseId, StoredArticle storedArticle) { + + MagaliePersistenceContext persistenceContext = serviceContext.getPersistenceContext(); + + WarehouseDao warehouseDao = persistenceContext.getWarehouseDao(); + + Date now = serviceContext.getNow(); + + // principle is taking a stored article and get everything (all quantity) + + Location originLocation = storedArticle.getLocation(); + + Article article = storedArticle.getArticle(); + + double quantity = storedArticle.getQuantity(); + + if (log.isInfoEnabled()) { + log.info("user " + magalieUser.getLogin() + " took " + + quantity + " " + article.getUnit() + " from " + + originLocation.getBarcode()); + } + + // find actual destination location + + Warehouse destinationWarehouse = warehouseDao.findById(destinationWarehouseId); + + Location destinationLocation = getDestinationLocation(destinationWarehouse); + + // create new storage movement + + StorageMovement storageMovement = new StorageMovement(); + + storageMovement.setOriginLocation(originLocation); + + storageMovement.setDestinationLocation(destinationLocation); + + storageMovement.setMagalieUser(magalieUser); + + storageMovement.setArticle(article); + + storageMovement.setActualQuantity(quantity); + + storageMovement.setConfirmDate(now); + + // save storage movement + + StorageMovementDao storageMovementDao = persistenceContext.getStorageMovementDao(); + + storageMovementDao.persist(storageMovement); + + persistenceContext.commit(); + + } + + protected Location getDestinationLocation(Warehouse destinationWarehouse) { + + MagaliePersistenceContext persistenceContext = serviceContext.getPersistenceContext(); + + LocationDao locationDao = persistenceContext.getLocationDao(); + + Location location = locationDao.find(Locations.codeForWarehouseWithoutLocations(), destinationWarehouse); + + return location; + + } + +} Modified: trunk/magalie-services/src/main/java/com/franciaflex/magalie/services/service/StorageTransferService.java =================================================================== --- trunk/magalie-services/src/main/java/com/franciaflex/magalie/services/service/StorageTransferService.java 2013-05-29 12:30:22 UTC (rev 210) +++ trunk/magalie-services/src/main/java/com/franciaflex/magalie/services/service/StorageTransferService.java 2013-05-29 12:54:54 UTC (rev 211) @@ -90,7 +90,7 @@ return storedArticle; } - public void confirmStorageTransfer(MagalieUser magalieUser, StoredArticle storedArticle, double Quantity, Location destinationLocation ) { + public void confirmStorageTransfer(MagalieUser magalieUser, StoredArticle storedArticle, double quantity, Location destinationLocation) { MagaliePersistenceContext persistenceContext = serviceContext.getPersistenceContext(); @@ -110,7 +110,7 @@ storageMovement.setArticle(storedArticle.getArticle()); - storageMovement.setActualQuantity(Quantity); + storageMovement.setActualQuantity(quantity); storageMovement.setConfirmDate(now); Modified: trunk/magalie-web/src/main/java/com/franciaflex/magalie/web/Activity.java =================================================================== --- trunk/magalie-web/src/main/java/com/franciaflex/magalie/web/Activity.java 2013-05-29 12:30:22 UTC (rev 210) +++ trunk/magalie-web/src/main/java/com/franciaflex/magalie/web/Activity.java 2013-05-29 12:54:54 UTC (rev 211) @@ -33,6 +33,7 @@ REQUESTED_LISTS, KANBANS, + SIMPLE_WITHDRAW, RECEPTIONS, PREPARED_RECEPTIONS 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-05-29 12:30:22 UTC (rev 210) +++ trunk/magalie-web/src/main/java/com/franciaflex/magalie/web/action/FulfilKanbanAction.java 2013-05-29 12:54:54 UTC (rev 211) @@ -44,6 +44,7 @@ @Results({ + @Result(name="input", type = "dispatcher", location = "/WEB-INF/content/prepare-withdraw-item-input.jsp"), @Result(name="success", type="redirectAction", params = { "actionName", "withdraw-item!input", "storageMovementOrderId", "${storageMovementOrderId}" }) }) public class FulfilKanbanAction extends MagalieActionSupport implements Preparable { Added: trunk/magalie-web/src/main/java/com/franciaflex/magalie/web/action/PrepareWithdrawItemAction.java =================================================================== --- trunk/magalie-web/src/main/java/com/franciaflex/magalie/web/action/PrepareWithdrawItemAction.java (rev 0) +++ trunk/magalie-web/src/main/java/com/franciaflex/magalie/web/action/PrepareWithdrawItemAction.java 2013-05-29 12:54:54 UTC (rev 211) @@ -0,0 +1,156 @@ +package com.franciaflex.magalie.web.action; + +import com.franciaflex.magalie.persistence.entity.Article; +import com.franciaflex.magalie.persistence.entity.Building; +import com.franciaflex.magalie.persistence.entity.StorageMovementOrder; +import com.franciaflex.magalie.persistence.entity.Warehouse; +import com.franciaflex.magalie.services.exception.InvalidMagalieBarcodeException; +import com.franciaflex.magalie.services.service.FulfilKanbanService; +import com.franciaflex.magalie.services.service.SimpleWithdrawItemService; +import com.franciaflex.magalie.web.Activity; +import com.franciaflex.magalie.web.MagalieActionSupport; +import com.franciaflex.magalie.web.MagalieSession; +import com.opensymphony.xwork2.Preparable; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.struts2.convention.annotation.Result; +import org.apache.struts2.convention.annotation.Results; + +import java.util.List; + +@Results({ + @Result(name="success", type="redirectAction", params = { "actionName", "simple-withdraw-item!input", "articleBarcode", "${articleBarcode}", "destinationWarehouseId", "${destinationWarehouseId}"}) +}) +public class PrepareWithdrawItemAction extends MagalieActionSupport implements Preparable { + + private static final Log log = LogFactory.getLog(PrepareWithdrawItemAction.class); + + protected MagalieSession session; + + protected String articleBarcode; + + protected StorageMovementOrder storageMovementOrder; + + protected List<Warehouse> destinationWarehouses; + + protected String destinationWarehouseId; + + protected Double quantity; + + protected boolean askQuantity; + + protected Article article; + + protected Warehouse destinationWarehouse; + + protected FulfilKanbanService fulfilKanbanService; + + protected SimpleWithdrawItemService simpleWithdrawItemService; + + public void setSession(MagalieSession session) { + this.session = session; + } + + public void setFulfilKanbanService(FulfilKanbanService fulfilKanbanService) { + this.fulfilKanbanService = fulfilKanbanService; + } + + public void setSimpleWithdrawItemService(SimpleWithdrawItemService simpleWithdrawItemService) { + this.simpleWithdrawItemService = simpleWithdrawItemService; + } + + @Override + public void prepare() { + + Building building = session.getBuilding(); + + destinationWarehouses = fulfilKanbanService.getDestinationWarehouses(building); + + // let's help user by selecting by default the previously used destination warehouse + + Warehouse lastUsedDestinationWarehouseForKanbans = session.getLastUsedDestinationWarehouseForKanbans(); + + if (lastUsedDestinationWarehouseForKanbans != null) { + + destinationWarehouseId = lastUsedDestinationWarehouseForKanbans.getId(); + + } + + } + + public boolean isAskQuantity() { + return askQuantity; + } + + public String getDestinationWarehouseId() { + return destinationWarehouseId; + } + + public List<Warehouse> getDestinationWarehouses() { + return destinationWarehouses; + } + + public void setArticleBarcode(String articleBarcode) { + this.articleBarcode = articleBarcode; + } + + public void setDestinationWarehouseId(String destinationWarehouseId) { + this.destinationWarehouseId = destinationWarehouseId; + } + + public void setQuantity(Double quantity) { + this.quantity = quantity; + } + + @Override + public void validate() { + + if (log.isDebugEnabled()) { + log.debug("article barcode is " + articleBarcode); + } + + destinationWarehouse = fulfilKanbanService.getStore(destinationWarehouseId); + + // save used destination warehouse to propose it by default on next kanban + session.setLastUsedDestinationWarehouseForKanbans(destinationWarehouse); + + try { + + article = fulfilKanbanService.getArticle(articleBarcode); + + } catch (InvalidMagalieBarcodeException e) { + + addFieldError("articleBarcode", "Le code barre n'est pas un code valide"); + + } + + if (quantity != null) { + + addFieldError("quantity", "Il ne faut pas préciser la quantité"); + + } + + } + + @Override + public String execute() { + + session.setActivity(Activity.SIMPLE_WITHDRAW); + + return SUCCESS; + + } + + public Article getArticle() { + return article; + } + + public String getArticleBarcode() { + return articleBarcode; + } + + public String getStorageMovementOrderId() { + return storageMovementOrder.getId(); + } + +} Added: trunk/magalie-web/src/main/java/com/franciaflex/magalie/web/action/SimpleWithdrawItemAction.java =================================================================== --- trunk/magalie-web/src/main/java/com/franciaflex/magalie/web/action/SimpleWithdrawItemAction.java (rev 0) +++ trunk/magalie-web/src/main/java/com/franciaflex/magalie/web/action/SimpleWithdrawItemAction.java 2013-05-29 12:54:54 UTC (rev 211) @@ -0,0 +1,148 @@ +package com.franciaflex.magalie.web.action; + +import com.franciaflex.magalie.persistence.StoredArticles; +import com.franciaflex.magalie.persistence.entity.Building; +import com.franciaflex.magalie.persistence.entity.MagalieUser; +import com.franciaflex.magalie.persistence.entity.StoredArticle; +import com.franciaflex.magalie.services.SimpleWithdrawItemTask; +import com.franciaflex.magalie.services.exception.InvalidMagalieBarcodeException; +import com.franciaflex.magalie.services.service.SimpleWithdrawItemService; +import com.franciaflex.magalie.web.MagalieActionSupport; +import com.franciaflex.magalie.web.MagalieSession; +import com.google.common.base.Optional; +import com.google.common.collect.Iterables; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.struts2.convention.annotation.Result; +import org.apache.struts2.convention.annotation.Results; + +@Results({ + @Result(name="success", type="redirectAction", params = { "actionName", "prepare-withdraw-item!input" }), + @Result(name="error", type="redirectAction", params = { "actionName", "prepare-withdraw-item!input" }) +}) +public class SimpleWithdrawItemAction extends MagalieActionSupport { + + private static final Log log = LogFactory.getLog(SimpleWithdrawItemAction.class); + + protected SimpleWithdrawItemService service; + + protected String storedArticleId; + + protected String articleBarcode; + + protected MagalieSession session; + + protected SimpleWithdrawItemTask simpleWithdrawItemTask; + + protected String destinationWarehouseId; + + protected String originLocationBarcode; + + public void setSession(MagalieSession session) { + this.session = session; + } + + public void setArticleBarcode(String articleBarcode) { + this.articleBarcode = articleBarcode; + } + + public void setDestinationWarehouseId(String destinationWarehouseId) { + this.destinationWarehouseId = destinationWarehouseId; + } + + public void setService(SimpleWithdrawItemService service) { + this.service = service; + } + + @Override + public String input() { + + Building building = session.getBuilding(); + + try { + + simpleWithdrawItemTask = service.getSimpleWithdrawItemTask(building, articleBarcode); + + } catch (InvalidMagalieBarcodeException e) { + + log.error("should never occur, barcode is validated before arriving in this action", e); + + session.addMessage("Le code barre " + articleBarcode + " n'est pas un code valide"); + + return ERROR; + + } + + if (simpleWithdrawItemTask.isDriverLicenseRequired()) { + + session.addMessage("Un permis est requis pour accéder à cet article"); + + return ERROR; + + } + + if (simpleWithdrawItemTask.isArticleUnavailable()) { + + session.addMessage("Cet article n'est pas disponible"); + + return ERROR; + + } + + return INPUT; + + } + + public String getDestinationWarehouseId() { + return destinationWarehouseId; + } + + public String getArticleBarcode() { + return articleBarcode; + } + + public SimpleWithdrawItemTask getSimpleWithdrawItemTask() { + return simpleWithdrawItemTask; + } + + public void setStoredArticleId(String storedArticleId) { + this.storedArticleId = storedArticleId; + } + + public void setOriginLocationBarcode(String originLocationBarcode) { + this.originLocationBarcode = originLocationBarcode; + } + + @Override + public String execute() throws InvalidMagalieBarcodeException { + + MagalieUser magalieUser = session.getMagalieUser(); + + Building building = session.getBuilding(); + + simpleWithdrawItemTask = service.getSimpleWithdrawItemTask(building, articleBarcode); + + Optional<StoredArticle> storedArticleOptional = + Iterables.tryFind( + simpleWithdrawItemTask.getStoredArticles(), + StoredArticles.locationBarcodeEquals(originLocationBarcode)); + + if (storedArticleOptional.isPresent()) { + + service.confirmStorageMovement( + magalieUser, destinationWarehouseId, + storedArticleOptional.get()); + + } else { + + addFieldError("originLocationBarcode", "Ce n'est pas le code-barre d'un emplacement valide"); + + return INPUT; + + } + + return SUCCESS; + + } + +} Modified: trunk/magalie-web/src/main/webapp/WEB-INF/content/choose-activity.jsp =================================================================== --- trunk/magalie-web/src/main/webapp/WEB-INF/content/choose-activity.jsp 2013-05-29 12:30:22 UTC (rev 210) +++ trunk/magalie-web/src/main/webapp/WEB-INF/content/choose-activity.jsp 2013-05-29 12:54:54 UTC (rev 211) @@ -34,8 +34,9 @@ bindKey('3', function(){ redirectTo($('#prepareArticleReceptionLink'));}); bindKey('4', function(){ redirectTo($('#preparePreparedArticleReceptionLink'));}); bindKey('5', function(){ redirectTo($('#storageTransferLink'));}); + bindKey('6', function(){ redirectTo($('#prepareWithdrawItemLink'));}); <s:if test="movementOrderResume" > - bindKey('6', function(){ redirectTo($('#movementOrderResumeLink'));}); + bindKey('7', function(){ redirectTo($('#movementOrderResumeLink'));}); </s:if> bindKey('Esc', function(){ redirectTo($('#logoutLink'));}); }); @@ -66,11 +67,14 @@ <s:url namespace="/" action="storage-transfer-location!input" id="storageTransferUrl"/> <s:a href="%{storageTransferUrl}" cssClass="btn btn-block" id="storageTransferLink" >Transfert de stock (5)</s:a> +<s:url namespace="/" action="prepare-withdraw-item!input" id="prepareWithdrawItemUrl"/> +<s:a href="%{prepareWithdrawItemUrl}" cssClass="btn btn-block" id="prepareWithdrawItemLink" >Prélèvement immédiat (6)</s:a> + <s:if test="movementOrderResume" > <s:url namespace="/" action="withdraw-item!input" id="movementOrderResumeUrl"> <s:param name="storageMovementOrderId" value="%{movementOrderResume.id}" /> </s:url> - <s:a href="%{movementOrderResumeUrl}" cssClass="btn btn-block" id="movementOrderResumeLink" >Reprendre l'ordre de mouvement (6)</s:a> + <s:a href="%{movementOrderResumeUrl}" cssClass="btn btn-block" id="movementOrderResumeLink" >Reprendre l'ordre de mouvement (7)</s:a> </s:if> <s:url namespace="/" action="logout" id="logoutUrl"/> Deleted: trunk/magalie-web/src/main/webapp/WEB-INF/content/fulfil-kanban-input.jsp =================================================================== --- trunk/magalie-web/src/main/webapp/WEB-INF/content/fulfil-kanban-input.jsp 2013-05-29 12:30:22 UTC (rev 210) +++ trunk/magalie-web/src/main/webapp/WEB-INF/content/fulfil-kanban-input.jsp 2013-05-29 12:54:54 UTC (rev 211) @@ -1,57 +0,0 @@ -<%-- - #%L - MagaLiE :: UI - $Id:$ - $HeadURL:$ - %% - Copyright (C) 2013 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %> -<%@ taglib prefix="s" uri="/struts-tags" %> - -<head> - <title>Traitement des kanbans</title> - <script type="text/javascript"> - $(document).ready(function () { - $("#fulfil-kanban_articleBarcode").focus(); - bindKey('Esc', function(){ redirectTo($('#chooseActivityLink'));}); - }); - </script> -</head> - -<s:url namespace="/" action="choose-activity" id="chooseActivityUrl"/> - -<s:form> - <s:textfield key="articleBarcode" label="Article" inputAppendIcon="barcode" cssClass="input-medium" /> - - <s:select label="Magasin destination" - key="destinationWarehouseId" - list="destinationWarehouses" - listKey="id" - listValue="code" - required="true" - /> - - <s:if test="askQuantity"> - <s:textfield name="quantity" label="Qté" inputAppend="%{article.unit}" cssClass="input-mini" /> - </s:if> - - <div class="btn-group"> - <s:a href="%{chooseActivityUrl}" cssClass="btn" id="chooseActivityLink" >Changer d'activité (Esc)</s:a> - <s:submit name="next" value="Suivant" cssClass="btn btn-primary" /> - </div> -</s:form> \ No newline at end of file Copied: trunk/magalie-web/src/main/webapp/WEB-INF/content/prepare-withdraw-item-input.jsp (from rev 200, trunk/magalie-web/src/main/webapp/WEB-INF/content/fulfil-kanban-input.jsp) =================================================================== --- trunk/magalie-web/src/main/webapp/WEB-INF/content/prepare-withdraw-item-input.jsp (rev 0) +++ trunk/magalie-web/src/main/webapp/WEB-INF/content/prepare-withdraw-item-input.jsp 2013-05-29 12:54:54 UTC (rev 211) @@ -0,0 +1,57 @@ +<%-- + #%L + MagaLiE :: UI + $Id:$ + $HeadURL:$ + %% + Copyright (C) 2013 CodeLutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<head> + <title>Traitement des kanbans</title> + <script type="text/javascript"> + $(document).ready(function () { + $("#fulfil-kanban_articleBarcode").focus(); + bindKey('Esc', function(){ redirectTo($('#chooseActivityLink'));}); + }); + </script> +</head> + +<s:url namespace="/" action="choose-activity" id="chooseActivityUrl"/> + +<s:form> + <s:textfield key="articleBarcode" label="Article" inputAppendIcon="barcode" cssClass="input-medium" /> + + <s:select label="Magasin destination" + key="destinationWarehouseId" + list="destinationWarehouses" + listKey="id" + listValue="code" + required="true" + /> + + <s:if test="askQuantity"> + <s:textfield name="quantity" label="Qté" inputAppend="%{article.unit}" cssClass="input-mini" /> + </s:if> + + <div class="btn-group"> + <s:a href="%{chooseActivityUrl}" cssClass="btn" id="chooseActivityLink" >Changer d'activité (Esc)</s:a> + <s:submit name="next" value="Suivant" cssClass="btn btn-primary" /> + </div> +</s:form> \ No newline at end of file Added: trunk/magalie-web/src/main/webapp/WEB-INF/content/simple-withdraw-item-input.jsp =================================================================== --- trunk/magalie-web/src/main/webapp/WEB-INF/content/simple-withdraw-item-input.jsp (rev 0) +++ trunk/magalie-web/src/main/webapp/WEB-INF/content/simple-withdraw-item-input.jsp 2013-05-29 12:54:54 UTC (rev 211) @@ -0,0 +1,33 @@ +<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<head> + <title>Prélèvement immédiat</title> + <link rel="stylesheet" href="<s:url value='/css/magalie-ck3x-reduced.css' />"/> +</head> + +<s:url namespace="/" action="choose-activity" id="cancelUrl" /> + +<s:form> + + <ul> + + <s:iterator value="simpleWithdrawItemTask.storedArticles"> + + <li><s:property value="location.barcode" /></li> + </s:iterator> + + </ul> + + <s:textfield key="originLocationBarcode" label="Emplacement prélevé" inputAppendIcon="barcode" cssClass="input-medium" /> + + <s:hidden name="destinationWarehouseId" value="%{destinationWarehouseId}" /> + + <s:hidden name="articleBarcode" value="%{articleBarcode}" /> + + <div class="btn-group"> + <s:a href="%{cancelUrl}" cssClass="btn" id="CancelLink" >Quitter (Esc)</s:a> + <s:submit name="" value="Valider" cssClass="btn btn-primary" /> + </div> + +</s:form>