diff --git a/posterita/src/main/org/posterita/struts/login/GoToHomePageAction.java b/posterita/src/main/org/posterita/struts/login/GoToHomePageAction.java index fd291638d3..8c4cd0fbde 100644 --- a/posterita/src/main/org/posterita/struts/login/GoToHomePageAction.java +++ b/posterita/src/main/org/posterita/struts/login/GoToHomePageAction.java @@ -30,10 +30,12 @@ import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; +import org.compiere.model.MStore; import org.compiere.util.Env; import org.posterita.Constants; import org.posterita.beans.ApplicationParametersBean; import org.posterita.businesslogic.ApplicationManager; +import org.posterita.businesslogic.StoreManager; import org.posterita.core.TmkJSPEnv; import org.posterita.exceptions.DefaultStoreException; import org.posterita.lib.UdiConstants; @@ -51,10 +53,11 @@ public class GoToHomePageAction extends BaseDispatchAction try { - ApplicationManager.changeApplication(request, response); - - Properties ctx = TmkJSPEnv.getCtx(request); - String forward = Env.getContext(ctx, UdiConstants.WEBPARAM6); + Properties ctx = Env.getCtx(); + MStore store = StoreManager.getDefaultStore(ctx); + ApplicationManager.setApplicationParametersInContext(ctx, store.get_ID()); + ctx = TmkJSPEnv.getCtx(request); + String forward = Env.getContext(ctx, UdiConstants.DEFAULT_FORWARD); return mapping.findForward(forward); } @@ -65,39 +68,38 @@ public class GoToHomePageAction extends BaseDispatchAction } } - public static final String LICENSE_INVALID = "clientLicensing"; public static final String CHOOSE_APPLICATION = "chooseApplication"; public ActionForward setApplicationParameters(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { DefaultForm df = (DefaultForm) form; ApplicationParametersBean bean = (ApplicationParametersBean) df.getBean(); - String appName = bean.getApplicationName(); + Integer storeId = bean.getStoreId(); - try + // Store not defined, should go to default store or choose from different stores + if (storeId == null) { - ApplicationManager.changeApplication(request, response, appName); - - Properties ctx = TmkJSPEnv.getCtx(request); - String defaultAppName = ApplicationManager.getApplicationType(ctx).toUpperCase(); - - String displayAppName = ApplicationManager.getApplicationName(bean.getApplicationName()); - - request.getSession().getServletContext().setAttribute(Constants.APP_NAME,displayAppName); - - ApplicationManager.setApplicationNameInCookie(response, appName); - - String forward = Env.getContext(ctx, UdiConstants.WEBPARAM6); - - - - return mapping.findForward(forward); + return goToHomePage(mapping, form, request, response); } - catch(DefaultStoreException ex) + + Properties ctx = Env.getCtx(); + + MStore store = new MStore(ctx, storeId, null); + + if (store.get_ID() == 0) { - postGlobalError("error.store.default", ex.getMessage(), request); - return mapping.findForward(CHOOSE_APPLICATION); + //TODO: Add error message showing no store error to user + mapping.findForward(CHOOSE_APPLICATION); } + + + ApplicationManager.setApplicationParametersInContext(ctx, storeId); + + ctx = TmkJSPEnv.getCtx(request); + + request.getSession().getServletContext().setAttribute(Constants.APP_NAME, bean.getApplicationName()); + + return mapping.findForward(UdiConstants.DEFAULT_FORWARD); } public static final String INIT_CHOOSE_APPLICATION = "initChooseApplication"; diff --git a/posterita/src/main/org/posterita/struts/login/LoginAction.java b/posterita/src/main/org/posterita/struts/login/LoginAction.java index 5f4a4d7b41..08c908cf61 100644 --- a/posterita/src/main/org/posterita/struts/login/LoginAction.java +++ b/posterita/src/main/org/posterita/struts/login/LoginAction.java @@ -35,7 +35,7 @@ import org.apache.struts.action.ActionMapping; import org.apache.struts.util.MessageResources; import org.compiere.model.MSession; import org.compiere.model.MUser; -import org.compiere.model.X_U_Menu; +import org.compiere.model.X_U_WebMenu; import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.WebUser; @@ -60,7 +60,7 @@ import org.posterita.exceptions.UserInactiveException; import org.posterita.exceptions.UserNotFoundException; import org.posterita.exceptions.WrongPasswordException; import org.posterita.lib.UdiConstants; -import org.posterita.model.UDIU_Menu; +import org.posterita.model.U_WebMenu; import org.posterita.struts.core.BaseDispatchAction; import org.posterita.struts.core.DefaultForm; import org.posterita.user.WebUserInfo; @@ -104,11 +104,11 @@ public class LoginAction extends BaseDispatchAction if(userId != null) { - X_U_Menu xmenu = new X_U_Menu(ctx,0,null); + X_U_WebMenu xmenu = new X_U_WebMenu(ctx,0,null); xmenu.setName("Switch User"); xmenu.setMenuLink("LoginUserAction.do?action=loginUser&userId=" + userId); - UDIU_Menu menu = new UDIU_Menu(xmenu); + U_WebMenu menu = new U_WebMenu(xmenu); //MenuItem menuItem = new MenuItem(menu); leftMenusList.add(new MenuItem(menu)); } @@ -165,7 +165,8 @@ public class LoginAction extends BaseDispatchAction WebUserInfo wuInfo = (WebUserInfo)session.getAttribute(WebUserInfo.NAME); - String appName = ApplicationManager.getApplicationType(ctx); + int storeId = Env.getContextAsInt(TmkJSPEnv.getCtx(request), UdiConstants.WSTORE_CTX_PARAM); + if (wuInfo != null) { WebUser wu = wuInfo.getUser(); @@ -173,21 +174,16 @@ public class LoginAction extends BaseDispatchAction wu.logout(); session.removeAttribute(WebUserInfo.NAME); + session.setMaxInactiveInterval(0); } - - - if(appName.endsWith(Constants.APP_POS)) - session.setMaxInactiveInterval(0); - try { - ApplicationManager.changeApplication(request, response); + ctx = Env.getCtx(); + ApplicationManager.setApplicationParametersInContext(ctx, storeId); ctx = TmkJSPEnv.getCtx(request); - String forward = Env.getContext(ctx, UdiConstants.WEBPARAM6); - - return mapping.findForward(forward); + return mapping.findForward(UdiConstants.DEFAULT_FORWARD); } catch(Exception ex) { @@ -250,48 +246,36 @@ public class LoginAction extends BaseDispatchAction return (mapping.getInputForward()); } + String strPosId = POSManager.getPOSIDFromCookie(request); + boolean isValidPOSId = false; + + if(strPosId != null) + { + try + { + int posId = Integer.parseInt(strPosId); + isValidPOSId = POSManager.isPOSTerminalPresent(ctx, posId); + } + catch(Exception ex) + {} + } - String applicationName = ApplicationManager.getApplicationType(ctx); - - if(applicationName.endsWith(Constants.APP_POS)) - { - String strPosId = POSManager.getPOSIDFromCookie(request); + if(!isValidPOSId) + { + ArrayList list=POSManager.getAllPOSIDs(ctx); + request.getSession().setAttribute(Constants.POSIDS,list); + return mapping.findForward(CHOOSEPOS); - - boolean isValidPOSId = false; - - if(strPosId != null) - { - try - { - int posId = Integer.parseInt(strPosId); - isValidPOSId = POSManager.isPOSTerminalPresent(ctx, posId); - } - catch(Exception ex) - {} - } - - - if(!isValidPOSId) - { - ArrayList list=POSManager.getAllPOSIDs(ctx); - request.getSession().setAttribute(Constants.POSIDS,list); - return mapping.findForward(CHOOSEPOS); - - } - else - { - SessionStorage.putPOSID(ctx,strPosId,request); - String currSymboleSales = POSTerminalManager.getPOSDefaultSellCurrency(ctx).getCurSymbol(); - String currSymbolePurchase=POSTerminalManager.getPOSDefaultPurchaseCurrency(ctx).getCurSymbol(); - request.getSession().setAttribute(Constants.CURRENCY_SYMBOLE,currSymboleSales); - request.getSession().setAttribute(Constants.CURRENCY_SYMBOLE_PURCHASE,currSymbolePurchase); - return mapping.findForward(CREATEPOSORDER); - } - - } - - return mapping.findForward(SUCCESS); + } + else + { + SessionStorage.putPOSID(ctx,strPosId,request); + String currSymboleSales = POSTerminalManager.getPOSDefaultSellCurrency(ctx).getCurSymbol(); + String currSymbolePurchase=POSTerminalManager.getPOSDefaultPurchaseCurrency(ctx).getCurSymbol(); + request.getSession().setAttribute(Constants.CURRENCY_SYMBOLE,currSymboleSales); + request.getSession().setAttribute(Constants.CURRENCY_SYMBOLE_PURCHASE,currSymbolePurchase); + return mapping.findForward(CREATEPOSORDER); + } } public ActionForward password(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception diff --git a/posterita/src/main/org/posterita/struts/login/POSLoginAction.java b/posterita/src/main/org/posterita/struts/login/POSLoginAction.java index 317c4aeb8b..434bb5b876 100644 --- a/posterita/src/main/org/posterita/struts/login/POSLoginAction.java +++ b/posterita/src/main/org/posterita/struts/login/POSLoginAction.java @@ -128,50 +128,37 @@ public class POSLoginAction extends BaseDispatchAction } - String applicationName = ApplicationManager.getApplicationType(ctx); - if(applicationName.endsWith(Constants.APP_POS)) + String strPosId = POSManager.getPOSIDFromCookie(request); + boolean isValidPOSId = false; + + if(strPosId != null) { - String strPosId = POSManager.getPOSIDFromCookie(request); - - - boolean isValidPOSId = false; - - if(strPosId != null) + try { - try - { - int posId = Integer.parseInt(strPosId); - isValidPOSId = POSManager.isPOSTerminalPresent(ctx, posId); - } - catch(Exception ex) - {} + int posId = Integer.parseInt(strPosId); + isValidPOSId = POSManager.isPOSTerminalPresent(ctx, posId); } - - - if(!isValidPOSId) - { - ArrayList list=POSManager.getAllPOSIDs(ctx); - request.getSession().setAttribute(Constants.POSIDS,list); - return mapping.findForward(CHOOSEPOS); - - } - else - { - SessionStorage.putPOSID(ctx,strPosId,request); - String currSymboleSales = POSTerminalManager.getPOSDefaultSellCurrency(ctx).getCurSymbol(); - String currSymbolePurchase=POSTerminalManager.getPOSDefaultPurchaseCurrency(ctx).getCurSymbol(); - request.getSession().setAttribute(Constants.CURRENCY_SYMBOLE,currSymboleSales); - request.getSession().setAttribute(Constants.CURRENCY_SYMBOLE_PURCHASE,currSymbolePurchase); - return mapping.findForward(CREATEPOSORDER); - } - + catch(Exception ex) + {} } - SessionStorage.putOrg(ctx, request); - SessionStorage.putWebstoreUser(ctx, request, info.getUser().getAD_User_ID()); - - return mapping.findForward(SUCCESS); + if(!isValidPOSId) + { + ArrayList list=POSManager.getAllPOSIDs(ctx); + request.getSession().setAttribute(Constants.POSIDS,list); + return mapping.findForward(CHOOSEPOS); + + } + else + { + SessionStorage.putPOSID(ctx,strPosId,request); + String currSymboleSales = POSTerminalManager.getPOSDefaultSellCurrency(ctx).getCurSymbol(); + String currSymbolePurchase=POSTerminalManager.getPOSDefaultPurchaseCurrency(ctx).getCurSymbol(); + request.getSession().setAttribute(Constants.CURRENCY_SYMBOLE,currSymboleSales); + request.getSession().setAttribute(Constants.CURRENCY_SYMBOLE_PURCHASE,currSymbolePurchase); + return mapping.findForward(CREATEPOSORDER); + } } } diff --git a/posterita/src/main/org/posterita/struts/menu/MenuAction.java b/posterita/src/main/org/posterita/struts/menu/MenuAction.java index e1312eb6ff..57e874f079 100644 --- a/posterita/src/main/org/posterita/struts/menu/MenuAction.java +++ b/posterita/src/main/org/posterita/struts/menu/MenuAction.java @@ -75,29 +75,11 @@ public class MenuAction extends BaseDispatchAction if(rootMenuItem == null) { - try - { - ApplicationManager.changeApplication(request, response); - - ctx = TmkJSPEnv.getCtx(request); - String forward = Env.getContext(ctx, UdiConstants.WEBPARAM6); - - return mapping.findForward(forward); - } - catch(DefaultStoreException ex) - { - postGlobalError("error.store.default", ex.getMessage(), request); - return mapping.findForward(CHOOSE_APPLICATION); - } - catch(Exception ex) - { - return mapping.findForward(APPLICATION_ERROR); - } + //TODO: Display error message or should kick to right store + mapping.findForward(CHOOSE_APPLICATION); } ArrayList subMenus = new ArrayList(); - String applicationName = ApplicationManager.getApplicationType(ctx).toUpperCase(); - if(bean.getMenuId()==null) { UDIPO udiPO = POSMenuFactory.getFactoryInstance(ctx).get(ctx, POSMenuFactory.PMENU_SALES_ID); @@ -109,67 +91,109 @@ public class MenuAction extends BaseDispatchAction subMenus = rootMenuItem.getSubMenus(bean.getMenuId().intValue()); } + //subgrouping menus + ArrayList menuItems = subMenus; + HashMap> categoryMap = new HashMap>(); - - if (applicationName.equalsIgnoreCase("POS")) - { - //subgrouping menus - ArrayList menuItems = subMenus; - HashMap> categoryMap = new HashMap>(); - - StringWriter sw = new StringWriter(); - PrintWriter out = new PrintWriter(sw); - ElementBean elementBean = null; + StringWriter sw = new StringWriter(); + PrintWriter out = new PrintWriter(sw); + ElementBean elementBean = null; + + String category = ""; + ArrayList list = null; + ArrayList categories = new ArrayList(); + + //group menus + for(MenuItem menuItem : menuItems) + { + category = menuItem.getCategory(); + category = (category==null)? "" : category; - String category = ""; - ArrayList list = null; - ArrayList categories = new ArrayList(); - - //group menus - for(MenuItem menuItem : menuItems) - { - category = menuItem.getCategory(); - category = (category==null)? "" : category; - - if(!categories.contains(category)) - { - categories.add(category); - } - - list = categoryMap.get(category); - - if(list==null) - { - list = new ArrayList(); - } - - list.add(menuItem); - categoryMap.put(category,list); - - } - - //display groups - - Iterator iter = categories.iterator(); - - out.print(""); - while(iter.hasNext()) - { - out.print(""); } - return mapping.findForward(GET_MENU_ITEMS); + out.print("
"); - //---------------------------------------------------------------------------------------------------------------------- - - category = iter.next(); + if(!categories.contains(category)) + { + categories.add(category); + } + + list = categoryMap.get(category); + + if(list==null) + { + list = new ArrayList(); + } + + list.add(menuItem); + categoryMap.put(category,list); + + } + + //display groups + + Iterator iter = categories.iterator(); + + out.print(""); + while(iter.hasNext()) + { + out.print(""); - } - - out.print("
"); + //---------------------------------------------------------------------------------------------------------------------- + + category = iter.next(); + list = categoryMap.get(category); + + if((category != null)&&(category.length() != 0)) + { + out.print("
"); + out.print(""); + + elementBean = ElementManager.getMsg(ctx,category); + out.print(elementBean.getName()); + + out.print(""); + }//if + + out.print(""); + + if((category != null)&&(category.length() != 0)) + { + out.print("
"); + }//if + + //---------------------------------------------------------------------------------------------------------------------- + out.print("
"); + + if(!iter.hasNext()) + { + out.print(" "); + } + else + { + //---------------------------------------------------------------------------------------------------------------------- + + category = iter.next(); list = categoryMap.get(category); if((category != null)&&(category.length() != 0)) { out.print("
"); out.print(""); - - elementBean = ElementManager.getMsg(ctx,category); - out.print(elementBean.getName()); - - out.print(""); + + elementBean = ElementManager.getMsg(ctx,category); + out.print(elementBean.getName()); + + out.print(""); }//if out.print("
"); - if(!iter.hasNext()) - { - out.print(" "); - } - else - { - //---------------------------------------------------------------------------------------------------------------------- - - category = iter.next(); - list = categoryMap.get(category); - - if((category != null)&&(category.length() != 0)) - { - out.print("
"); - out.print(""); - - elementBean = ElementManager.getMsg(ctx,category); - out.print(elementBean.getName()); - - out.print(""); - }//if - - out.print(""); - - if((category != null)&&(category.length() != 0)) - { - out.print("
"); - }//if - - //---------------------------------------------------------------------------------------------------------------------- - - } - out.print("
"); - out.flush(); - - String menu = sw.toString(); - - request.getSession().setAttribute(Constants.MENU_ITEMS, menu); - return mapping.findForward(GET_POS_MENU_ITEMS); + } + out.print("
"); + out.flush(); + + String menu = sw.toString(); + + request.getSession().setAttribute(Constants.MENU_ITEMS, menu); + return mapping.findForward(GET_POS_MENU_ITEMS); } public static final String INIT_EDIT_LINKSTATUS = "initEditLinkStatus"; diff --git a/posterita/src/main/org/posterita/struts/product/PriceListAction.java b/posterita/src/main/org/posterita/struts/product/PriceListAction.java deleted file mode 100644 index 5ce08ecc70..0000000000 --- a/posterita/src/main/org/posterita/struts/product/PriceListAction.java +++ /dev/null @@ -1,241 +0,0 @@ -/** - * Product: Posterita Web-Based POS and Adempiere Plugin - * Copyright (C) 2007 Posterita Ltd - * This file is part of POSterita - * - * POSterita is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 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 General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * Created on Aug 19, 2005 by praveen - * - */ -package org.posterita.struts.product; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Properties; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts.action.ActionForm; -import org.apache.struts.action.ActionForward; -import org.apache.struts.action.ActionMapping; -import org.compiere.util.Env; -import org.compiere.util.Trx; -import org.posterita.Constants; -import org.posterita.beans.EditPriceBean; -import org.posterita.beans.PriceListBean; -import org.posterita.beans.ProductBean; -import org.posterita.beans.ProductPriceBean; -import org.posterita.businesslogic.ApplicationManager; -import org.posterita.businesslogic.PriceListManager; -import org.posterita.core.TrxPrefix; -import org.posterita.exceptions.ApplicationException; -import org.posterita.exceptions.OperationException; -import org.posterita.exceptions.SystemException; -import org.posterita.form.PriceListForm; -import org.posterita.lib.UdiConstants; -import org.posterita.struts.core.BaseDispatchAction; -import org.posterita.struts.core.DefaultForm; - -public class PriceListAction extends BaseDispatchAction -{ - public static final String INIT_PRICE_LIST = "initPriceList"; - private Properties webstoreCtx = new Properties(); - - - private Properties getWebstoreContext(HttpServletRequest request) - { - ApplicationManager.setApplicationParametersInContext(webstoreCtx, "webstore"); - - return webstoreCtx; - } - - - public static final String INIT_WEBSTORE_PRICE_LIST = "initWebstorePriceList"; - public ActionForward initWebstorePriceList(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) throws Exception - { - ActionForward fwd = init(mapping, form, request, response); - - if(fwd!=null) - return fwd; - - webstoreCtx = getWebstoreContext(request); - - DefaultForm df = (DefaultForm) form; - ProductBean bean = (ProductBean) df.getBean(); - - df.setIsWebstoreFeatured("true"); - - int priceListId = Env.getContextAsInt(webstoreCtx, UdiConstants.PRICELIST_CTX_PARAM); - int priceListVersionId = PriceListManager.getPriceListVersionID(webstoreCtx, priceListId, null); - - ArrayList productPriceList = new ArrayList (); - - //if (bean.getSearchText() != null) - productPriceList = PriceListManager.getProductPriceList(webstoreCtx, priceListVersionId, bean.getSearchText(), bean.getIsSelfService(), bean.getProductClassification()); - - request.getSession().setAttribute(Constants.PRICE_LIST, productPriceList); - - return mapping.findForward(INIT_WEBSTORE_PRICE_LIST); - } - - - - - - public static final String INIT_EDIT_PRICE_LIST = "initEditPriceList"; - - public ActionForward initEditPriceList(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) throws Exception - { - ActionForward fwd = init(mapping, form, request, response); - - if(fwd!=null) - return fwd; - - DefaultForm df = (DefaultForm) form; - - PriceListBean bean = (PriceListBean) df.getBean(); - - request.getSession().setAttribute(Constants.PRODUCT_IDS, bean.getProductIds()); - - return mapping.findForward(INIT_EDIT_PRICE_LIST); - } - - public static final String INIT_EDIT_WSTORE_PRICE_LIST = "initWebstoreEditPriceList"; - public ActionForward initWebstoreEditPriceList(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) throws OperationException, ApplicationException - { - ActionForward fwd = init(mapping, form, request, response); - - if(fwd!=null) - return fwd; - - DefaultForm df = (DefaultForm) form; - - PriceListBean bean = (PriceListBean) df.getBean(); - - if(bean.getProductIds() == null || bean.getProductIds().length == 0) - { - postGlobalError("error.product.not.selected", request); - return mapping.getInputForward(); - } - - request.getSession().setAttribute(Constants.PRODUCT_IDS, bean.getProductIds()); - - return mapping.findForward(INIT_EDIT_WSTORE_PRICE_LIST); - } - - - public static final String EDIT_PRICE_LIST = "editPriceList"; - public ActionForward editPriceLists(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) throws ApplicationException, OperationException, SystemException - { - ActionForward fwd = init(mapping, form, request, response); - - if(fwd!=null) - return fwd; - - webstoreCtx = getWebstoreContext(request); - - DefaultForm df = (DefaultForm) form; - - EditPriceBean bean = (EditPriceBean) df.getBean(); - - BigDecimal priceEntered = new BigDecimal(bean.getPrice().toString()); - - Integer productIds[] = (Integer[]) request.getSession().getAttribute(Constants.PRODUCT_IDS); - Integer priceListVersionId = (Integer) request.getSession().getAttribute(Constants.PRICE_LIST_VERSION_ID); - - Trx trx = Trx.get(TrxPrefix.getPrefix(), true); - - try - { - trx.start(); - PriceListManager.editProductPrices(webstoreCtx,productIds, priceListVersionId.intValue(), priceEntered, trx.getTrxName()); - trx.commit(); - } - catch (OperationException e) - { - trx.rollback(); - throw e; - } - catch (SystemException e) - { - trx.rollback(); - throw e; - } - finally - { - trx.close(); - } - - PriceListForm plf = (PriceListForm) getForm(Constants.PriceListForm, Constants.InitPriceListAction, request); - - PriceListBean plBean = new PriceListBean(); - plBean.setPriceListVersionId(priceListVersionId); - plf.populate(plBean); - - return mapping.findForward(EDIT_PRICE_LIST); - } - - public static final String EDIT_WEBSTORE_PRICELIST = "editWebstorePriceList"; - public ActionForward editWebstorePriceList(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) throws OperationException, ApplicationException, SystemException - { - ActionForward fwd = init(mapping, form, request, response); - - if(fwd!=null) - return fwd; - - webstoreCtx = getWebstoreContext(request); - - DefaultForm df = (DefaultForm) form; - - EditPriceBean bean = (EditPriceBean) df.getBean(); - - Integer productIds[] = (Integer[])request.getSession().getAttribute(Constants.PRODUCT_IDS); - - int priceListId = Env.getContextAsInt(webstoreCtx, UdiConstants.PRICELIST_CTX_PARAM); - int priceListVersionId = PriceListManager.getPriceListVersionID(webstoreCtx, priceListId, null); - - BigDecimal priceEntered = new BigDecimal(bean.getPrice().toString()); - - Trx trx = Trx.get(TrxPrefix.getPrefix(), true); - - try - { - trx.start(); - PriceListManager.editProductPrices(webstoreCtx,productIds, priceListVersionId, priceEntered, trx.getTrxName()); - trx.commit(); - } - catch (OperationException e) - { - trx.rollback(); - throw e; - } - catch (SystemException e) - { - trx.rollback(); - throw e; - } - finally - { - trx.close(); - } - - - return mapping.findForward(EDIT_WEBSTORE_PRICELIST); - } - - - -} diff --git a/posterita/src/web/jsp/client/createClient.jsp b/posterita/src/web/jsp/client/createClient.jsp index 13bc5eb49b..8a8f480fd5 100644 --- a/posterita/src/web/jsp/client/createClient.jsp +++ b/posterita/src/web/jsp/client/createClient.jsp @@ -31,7 +31,7 @@ - POSterita + POSterita:. Create Client @@ -80,7 +80,7 @@ - + <%@ include file="/jsp/include/errors.jsp" %> @@ -164,7 +164,15 @@ -
-   +
+ Accounting + + + + + +
Load Accounting Values
+
@@ -172,8 +180,7 @@
- +