Initial commit of Posterita
This commit is contained in:
parent
6d94375d22
commit
6699c75ed8
|
@ -0,0 +1,241 @@
|
||||||
|
/**
|
||||||
|
* 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 Jul 11, 2005 by vishee
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.posterita.factory;
|
||||||
|
|
||||||
|
import java.lang.reflect.Constructor;
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Properties;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.compiere.model.PO;
|
||||||
|
import org.compiere.util.Env;
|
||||||
|
|
||||||
|
import org.posterita.businesslogic.ClientManager;
|
||||||
|
import org.posterita.core.FactoryPropertiesManager;
|
||||||
|
import org.posterita.exceptions.OperationException;
|
||||||
|
import org.posterita.exceptions.ReloadFactoryException;
|
||||||
|
import org.posterita.lib.UdiConstants;
|
||||||
|
import org.posterita.model.UDIPO;
|
||||||
|
|
||||||
|
public abstract class AbstractFactory
|
||||||
|
{
|
||||||
|
private static final String KEY_SEPARATOR = "_";
|
||||||
|
protected HashMap<String, UDIPO> map;
|
||||||
|
protected static int[] clients;
|
||||||
|
|
||||||
|
public static final String MENU_POSITION_TOP = "TOP";
|
||||||
|
public static final String MENU_POSITION_LEFT = "LEFT";
|
||||||
|
public static final String MENU_POSITION_RIGHT = "RIGHT";
|
||||||
|
public static final String MENU_POSITION_DOWN = "DOWN";
|
||||||
|
|
||||||
|
|
||||||
|
static
|
||||||
|
{
|
||||||
|
clients = ClientManager.getAvailableClientIds();
|
||||||
|
}
|
||||||
|
|
||||||
|
WebProperties pm = FactoryPropertiesManager.getProperty();
|
||||||
|
|
||||||
|
protected void initFactory(Properties ctx, AbstractFactory factory) throws OperationException
|
||||||
|
{
|
||||||
|
clients = ClientManager.getAvailableClientIds();
|
||||||
|
if (Env.getAD_Client_ID(ctx) == 0) //--> Client Independent PO
|
||||||
|
{
|
||||||
|
if (factory == null)
|
||||||
|
{
|
||||||
|
loadFactory(ctx);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
loadFactory(ctx, factory);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Catering for multiple clients. All clients should have factory objects loaded.
|
||||||
|
for (int i = 0; i < clients.length; i++)
|
||||||
|
{
|
||||||
|
Properties nCtx = getCtxClone(ctx, clients[i]);
|
||||||
|
if (factory == null)
|
||||||
|
{
|
||||||
|
loadFactory(nCtx);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
loadFactory(nCtx, factory);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract void loadFactory(Properties ctx) throws OperationException;
|
||||||
|
|
||||||
|
protected abstract void loadFactory(Properties ctx, AbstractFactory factory) throws OperationException;
|
||||||
|
|
||||||
|
public static void reloadFactory(Properties ctx) throws ReloadFactoryException
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*private static Properties getCtxClone(Properties ctx)
|
||||||
|
{
|
||||||
|
return getCtxClone(ctx, Env.getAD_Client_ID(ctx));
|
||||||
|
}*/
|
||||||
|
|
||||||
|
private static Properties getCtxClone(Properties ctx, int adClientId)
|
||||||
|
{
|
||||||
|
Properties nCtx = (Properties)ctx.clone();
|
||||||
|
Env.setContext(nCtx, UdiConstants.CLIENT_ID_CTX_PARAM, adClientId);
|
||||||
|
Env.setContext(nCtx, UdiConstants.ORG_ID_CTX_PARAM, 0);
|
||||||
|
Env.setContext(nCtx, UdiConstants.USER_ORG_CTX_PARAM, 0);
|
||||||
|
Env.setContext(nCtx, UdiConstants.USER_ID_CTX_PARAM, 100);
|
||||||
|
return nCtx;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void add(Properties ctx, String key, UDIPO po) throws OperationException
|
||||||
|
{
|
||||||
|
if (map == null)
|
||||||
|
{
|
||||||
|
map = new HashMap<String, UDIPO>();
|
||||||
|
}
|
||||||
|
|
||||||
|
String idStr = pm.get(ctx, key);
|
||||||
|
|
||||||
|
if (idStr == null)
|
||||||
|
{
|
||||||
|
po.save(); // UDIPO
|
||||||
|
pm.put(ctx, key, ""+po.getID());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Class cl;
|
||||||
|
Class params[];
|
||||||
|
Constructor constructor;
|
||||||
|
Object[] args;
|
||||||
|
PO loadedPO;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
cl = Class.forName(po.getPO().getClass().getName());
|
||||||
|
params = new Class[]{Properties.class, int.class, String.class};
|
||||||
|
|
||||||
|
constructor = cl.getConstructor(params);
|
||||||
|
args = new Object[]{ctx,Integer.valueOf(idStr),null};
|
||||||
|
loadedPO = (PO) constructor.newInstance(args);
|
||||||
|
setFields(ctx, po.getPO(), loadedPO);
|
||||||
|
loadedPO.save();
|
||||||
|
}
|
||||||
|
catch (ClassNotFoundException e)
|
||||||
|
{
|
||||||
|
throw new OperationException(e.getMessage());
|
||||||
|
}
|
||||||
|
catch (SecurityException e)
|
||||||
|
{
|
||||||
|
throw new OperationException(e.getMessage());
|
||||||
|
}
|
||||||
|
catch (NoSuchMethodException e)
|
||||||
|
{
|
||||||
|
throw new OperationException(e.getMessage());
|
||||||
|
}
|
||||||
|
catch (IllegalArgumentException e)
|
||||||
|
{
|
||||||
|
throw new OperationException(e.getMessage());
|
||||||
|
}
|
||||||
|
catch (InstantiationException e)
|
||||||
|
{
|
||||||
|
throw new OperationException(e.getMessage());
|
||||||
|
}
|
||||||
|
catch (IllegalAccessException e)
|
||||||
|
{
|
||||||
|
throw new OperationException(e.getMessage());
|
||||||
|
}
|
||||||
|
catch (InvocationTargetException e)
|
||||||
|
{
|
||||||
|
throw new OperationException(e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (loadedPO == null || loadedPO.get_ID() == 0)
|
||||||
|
{
|
||||||
|
po.save();
|
||||||
|
pm.put(ctx, key, ""+po.getID());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
po.setPO(loadedPO);
|
||||||
|
}
|
||||||
|
|
||||||
|
put(ctx, key, po);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void put(Properties ctx, String key, UDIPO po)
|
||||||
|
{
|
||||||
|
int adClientId = Env.getAD_Client_ID(ctx);
|
||||||
|
String nKey = key + KEY_SEPARATOR + String.valueOf(adClientId);
|
||||||
|
map.put(nKey, po);
|
||||||
|
}
|
||||||
|
|
||||||
|
public UDIPO get(Properties ctx, String key) throws OperationException
|
||||||
|
{
|
||||||
|
if (map == null)
|
||||||
|
{
|
||||||
|
initFactory(ctx, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
int adClientId = Env.getAD_Client_ID(ctx);
|
||||||
|
String nKey = key + KEY_SEPARATOR + String.valueOf(adClientId);
|
||||||
|
UDIPO retPO = map.get(nKey);
|
||||||
|
|
||||||
|
if (retPO == null)
|
||||||
|
throw new OperationException("Could not get PO with key: " + key);
|
||||||
|
|
||||||
|
return retPO;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setFields(Properties ctx, PO fromPO, PO toPO) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getAllKeys(Properties ctx) throws OperationException
|
||||||
|
{
|
||||||
|
if (map == null)
|
||||||
|
loadFactory(ctx);
|
||||||
|
|
||||||
|
Set keySet = map.keySet();
|
||||||
|
|
||||||
|
ArrayList<String> keyList = new ArrayList<String>();
|
||||||
|
|
||||||
|
for(Object objKey : keySet)
|
||||||
|
{
|
||||||
|
String key = (String)objKey;
|
||||||
|
int ind = key.lastIndexOf(KEY_SEPARATOR);
|
||||||
|
if(ind > 0)
|
||||||
|
{
|
||||||
|
key = key.substring(0, ind);
|
||||||
|
}
|
||||||
|
keyList.add(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
return keyList;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,88 @@
|
||||||
|
/**
|
||||||
|
* 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 12-Oct-2005
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.factory;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.compiere.util.Env;
|
||||||
|
|
||||||
|
import org.posterita.exceptions.OperationException;
|
||||||
|
import org.posterita.model.MWebProperties;
|
||||||
|
|
||||||
|
|
||||||
|
public class DBPropertiesManager implements WebProperties
|
||||||
|
{
|
||||||
|
|
||||||
|
public void put(Properties ctx, String key, String value)
|
||||||
|
{
|
||||||
|
int [] propertieIds = MWebProperties.getAllIDs(MWebProperties.Table_Name," U_KEY='"+key+"' and AD_CLIENT_ID = "+Env.getAD_Client_ID(ctx),null);
|
||||||
|
|
||||||
|
if(propertieIds.length==0)
|
||||||
|
{
|
||||||
|
MWebProperties webProperties = new MWebProperties(ctx,0,null);
|
||||||
|
webProperties.setU_Key(key);
|
||||||
|
webProperties.setU_Value(value);
|
||||||
|
webProperties.save();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MWebProperties webProperties = new MWebProperties(ctx,propertieIds[0],null);
|
||||||
|
webProperties.setU_Value(value);
|
||||||
|
webProperties.save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String get(Properties ctx, String key) throws OperationException
|
||||||
|
{
|
||||||
|
|
||||||
|
int [] values;
|
||||||
|
|
||||||
|
values = MWebProperties.getAllIDs(MWebProperties.Table_Name,"u_key ='"+key+"' and AD_CLIENT_ID = "+Env.getAD_Client_ID(ctx),null);
|
||||||
|
|
||||||
|
if (values.length == 0)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
MWebProperties webProperties = new MWebProperties(ctx,values[0],null);
|
||||||
|
|
||||||
|
return webProperties.getU_Value();
|
||||||
|
}
|
||||||
|
|
||||||
|
// private boolean iskeyPresent(Properties ctx,String key)
|
||||||
|
// {
|
||||||
|
// boolean keyPresent = true;
|
||||||
|
// int [] propertieIds = MWebProperties.getAllIDs(MWebProperties.Table_Name," U_KEY='"+key+"' and AD_CLIENT_ID = "+Env.getAD_Client_ID(ctx),null);
|
||||||
|
//
|
||||||
|
// if(propertieIds.length==0)
|
||||||
|
// keyPresent = false;
|
||||||
|
//
|
||||||
|
// return keyPresent;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,86 @@
|
||||||
|
/**
|
||||||
|
* 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 Oct 30, 2006
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.factory;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.posterita.businesslogic.DunningManager;
|
||||||
|
import org.posterita.exceptions.OperationException;
|
||||||
|
import org.posterita.exceptions.ReloadFactoryException;
|
||||||
|
|
||||||
|
|
||||||
|
public class DunningFactory extends AbstractFactory
|
||||||
|
{
|
||||||
|
public static final String DUNNING_ID = "dunning.id";
|
||||||
|
public static final String DUNNING_NAME="Dunning";
|
||||||
|
public static final String DESCRIPTION="Include due an non-due invoices";
|
||||||
|
public static final String DUNNING_LEVEL_NAME="Statement";
|
||||||
|
public static final String PRINT_TEXT = "Statement ";
|
||||||
|
public static final String PRINT_NOTE="Please review your statement and submit due payments.";
|
||||||
|
|
||||||
|
|
||||||
|
private static DunningFactory singleton;
|
||||||
|
private DunningFactory() throws OperationException
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DunningFactory getFactoryInstance(Properties ctx) throws OperationException
|
||||||
|
{
|
||||||
|
if (singleton == null)
|
||||||
|
singleton = new DunningFactory();
|
||||||
|
|
||||||
|
Properties nCtx = (Properties)ctx.clone();
|
||||||
|
singleton.loadFactory(nCtx);
|
||||||
|
|
||||||
|
return singleton;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void loadFactory(Properties ctx) throws OperationException
|
||||||
|
{
|
||||||
|
loadFactory(ctx, singleton);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void loadFactory(Properties ctx, AbstractFactory factory) throws OperationException
|
||||||
|
{
|
||||||
|
factory.add(ctx,DUNNING_ID,
|
||||||
|
DunningManager.createDunningAndLevel
|
||||||
|
(ctx,DUNNING_NAME,DESCRIPTION,DUNNING_LEVEL_NAME,PRINT_TEXT,PRINT_NOTE,-9999));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void reloadFactory(Properties ctx) throws ReloadFactoryException
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
DunningFactory nFactory = new DunningFactory();
|
||||||
|
nFactory.initFactory(ctx, nFactory);
|
||||||
|
singleton = nFactory;
|
||||||
|
}
|
||||||
|
catch(OperationException ex)
|
||||||
|
{
|
||||||
|
throw new ReloadFactoryException("Could not reload DunningFactory", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,92 @@
|
||||||
|
/**
|
||||||
|
* 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 */ package org.posterita.factory;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.posterita.businesslogic.ProductAttributeManager;
|
||||||
|
import org.posterita.exceptions.OperationException;
|
||||||
|
import org.posterita.exceptions.ReloadFactoryException;
|
||||||
|
import org.posterita.model.UDIMAttribute;
|
||||||
|
import org.posterita.model.UDIMAttributeSet;
|
||||||
|
|
||||||
|
|
||||||
|
public class GenericProductAttributeFactory extends AbstractFactory
|
||||||
|
{
|
||||||
|
public static final String ATTRIBUTE_BRAND_ID = "attribute.brand.id";
|
||||||
|
public static final String ATTRIBUTE_DESIGN_ID = "attribute.design.id";
|
||||||
|
public static final String ATTRIBUTE_MODEL_ID = "attribute.model.id";
|
||||||
|
public static final String ATTRIBUTE_COLOUR_ID = "attribute.colour.id";
|
||||||
|
public static final String ATTRIBUTE_SIZE_ID = "attribute.size.id";
|
||||||
|
|
||||||
|
private static final String ATTRIBUTE_BRAND_NAME = "Brand";
|
||||||
|
private static final String ATTRIBUTE_DESIGN_NAME = "Design";
|
||||||
|
private static final String ATTRIBUTE_MODEL_NAME = "Model";
|
||||||
|
private static final String ATTRIBUTE_COLOUR_NAME = "Colour";
|
||||||
|
private static final String ATTRIBUTE_SIZE_NAME = "Size";
|
||||||
|
|
||||||
|
private static GenericProductAttributeFactory genericProductAttributeFactory;
|
||||||
|
private GenericProductAttributeFactory()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GenericProductAttributeFactory getFactoryInstance()
|
||||||
|
{
|
||||||
|
if (genericProductAttributeFactory == null)
|
||||||
|
genericProductAttributeFactory = new GenericProductAttributeFactory();
|
||||||
|
|
||||||
|
return genericProductAttributeFactory;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void loadFactory(Properties ctx) throws OperationException
|
||||||
|
{
|
||||||
|
loadFactory(ctx, genericProductAttributeFactory);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void loadFactory(Properties ctx, AbstractFactory factory) throws OperationException
|
||||||
|
{
|
||||||
|
factory.add(ctx, ATTRIBUTE_BRAND_ID, ProductAttributeManager.createAttribute(ctx, ATTRIBUTE_BRAND_NAME));
|
||||||
|
factory.add(ctx, ATTRIBUTE_DESIGN_ID, ProductAttributeManager.createAttribute(ctx, ATTRIBUTE_DESIGN_NAME));
|
||||||
|
factory.add(ctx, ATTRIBUTE_MODEL_ID, ProductAttributeManager.createAttribute(ctx, ATTRIBUTE_MODEL_NAME));
|
||||||
|
factory.add(ctx, ATTRIBUTE_COLOUR_ID, ProductAttributeManager.createAttribute(ctx,ATTRIBUTE_COLOUR_NAME));
|
||||||
|
factory.add(ctx, ATTRIBUTE_SIZE_ID, ProductAttributeManager.createAttribute(ctx, ATTRIBUTE_SIZE_NAME));
|
||||||
|
|
||||||
|
UDIMAttributeSet tshirtAttributeSet = (UDIMAttributeSet) GenericProductAttributeSetFactory.getFactoryInstance().get(ctx, GenericProductAttributeSetFactory.ATTRIBUTE_SET_TSHIRT_ID);
|
||||||
|
ProductAttributeManager.createAttributeUse(ctx, tshirtAttributeSet, (UDIMAttribute)factory.get(ctx, ATTRIBUTE_BRAND_ID));
|
||||||
|
ProductAttributeManager.createAttributeUse(ctx, tshirtAttributeSet, (UDIMAttribute)factory.get(ctx, ATTRIBUTE_DESIGN_ID));
|
||||||
|
ProductAttributeManager.createAttributeUse(ctx, tshirtAttributeSet, (UDIMAttribute)factory.get(ctx, ATTRIBUTE_MODEL_ID));
|
||||||
|
ProductAttributeManager.createAttributeUse(ctx, tshirtAttributeSet, (UDIMAttribute)factory.get(ctx, ATTRIBUTE_COLOUR_ID));
|
||||||
|
ProductAttributeManager.createAttributeUse(ctx, tshirtAttributeSet, (UDIMAttribute)factory.get(ctx, ATTRIBUTE_SIZE_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void reloadFactory(Properties ctx) throws ReloadFactoryException
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
GenericProductAttributeFactory nFactory = new GenericProductAttributeFactory();
|
||||||
|
nFactory.initFactory(ctx, nFactory);
|
||||||
|
genericProductAttributeFactory = nFactory;
|
||||||
|
}
|
||||||
|
catch(OperationException ex)
|
||||||
|
{
|
||||||
|
throw new ReloadFactoryException("Could not reload GenericProductAttributeFactory", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,70 @@
|
||||||
|
/**
|
||||||
|
* 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 */ package org.posterita.factory;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.posterita.businesslogic.ProductAttributeSetManager;
|
||||||
|
import org.posterita.exceptions.OperationException;
|
||||||
|
import org.posterita.exceptions.ReloadFactoryException;
|
||||||
|
|
||||||
|
|
||||||
|
public class GenericProductAttributeSetFactory extends AbstractFactory
|
||||||
|
{
|
||||||
|
private static GenericProductAttributeSetFactory genericProductAttributeSetFactory;
|
||||||
|
|
||||||
|
public static final String ATTRIBUTE_SET_TSHIRT_ID = "attributeset.tshirt.id";
|
||||||
|
private static final String ATTRIBUTE_SET_TSHIRT_NAME = "TShirt";
|
||||||
|
|
||||||
|
private GenericProductAttributeSetFactory()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GenericProductAttributeSetFactory getFactoryInstance()
|
||||||
|
{
|
||||||
|
if (genericProductAttributeSetFactory == null)
|
||||||
|
genericProductAttributeSetFactory = new GenericProductAttributeSetFactory();
|
||||||
|
|
||||||
|
return genericProductAttributeSetFactory;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void loadFactory(Properties ctx) throws OperationException
|
||||||
|
{
|
||||||
|
loadFactory(ctx, genericProductAttributeSetFactory);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void loadFactory(Properties ctx, AbstractFactory factory) throws OperationException
|
||||||
|
{
|
||||||
|
factory.add(ctx, ATTRIBUTE_SET_TSHIRT_ID, ProductAttributeSetManager.createAttributeSet(ctx, ATTRIBUTE_SET_TSHIRT_NAME));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void reloadFactory(Properties ctx) throws ReloadFactoryException
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
GenericProductAttributeSetFactory nFactory = new GenericProductAttributeSetFactory();
|
||||||
|
nFactory.initFactory(ctx, nFactory);
|
||||||
|
genericProductAttributeSetFactory = nFactory;
|
||||||
|
}
|
||||||
|
catch(OperationException ex)
|
||||||
|
{
|
||||||
|
throw new ReloadFactoryException("Could not reload GenericProductAttributeSetFactory", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,135 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
**/
|
||||||
|
package org.posterita.factory;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.compiere.model.MTax;
|
||||||
|
|
||||||
|
import org.posterita.core.SystemObjects;
|
||||||
|
import org.posterita.exceptions.OperationException;
|
||||||
|
import org.posterita.exceptions.ReloadFactoryException;
|
||||||
|
import org.posterita.lib.UdiConstants;
|
||||||
|
import org.posterita.model.UDIMAssetGroup;
|
||||||
|
import org.posterita.model.UDIMDiscountSchema;
|
||||||
|
import org.posterita.model.UDIMPriceList;
|
||||||
|
import org.posterita.model.UDIMPriceListVersion;
|
||||||
|
import org.posterita.model.UDIMProductCategory;
|
||||||
|
import org.posterita.model.UDIMTax;
|
||||||
|
import org.posterita.model.UDIMTaxCategory;
|
||||||
|
|
||||||
|
|
||||||
|
public class GenericSystemObjectsFactory extends AbstractFactory
|
||||||
|
{
|
||||||
|
|
||||||
|
public static final String PRODUCT_CATEGORY_TSHIRT_ID = "productCategory.tshirt.id";
|
||||||
|
public static final String TAX_CATEGORY_DEFAULT_ID = "taxCategory.tshirt.default.id";
|
||||||
|
|
||||||
|
public static final String ASSET_GRP_ID = "assetgroup.tshirt.id";
|
||||||
|
public static final String WEBSTORE_TAX_ID = "tax.webstore.default.id";
|
||||||
|
public static final String WEBSTORE_SALES_PRICELIST_ID = "pricelist.webstore.sales.id";
|
||||||
|
public static final String WEBSTORE_PURCHASE_PRICELIST_ID = "pricelist.webstore.purchase.id";
|
||||||
|
public static final String PURCHASE_PRICELV_ID = "priceLV.tshirt.purchase.id";
|
||||||
|
public static final String SALES_PRICELV_ID = "priceLV.tshirt.sales.id";
|
||||||
|
public static final String DISCOUNT_SCHEMA_ID = "discountschema.tshirt.id";
|
||||||
|
|
||||||
|
private static GenericSystemObjectsFactory genericSystemsObjectFactory;
|
||||||
|
private GenericSystemObjectsFactory()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GenericSystemObjectsFactory getFactoryInstance()
|
||||||
|
{
|
||||||
|
if (genericSystemsObjectFactory == null)
|
||||||
|
genericSystemsObjectFactory = new GenericSystemObjectsFactory();
|
||||||
|
|
||||||
|
return genericSystemsObjectFactory;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void loadFactory(Properties ctx) throws OperationException
|
||||||
|
{
|
||||||
|
loadFactory(ctx, genericSystemsObjectFactory);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void loadFactory(Properties ctx, AbstractFactory factory) throws OperationException
|
||||||
|
{
|
||||||
|
UDIMAssetGroup assetGroup = SystemObjects.getAssetGroup(ctx, "Tshirt Asset Group");
|
||||||
|
factory.add(ctx, ASSET_GRP_ID, assetGroup);
|
||||||
|
assetGroup = (UDIMAssetGroup) factory.get(ctx, ASSET_GRP_ID);
|
||||||
|
|
||||||
|
UDIMProductCategory productCategory = SystemObjects.getProductCategory(ctx, "TShirt");
|
||||||
|
factory.add(ctx, PRODUCT_CATEGORY_TSHIRT_ID, productCategory);
|
||||||
|
productCategory = (UDIMProductCategory) factory.get(ctx, GenericSystemObjectsFactory.PRODUCT_CATEGORY_TSHIRT_ID);
|
||||||
|
productCategory.setA_Asset_Group_ID(assetGroup.getID());
|
||||||
|
productCategory.save();
|
||||||
|
|
||||||
|
factory.add(ctx, TAX_CATEGORY_DEFAULT_ID, SystemObjects.getTaxCategory(ctx, "TShirt Tax Category"));
|
||||||
|
UDIMTaxCategory taxCategory = (UDIMTaxCategory) factory.get(ctx, TAX_CATEGORY_DEFAULT_ID);
|
||||||
|
|
||||||
|
UDIMTax tax = SystemObjects.getTax(ctx, "Webstore", UdiConstants.COUNTRY_MAURITIUS, "Webstore Tax");
|
||||||
|
tax.setC_Tax_Category_ID(taxCategory.getID());
|
||||||
|
tax.getMTax().setIsTaxExempt(true);
|
||||||
|
tax.getMTax().setSOPOType(MTax.SOPOTYPE_SalesTax);
|
||||||
|
factory.add(ctx, WEBSTORE_TAX_ID, tax);
|
||||||
|
|
||||||
|
UDIMPriceList salesPriceList = SystemObjects.getPriceList(ctx, "Webstore Sales Price List", UdiConstants.CURRENCY_USD);
|
||||||
|
factory.add(ctx, WEBSTORE_SALES_PRICELIST_ID, salesPriceList);
|
||||||
|
salesPriceList = (UDIMPriceList) factory.get(ctx, GenericSystemObjectsFactory.WEBSTORE_SALES_PRICELIST_ID);
|
||||||
|
|
||||||
|
UDIMPriceList purchasePL = SystemObjects.getPriceList(ctx, "Purchase Price List", UdiConstants.CURRENCY_RUPEES);
|
||||||
|
factory.add(ctx, WEBSTORE_PURCHASE_PRICELIST_ID, purchasePL);
|
||||||
|
purchasePL = (UDIMPriceList) factory.get(ctx, GenericSystemObjectsFactory.WEBSTORE_PURCHASE_PRICELIST_ID);
|
||||||
|
|
||||||
|
UDIMDiscountSchema discountSchema = SystemObjects.getDiscountSchema(ctx, "Tshirt Discount Schema");
|
||||||
|
factory.add(ctx, DISCOUNT_SCHEMA_ID, discountSchema);
|
||||||
|
discountSchema = (UDIMDiscountSchema) factory.get(ctx, GenericSystemObjectsFactory.DISCOUNT_SCHEMA_ID);
|
||||||
|
|
||||||
|
UDIMPriceListVersion purchasePLV = SystemObjects.getPriceListVersion(ctx, "Purchase Price List Version");
|
||||||
|
purchasePLV.setM_DiscountSchema_ID(discountSchema.getID());
|
||||||
|
purchasePLV.setM_PriceList_ID(purchasePL.getID());
|
||||||
|
factory.add(ctx, GenericSystemObjectsFactory.PURCHASE_PRICELV_ID, purchasePLV);
|
||||||
|
purchasePLV = (UDIMPriceListVersion) factory.get(ctx, GenericSystemObjectsFactory.PURCHASE_PRICELV_ID);
|
||||||
|
|
||||||
|
|
||||||
|
UDIMPriceListVersion salesPLV = SystemObjects.getPriceListVersion(ctx, "Sales Price List Version");
|
||||||
|
salesPLV.setM_DiscountSchema_ID(discountSchema.getID());
|
||||||
|
salesPLV.setM_PriceList_ID(salesPriceList.getID());
|
||||||
|
|
||||||
|
factory.add(ctx, GenericSystemObjectsFactory.SALES_PRICELV_ID, salesPLV);
|
||||||
|
salesPLV = (UDIMPriceListVersion) factory.get(ctx, GenericSystemObjectsFactory.SALES_PRICELV_ID);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void reloadFactory(Properties ctx) throws ReloadFactoryException
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
GenericSystemObjectsFactory nFactory = new GenericSystemObjectsFactory();
|
||||||
|
nFactory.initFactory(ctx, nFactory);
|
||||||
|
genericSystemsObjectFactory = nFactory;
|
||||||
|
}
|
||||||
|
catch(OperationException ex)
|
||||||
|
{
|
||||||
|
throw new ReloadFactoryException("Could not reload GenericSystemObjectsFactory", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,93 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
package org.posterita.factory;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.compiere.model.X_U_RoleMenu;
|
||||||
|
import org.compiere.util.Env;
|
||||||
|
|
||||||
|
import org.posterita.businesslogic.MenuManager;
|
||||||
|
import org.posterita.exceptions.OperationException;
|
||||||
|
import org.posterita.model.UDIMRole;
|
||||||
|
import org.posterita.model.UDIU_RoleMenu;
|
||||||
|
|
||||||
|
|
||||||
|
public class MenuGenerator
|
||||||
|
{
|
||||||
|
public static void createMenus(Properties ctx, UDIMRole role) throws OperationException
|
||||||
|
{
|
||||||
|
int menuIds[] = MenuManager.getMenuIdForOrganisation(ctx);
|
||||||
|
int roleId = role.getID();
|
||||||
|
|
||||||
|
for(int i = 0; i < menuIds.length; i++)
|
||||||
|
{
|
||||||
|
if(MenuGenerator.isRoleMenuPresent(ctx, roleId, menuIds[i]))
|
||||||
|
continue;
|
||||||
|
X_U_RoleMenu roleMenu = new X_U_RoleMenu(ctx, 0, null);
|
||||||
|
|
||||||
|
roleMenu.setAD_Role_ID(roleId);
|
||||||
|
roleMenu.setU_Menu_ID(menuIds[i]);
|
||||||
|
UDIU_RoleMenu udiRoleMenu = new UDIU_RoleMenu(roleMenu);
|
||||||
|
udiRoleMenu.save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean isRoleMenuPresent(Properties ctx, int roleId, int menuId)
|
||||||
|
{
|
||||||
|
boolean present = true;
|
||||||
|
|
||||||
|
String sqlWhereClause = "";
|
||||||
|
int adClientId = Env.getAD_Client_ID(ctx);
|
||||||
|
int adOrgId = Env.getAD_Org_ID(ctx);
|
||||||
|
|
||||||
|
sqlWhereClause += "AD_CLIENT_ID=" + adClientId + " and AD_ORG_ID=" + adOrgId + " and U_MENU_ID=" + menuId + " and AD_ROLE_ID=" + roleId;
|
||||||
|
int ids[] = X_U_RoleMenu.getAllIDs(X_U_RoleMenu.Table_Name, sqlWhereClause, null);
|
||||||
|
|
||||||
|
if(ids.length == 0)
|
||||||
|
present = false;
|
||||||
|
|
||||||
|
return present;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ctx
|
||||||
|
* @param role
|
||||||
|
* @throws OperationException
|
||||||
|
*/
|
||||||
|
public static void createSuperUserMenus(Properties ctx, UDIMRole role) throws OperationException
|
||||||
|
{
|
||||||
|
int menuIds[] = MenuManager.getMenuIdForSuperUser(ctx);
|
||||||
|
|
||||||
|
int roleId = role.getID();
|
||||||
|
|
||||||
|
for(int i = 0; i < menuIds.length; i++)
|
||||||
|
{
|
||||||
|
if(MenuGenerator.isRoleMenuPresent(ctx, roleId, menuIds[i]))
|
||||||
|
continue;
|
||||||
|
X_U_RoleMenu roleMenu = new X_U_RoleMenu(ctx, 0, null);
|
||||||
|
|
||||||
|
roleMenu.setAD_Role_ID(roleId);
|
||||||
|
roleMenu.setU_Menu_ID(menuIds[i]);
|
||||||
|
UDIU_RoleMenu udiRoleMenu = new UDIU_RoleMenu(roleMenu);
|
||||||
|
udiRoleMenu.save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,568 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
/**
|
||||||
|
@author ashley
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.posterita.factory;
|
||||||
|
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.compiere.model.PO;
|
||||||
|
import org.compiere.model.X_U_Menu;
|
||||||
|
import org.compiere.util.Env;
|
||||||
|
import org.posterita.Constants;
|
||||||
|
import org.posterita.businesslogic.MenuManager;
|
||||||
|
import org.posterita.exceptions.OperationException;
|
||||||
|
import org.posterita.lib.UdiConstants;
|
||||||
|
import org.posterita.model.UDIPO;
|
||||||
|
import org.posterita.model.UDIU_Menu;
|
||||||
|
import org.posterita.order.UDIOrderTypes;
|
||||||
|
|
||||||
|
public class POSMenuFactory extends AbstractFactory
|
||||||
|
{
|
||||||
|
|
||||||
|
public static final String MENU_POSITION_TOP = "TOP";
|
||||||
|
public static final String MENU_POSITION_LEFT = "LEFT";
|
||||||
|
public static final String MENU_POSITION_RIGHT = "RIGHT";
|
||||||
|
public static final String MENU_POSITION_DOWN = "DOWN";
|
||||||
|
|
||||||
|
public static final String PMENU_SALES_ID = "pmenu.order.id";
|
||||||
|
|
||||||
|
public static final String PMENU_CREDITSALES_ID = "pmenu.creditsales.id";
|
||||||
|
public static final String PMENU_PURCHASES_ID = "pmenu.purchases.id";
|
||||||
|
public static final String PMENU_STOCK_ID = "pmenu.stock.id";
|
||||||
|
|
||||||
|
|
||||||
|
public static final String SMENU_POSORDER_ID = "smenu.posorder.id";
|
||||||
|
public static final String SMENU_POSORDERWA_ID="smenu.posorderwa.id";
|
||||||
|
public static final String SMENU_POSPARTIALORDER_ID = "smenu.pospartialorder.id";
|
||||||
|
public static final String SMENU_INVOKEPOSPARTIALORDER_ID = "smenu.invokepospartialorder.id";
|
||||||
|
public static final String SMENU_POSGOODRECNOTE_ID = "smenu.posgoodrecnote.id";
|
||||||
|
public static final String SMENU_POSGOODRETNOTE_ID= "smenu.posgoodretnote.id";
|
||||||
|
public static final String SMENU_CUSTRETORDER_ID="smenu.custretorder.id";
|
||||||
|
public static final String SMENU_POSPARTIALHISTORYORDER_ID="smenu.pospartialposhistory.id";
|
||||||
|
public static final String SMENU_CUSTRETOREDRFROMPOS_ID="smenu.custretorderfrompos.id";
|
||||||
|
public static final String SMENU_POSORDERQUICK="smenu.posorderquick.id";
|
||||||
|
public static final String SMENU_POSORDERCUSTOMERCOMPULSORY="smenu.posordercustomercompulsory.id";
|
||||||
|
public static final String SMENU_CREDITORDER_ID = "smenu.creditorder.id";
|
||||||
|
public static final String SMENU_SETTLE_PAYMENT_ID = "smenu.settlepayment.id";
|
||||||
|
public static final String SMENU_CUSTOMER_RETURN_HISTORY_ID="smenu.customer.return.history.id";
|
||||||
|
|
||||||
|
|
||||||
|
public static final String PMENU_REPORTS_ID="pmenu.reports.id";
|
||||||
|
public static final String SMENU_POSSTOCKMOV="smenu.posstockmov.id";
|
||||||
|
public static final String SMENU_SALESANALREP="smenu.salesanalrep.id";
|
||||||
|
public static final String SMENU_FASTMOVITEMS="smenu.fastmovitems.id";
|
||||||
|
public static final String SMENU_SLOWMOVITEMS="smenu.slowmovitems.id";
|
||||||
|
public static final String SMENU_CUSTSALESREPORT="smenu.custsalesreport.id";
|
||||||
|
public static final String SMENU_CASHBOOKREPORT="smenu.cashbookreport.id";
|
||||||
|
public static final String SMENU_PERIODICASHBOOKDETAILS="smenu.periodiccashbookdetails.id";
|
||||||
|
public static final String SMENU_NOIMAGEREPORT="smenu.noimagereport.id";
|
||||||
|
|
||||||
|
public static final String PMENU_ADMINISTRATION_ID="pmenu.administration.id";
|
||||||
|
public static final String SMENU_USER_ID="smenu.user.id";
|
||||||
|
|
||||||
|
public static final String SMENU_VIEWROLE_ID="smenu.viewrole.id";
|
||||||
|
public static final String SMENU_CREATEVENDOR_ID="smenu.createvendor.id";
|
||||||
|
|
||||||
|
public static final String SMENU_CURRENTTILLAMOUNT_ID="smenu.currenttillamout.id";
|
||||||
|
public static final String SMENU_CLOSECASHBOOK_ID="smenu.closecashbook.id";
|
||||||
|
public static final String SMENU_POSINFO_ID="smenu.posinfo.id";
|
||||||
|
public static final String SMENU_MYSTOCK_ID="smenu.mystock.id";
|
||||||
|
|
||||||
|
public static final String SMENU_ORDERHISTORY_ID="smenu.orderhistory.id";
|
||||||
|
public static final String SMENU_DOCUMENTHISTORY_ID="smenu.documenthistory.id";
|
||||||
|
|
||||||
|
public static final String SMENU_PRODUCTS="smenu.products.id";
|
||||||
|
public static final String SMENU_VIEW_BPINFO="smenu.view.bp.info.id";
|
||||||
|
public static final String SMENU_CUSTOMER="smenu.customer.id";
|
||||||
|
public static final String SMENU_EDIT_BULK_PRODUCT="smenu.edit.bulk.product.id";
|
||||||
|
public static final String SMENU_EDIT_BULK_PRICE="smenu.edit.bulk.price.id";
|
||||||
|
public static final String SMENU_EDIT_ATTRIBUTE_VALUE="smenu.edit.attribute.value.id";
|
||||||
|
public static final String SMENU_ADJUST_CASH_BOOK="smenu.adjust.cashbook.id";
|
||||||
|
public static final String SMENU_SYNCHRONIZE_COLLECTIONS="smenu.synchronize.collections.id";
|
||||||
|
public static final String PMENU_LOGOUT_ID="pmenu.logout.id";
|
||||||
|
public static final String SMENU_CLOSE_POS_TILL="smenu.close.pos.till.id";
|
||||||
|
public static final String SMENU_OPEN_CASH_DRAWER = "smenu.opencashdrawer.id";
|
||||||
|
public static final String SMENU_UPDATE_PRODUCT_BY_CSV = "smenu.update.produc.csv.id";
|
||||||
|
|
||||||
|
public static final String SMENU_CHECK_SEQUENCE = "smenu.checkSequence.id";
|
||||||
|
public static final String SMENU_PRINT_DUNNING_LETTERS_ID = "smenu.printDunningLetters.id";
|
||||||
|
public static final String SMENU_VIEW_PAYMENT_ALLOCATION = "smenu.viewpaymentallocation.id";
|
||||||
|
public static final String SMENU_VIEW_PAYMENT_TERM = "smenu.viewpaymentterm.id";
|
||||||
|
public static final String SMENU_GENERATE_COMMISSION_ID = "smenu.generatecommission.id";
|
||||||
|
public static final String SMENU_VIEW_GENERATED_COMMISSION_ID = "smenu.viewgeneratedcommission.id";
|
||||||
|
public static final String SMENU_VIEW_TAX="smenu.tax.id";
|
||||||
|
public static final String SMENU_CREDITMEMOFROMPOS_ID="smenu.creditmemo.from.creditorder.id";
|
||||||
|
public static final String SMENU_CREATE_UNALLOCATED_PAYMENT_ID="smenu.create.unallocated.payment.id";
|
||||||
|
public static final String SMENU_CREDIT_MEMO_HISTORY_ID="smenu.credit.memo.history.id";
|
||||||
|
|
||||||
|
public static final String MODULE_NAME = "POS";
|
||||||
|
|
||||||
|
private static final String SMENU_CASH_SALES_HISTORY_ID = "smenu.cash.sales.history.id";
|
||||||
|
private static final String SMENU_CREDIT_SALES_HISTORY_ID = "smenu.credit.sales.history.id";
|
||||||
|
private static final String SMENU_GOODSRECNOTEHISTORY_HISTORY_ID = "smenu.goods.received.note.history.id";
|
||||||
|
private static final String SMENU_GOODSRETNOTEHISTORY_HISTORY_ID = "smenu.goods.returned.note.history.id";
|
||||||
|
|
||||||
|
private static final String SMENU_ADJUST_STOCK_ID = "smenu.adjust.stock.id";
|
||||||
|
private static final String SMENU_INVENTORY_HISTORY_ID = "smenu.inventory.history.id";
|
||||||
|
private static final String SMENU_ADJUST_INVENTORY_ID = "smenu.adjust.inventory.id";
|
||||||
|
private static final String SMENU_VIEW_PREFERENCES = "smenu.viewpreferences.id";
|
||||||
|
private static final String SMENU_VIEW_BPARTNERS = "smenu.bpartners.id";
|
||||||
|
private static final String SMENU_PRICE_CHECK = "smenu.price.check";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private static POSMenuFactory singleton;
|
||||||
|
|
||||||
|
protected void loadFactory(Properties ctx) throws OperationException
|
||||||
|
{
|
||||||
|
loadFactory(ctx, singleton);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void loadFactory(Properties ctx, AbstractFactory factory) throws OperationException
|
||||||
|
{
|
||||||
|
loadCashSalesMenu(ctx, factory);
|
||||||
|
loadCreditSalesMenu(ctx, factory);
|
||||||
|
loadPurchasesMenu(ctx, factory);
|
||||||
|
loadPerformanceAnalysisMenu(ctx, factory);
|
||||||
|
loadStockMenu(ctx, factory);
|
||||||
|
loadAdministrationMenu(ctx, factory);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static POSMenuFactory getFactoryInstance(Properties ctx) throws OperationException
|
||||||
|
{
|
||||||
|
if (singleton == null)
|
||||||
|
singleton = new POSMenuFactory();
|
||||||
|
|
||||||
|
Properties nCtx = (Properties)ctx.clone();
|
||||||
|
nCtx.setProperty(UdiConstants.CLIENT_ID_CTX_PARAM, "0");
|
||||||
|
nCtx.setProperty(UdiConstants.ORG_ID_CTX_PARAM, "0");
|
||||||
|
singleton.loadFactory(nCtx);
|
||||||
|
|
||||||
|
return singleton;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void loadCashSalesMenu(Properties ctx, AbstractFactory factory) throws OperationException
|
||||||
|
{
|
||||||
|
UDIU_Menu pmenu_sales = MenuManager.createParentMenu(ctx, "pmenu.cash.sales", MODULE_NAME, 1000);
|
||||||
|
pmenu_sales.setPosition(MENU_POSITION_TOP);
|
||||||
|
pmenu_sales.setImageLink("images/pos/buttons/button_order.gif");
|
||||||
|
|
||||||
|
factory.add(ctx, PMENU_SALES_ID, pmenu_sales);
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_POSORDER_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.cash.sales.multiple.payments",
|
||||||
|
"CreatePOSOrder.do",
|
||||||
|
MODULE_NAME, pmenu_sales.getID(), 1010, "sales.order"));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_POSORDERWA_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.cash.sales",
|
||||||
|
"CreatePOSOrderWithoutAdvanced.do",
|
||||||
|
MODULE_NAME, pmenu_sales.getID(), 1020, "sales.order"));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_POSORDERQUICK,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.quick.cash.sales",
|
||||||
|
"CreatePOSOrder3.do",
|
||||||
|
MODULE_NAME, pmenu_sales.getID(), 1030, "sales.order"));
|
||||||
|
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_POSORDERCUSTOMERCOMPULSORY,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.cash.sales.customer.complusory",
|
||||||
|
"CreatePOSOrder2.do",
|
||||||
|
MODULE_NAME, pmenu_sales.getID(), 1040, "sales.order"));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_CASH_SALES_HISTORY_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.cash.sales.history",
|
||||||
|
"ViewPOSHistoryAction.do?action=getPOSHistory&orderType="+UDIOrderTypes.POS_ORDER.getOrderType(),
|
||||||
|
MODULE_NAME, pmenu_sales.getID(), 1050, "sales.order"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_POSPARTIALORDER_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.prepare.order",
|
||||||
|
"CreatePartialPOSOrder.do",
|
||||||
|
MODULE_NAME, pmenu_sales.getID(), 1060, "prepared.order"));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_INVOKEPOSPARTIALORDER_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.complete.prepared.order",
|
||||||
|
"InvokePartialPOSOrder.do",
|
||||||
|
MODULE_NAME, pmenu_sales.getID(), 1070, "prepared.order"));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_POSPARTIALHISTORYORDER_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.prepared.order.history",
|
||||||
|
"ViewPartialPOSOrderHistoryAction.do?action=initPartialPOSHistory",
|
||||||
|
MODULE_NAME, pmenu_sales.getID(), 1080, "prepared.order"));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_CUSTRETORDER_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.customer.returned.order",
|
||||||
|
"CustomerReturnOrder.do",
|
||||||
|
MODULE_NAME, pmenu_sales.getID(), 1090,"returned.order"));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_CUSTOMER_RETURN_HISTORY_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.customer.return.history.id",
|
||||||
|
"ViewPOSHistoryAction.do?action=getPOSHistory&orderType="+UDIOrderTypes.CUSTOMER_RETURN_ORDER.getOrderType(),
|
||||||
|
MODULE_NAME, pmenu_sales.getID(), 1170, "returned.order"));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_CUSTRETOREDRFROMPOS_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.invoke.customer.returned.order",
|
||||||
|
"GetCustomerReturnFromPOS.do",
|
||||||
|
MODULE_NAME, pmenu_sales.getID(), 1100,"returned.order"));
|
||||||
|
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_CURRENTTILLAMOUNT_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.current.money.in.terminal",
|
||||||
|
"GetCurrentTillAmount.do?action=getCurrentTillAmount",
|
||||||
|
MODULE_NAME, pmenu_sales.getID(), 1110,"till.management"));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_ADJUST_CASH_BOOK,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.adjust.cashbook",
|
||||||
|
"AdjustCashBook.do",
|
||||||
|
MODULE_NAME, pmenu_sales.getID(), 1120,"cash.book"));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_PERIODICASHBOOKDETAILS,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.cashbook.report",
|
||||||
|
"CashSummaryDate.do",
|
||||||
|
MODULE_NAME, pmenu_sales.getID(), 1130,"cash.book"));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_CASHBOOKREPORT,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.cashbook.history",
|
||||||
|
"CashReportAction.do?action=initGetCashDetailsHistory",
|
||||||
|
MODULE_NAME, pmenu_sales.getID(), 1140,"cash.book"));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_CLOSE_POS_TILL,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.close.till",
|
||||||
|
"InitClosePOSTillAction.do?action=initCloseTill",
|
||||||
|
MODULE_NAME, pmenu_sales.getID(), 1150,"till.management"));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_OPEN_CASH_DRAWER,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.open.cashdrawer",
|
||||||
|
"javascript:openCashDrawer();",
|
||||||
|
MODULE_NAME, pmenu_sales.getID(), 1160,"till.management"));
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadCreditSalesMenu(Properties ctx, AbstractFactory factory) throws OperationException
|
||||||
|
{
|
||||||
|
UDIU_Menu pmenu_creditsales = MenuManager.createParentMenu(ctx, "pmenu.credit.sales", MODULE_NAME, 2000);
|
||||||
|
pmenu_creditsales.setPosition(MENU_POSITION_TOP);
|
||||||
|
pmenu_creditsales.setImageLink("images/pos/buttons/button_order.gif");
|
||||||
|
|
||||||
|
factory.add(ctx, PMENU_CREDITSALES_ID, pmenu_creditsales);
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_CREDITORDER_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.credit.sales",
|
||||||
|
"InitCreateCreditOrderAction.do?action=initCreateCreditOrder",
|
||||||
|
MODULE_NAME, pmenu_creditsales.getID(), 2010));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_CREDITMEMOFROMPOS_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.creditmemo.from.creditorder.id",
|
||||||
|
"InvokeCreditOrder.do",
|
||||||
|
MODULE_NAME, pmenu_creditsales.getID(), 2020));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_CREDIT_MEMO_HISTORY_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.credit.memo.history.id",
|
||||||
|
"ViewPOSHistoryAction.do?action=getPOSHistory&orderType="+UDIOrderTypes.CREDIT_MEMO.getOrderType(),
|
||||||
|
MODULE_NAME, pmenu_creditsales.getID(), 2080));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_SETTLE_PAYMENT_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.settle.payment.credit.sales",
|
||||||
|
"InitGetBpartnerPaymentStatus.do?action=initGetBpartnerPaymentStatus",
|
||||||
|
MODULE_NAME, pmenu_creditsales.getID(), 2030));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_PRINT_DUNNING_LETTERS_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.dunning.letters",
|
||||||
|
"InitPrintDunningAction.do?action=initPrintDunning",
|
||||||
|
MODULE_NAME, pmenu_creditsales.getID(), 2040));
|
||||||
|
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_VIEW_PAYMENT_ALLOCATION,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.payment.allocation.history",
|
||||||
|
"ViewPaymentAllocation.do",
|
||||||
|
MODULE_NAME, pmenu_creditsales.getID(), 2050));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_CREDIT_SALES_HISTORY_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.credit.sales.history",
|
||||||
|
"ViewPOSHistoryAction.do?action=getPOSHistory&orderType=" + UDIOrderTypes.CREDIT_ORDER.getOrderType(),
|
||||||
|
MODULE_NAME, pmenu_creditsales.getID(), 2060));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_CREATE_UNALLOCATED_PAYMENT_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.create.unallocated.payment.id",
|
||||||
|
"CreateUnallocatedPayment.do",
|
||||||
|
MODULE_NAME, pmenu_creditsales.getID(), 2070));
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void loadPurchasesMenu(Properties ctx, AbstractFactory factory) throws OperationException
|
||||||
|
{
|
||||||
|
UDIU_Menu pmenu_purchases = MenuManager.createParentMenu(ctx, "pmenu.purchases", MODULE_NAME, 3000);
|
||||||
|
pmenu_purchases.setPosition(MENU_POSITION_TOP);
|
||||||
|
pmenu_purchases.setImageLink("images/pos/buttons/button_order.gif");
|
||||||
|
|
||||||
|
factory.add(ctx, PMENU_PURCHASES_ID, pmenu_purchases);
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_POSGOODRECNOTE_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.goods.received.note",
|
||||||
|
"GetAllPOSVendor.do?action=getAllVendors&isSales=true",
|
||||||
|
MODULE_NAME, pmenu_purchases.getID(), 3010));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_POSGOODRETNOTE_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.goods.returned.note",
|
||||||
|
"GetAllPOSVendor.do?action=getAllVendors&isSales=false",
|
||||||
|
MODULE_NAME, pmenu_purchases.getID(), 3020));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_GOODSRECNOTEHISTORY_HISTORY_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.goods.received.note.history",
|
||||||
|
"ViewPOSHistoryAction.do?action=getPOSHistory&orderType=" + UDIOrderTypes.POS_GOODS_RECEIVE_NOTE.getOrderType(),
|
||||||
|
MODULE_NAME, pmenu_purchases.getID(), 3030));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_GOODSRETNOTEHISTORY_HISTORY_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.goods.returned.note.history",
|
||||||
|
"ViewPOSHistoryAction.do?action=getPOSHistory&orderType=" + UDIOrderTypes.POS_GOODS_RETURN_NOTE.getOrderType(),
|
||||||
|
MODULE_NAME, pmenu_purchases.getID(), 3040));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void loadPerformanceAnalysisMenu(Properties ctx, AbstractFactory factory) throws OperationException
|
||||||
|
{
|
||||||
|
UDIU_Menu pmenu_reports = MenuManager.createParentMenu(ctx, "pmenu.performance.analysis", MODULE_NAME, 4000);
|
||||||
|
pmenu_reports.setPosition(MENU_POSITION_TOP);
|
||||||
|
pmenu_reports.setImageLink("images/pos/buttons/button_reports.gif");
|
||||||
|
|
||||||
|
factory.add(ctx, PMENU_REPORTS_ID, pmenu_reports);
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_CUSTSALESREPORT,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.performance.analysis.report",
|
||||||
|
"CustomPOSReportAction.do?action=initCustomReport",
|
||||||
|
MODULE_NAME, pmenu_reports.getID(), 4010));
|
||||||
|
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_POSINFO_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.sales.report.per.terminal",
|
||||||
|
"POSInfoReport.do",
|
||||||
|
MODULE_NAME, pmenu_reports.getID(), 4020));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_ORDERHISTORY_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.order.history",
|
||||||
|
"InitPOSHistoryAction.do?action=initPOSHistory",
|
||||||
|
MODULE_NAME, pmenu_reports.getID(), 4030));
|
||||||
|
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_DOCUMENTHISTORY_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.document.history",
|
||||||
|
"DocumentHistoryAction.do?action=initHistory",
|
||||||
|
MODULE_NAME, pmenu_reports.getID(), 4040));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_VIEW_BPINFO,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.bpartner.sales.details",
|
||||||
|
"ViewBPartnerInfoAction.do?action=getBpartnerInfo",
|
||||||
|
MODULE_NAME, pmenu_reports.getID(), 4050));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void loadStockMenu(Properties ctx, AbstractFactory factory) throws OperationException
|
||||||
|
{
|
||||||
|
UDIU_Menu pmenu_stock = MenuManager.createParentMenu(ctx, "pmenu.stock", MODULE_NAME, 5000);
|
||||||
|
pmenu_stock.setPosition(MENU_POSITION_TOP);
|
||||||
|
pmenu_stock.setImageLink("images/pos/buttons/button_order.gif");
|
||||||
|
|
||||||
|
factory.add(ctx, PMENU_STOCK_ID, pmenu_stock);
|
||||||
|
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_POSSTOCKMOV,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.stock.movement",
|
||||||
|
"StockMovementReport.do",
|
||||||
|
MODULE_NAME, pmenu_stock.getID(), 5010));
|
||||||
|
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_MYSTOCK_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.stock",
|
||||||
|
"GetPOSStockAction.do?action=getPOSStock",
|
||||||
|
MODULE_NAME, pmenu_stock.getID(), 5020));
|
||||||
|
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_FASTMOVITEMS,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.fast.moving.items",
|
||||||
|
"CustomFastMovingItemsReport.do",
|
||||||
|
MODULE_NAME, pmenu_stock.getID(), 5030));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_SLOWMOVITEMS,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.slow.moving.items",
|
||||||
|
"CustomSlowMovingItemsReport.do",
|
||||||
|
MODULE_NAME, pmenu_stock.getID(), 5040));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_ADJUST_STOCK_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.adjust.stock.id",
|
||||||
|
"ViewInventory.do",
|
||||||
|
MODULE_NAME, pmenu_stock.getID(), 5040));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_INVENTORY_HISTORY_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.inventory.history.id",
|
||||||
|
"ViewInventoryHistoryAction.do?action=viewInventoryHistory",
|
||||||
|
MODULE_NAME, pmenu_stock.getID(), 5050));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_ADJUST_INVENTORY_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.adjust.inventory.id",
|
||||||
|
"AdjustWholeInventoryAction.do?action=createWholeInventory",
|
||||||
|
MODULE_NAME, pmenu_stock.getID(), 5060));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void loadAdministrationMenu(Properties ctx, AbstractFactory factory) throws OperationException
|
||||||
|
{
|
||||||
|
UDIU_Menu pmenu_administration = MenuManager.createParentMenu(ctx, "pmenu.administration", MODULE_NAME, 6000);
|
||||||
|
pmenu_administration.setPosition(MENU_POSITION_TOP);
|
||||||
|
pmenu_administration.setImageLink("images/pos/buttons/button_administration.gif");
|
||||||
|
|
||||||
|
factory.add(ctx, PMENU_ADMINISTRATION_ID, pmenu_administration);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_CUSTOMER,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.customers",
|
||||||
|
//"ViewAllCustomers.do",
|
||||||
|
"POSCustomerAction.do?action=initSearchPOSCustomer",
|
||||||
|
MODULE_NAME, pmenu_administration.getID(), 6010));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_CREATEVENDOR_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.vendors",
|
||||||
|
"SearchVendor.do?action=initSearchVendors",
|
||||||
|
MODULE_NAME, pmenu_administration.getID(), 6020));
|
||||||
|
|
||||||
|
/*factory.add(ctx, SMENU_USER_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.users",
|
||||||
|
"POSUserAction.do?action=listUsers&first=1",
|
||||||
|
MODULE_NAME, pmenu_administration.getID(), 6030));
|
||||||
|
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_VIEWROLE_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.role",
|
||||||
|
"POSRoleAction.do?action=listRoles&first=1",
|
||||||
|
MODULE_NAME, pmenu_administration.getID(), 6040));*/
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_USER_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.users",
|
||||||
|
"ListPOSUsers.do",
|
||||||
|
MODULE_NAME, pmenu_administration.getID(), 6030));
|
||||||
|
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_VIEWROLE_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.role",
|
||||||
|
"ListPOSRoles.do",
|
||||||
|
MODULE_NAME, pmenu_administration.getID(), 6040));
|
||||||
|
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_PRODUCTS,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.products",
|
||||||
|
"ViewAllPOSProduct.do",
|
||||||
|
MODULE_NAME, pmenu_administration.getID(), 6050));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_EDIT_ATTRIBUTE_VALUE,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.edit.product.attribute.value",
|
||||||
|
"InitViewAttributesAction.do?action=initViewAttributeValues",
|
||||||
|
MODULE_NAME, pmenu_administration.getID(), 6060));
|
||||||
|
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_CHECK_SEQUENCE,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.check.repair.database.integrity",
|
||||||
|
"CheckSequenceAction.do?action=checkSequence",
|
||||||
|
MODULE_NAME, pmenu_administration.getID(), 6080));
|
||||||
|
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_GENERATE_COMMISSION_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.generate.commission",
|
||||||
|
"GenerateCommission.do",
|
||||||
|
MODULE_NAME, pmenu_administration.getID(), 6090));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_VIEW_GENERATED_COMMISSION_ID,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.view.last.generated.commission",
|
||||||
|
"ViewCommissionAction.do?action=viewCommission",
|
||||||
|
MODULE_NAME, pmenu_administration.getID(), 6100));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_VIEW_PAYMENT_TERM,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.payment.term",
|
||||||
|
"ViewAllPaymentTermAction.do?action=viewAllPaymentTerms",
|
||||||
|
MODULE_NAME, pmenu_administration.getID(), 6110));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_VIEW_TAX,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.tax",
|
||||||
|
"TaxAction.do?action=viewAllTax",
|
||||||
|
MODULE_NAME, pmenu_administration.getID(), 6120));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_VIEW_PREFERENCES,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.preferences",
|
||||||
|
"ViewPreferences.do",
|
||||||
|
MODULE_NAME, pmenu_administration.getID(), 6130));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_VIEW_BPARTNERS,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.bpartners",
|
||||||
|
"BusinessPartners.do",
|
||||||
|
MODULE_NAME, pmenu_administration.getID(), 6140));
|
||||||
|
|
||||||
|
factory.add(ctx, SMENU_PRICE_CHECK,
|
||||||
|
MenuManager.createSubMenu(ctx, "smenu.price.check",
|
||||||
|
"PriceCheck.do",
|
||||||
|
MODULE_NAME, pmenu_administration.getID(), 6150));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public UDIPO get(Properties ctx, String key) throws OperationException
|
||||||
|
{
|
||||||
|
Properties nCtx = (Properties)ctx.clone();
|
||||||
|
Env.setContext(nCtx, UdiConstants.CLIENT_ID_CTX_PARAM, "0");
|
||||||
|
Env.setContext(nCtx, UdiConstants.ORG_ID_CTX_PARAM, "0");
|
||||||
|
return super.get(nCtx, key);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setFields(Properties ctx, PO fromPO, PO toPO) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException
|
||||||
|
{
|
||||||
|
X_U_Menu fromUMenu = (X_U_Menu)fromPO;
|
||||||
|
X_U_Menu toUMenu = (X_U_Menu)toPO;
|
||||||
|
|
||||||
|
toUMenu.setMenuLink(fromUMenu.getMenuLink());
|
||||||
|
toUMenu.setName(fromUMenu.getName());
|
||||||
|
toUMenu.setHasSubMenu(fromUMenu.isHasSubMenu());
|
||||||
|
toUMenu.setModule(fromUMenu.getModule());
|
||||||
|
toUMenu.setParentMenu_ID(fromUMenu.getParentMenu_ID());
|
||||||
|
toUMenu.setImageLink(fromUMenu.getImageLink());
|
||||||
|
toUMenu.setIsActive(fromUMenu.isActive());
|
||||||
|
toUMenu.setPosition(fromUMenu.getPosition());
|
||||||
|
toUMenu.setCategory(fromUMenu.getCategory());
|
||||||
|
toUMenu.setSequence(fromUMenu.getSequence());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,96 @@
|
||||||
|
/**
|
||||||
|
* 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 Jul 6, 2005 by vishee
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.posterita.factory;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.compiere.model.MProcess;
|
||||||
|
import org.compiere.process.SvrProcess;
|
||||||
|
import org.posterita.exceptions.OperationException;
|
||||||
|
import org.posterita.model.UDIMProcess;
|
||||||
|
import org.posterita.model.UDIPO;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class ProcessFactory extends AbstractFactory
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
private static ProcessFactory singleton;
|
||||||
|
|
||||||
|
|
||||||
|
private ProcessFactory() throws OperationException
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ProcessFactory getFactoryInstance(Properties ctx) throws Exception
|
||||||
|
{
|
||||||
|
if (singleton ==null)
|
||||||
|
singleton = new ProcessFactory();
|
||||||
|
|
||||||
|
return singleton;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected void loadFactory(Properties ctx) throws OperationException
|
||||||
|
{
|
||||||
|
loadFactory(ctx, singleton);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* key - the value retrieved from properties file for the name of the process
|
||||||
|
* className - the class from which the process will run (eg com.udimu.process.MyProcess where MyProcess is the java file)
|
||||||
|
*/
|
||||||
|
private UDIPO createProcess(Properties ctx, String className) throws OperationException
|
||||||
|
{
|
||||||
|
|
||||||
|
MProcess mProcess = new MProcess(ctx,0, null);
|
||||||
|
mProcess.setClassname(className);
|
||||||
|
mProcess.setDescription(className);
|
||||||
|
mProcess.setName(className);
|
||||||
|
mProcess.setValue(className);
|
||||||
|
|
||||||
|
UDIMProcess process = new UDIMProcess(mProcess);
|
||||||
|
|
||||||
|
return process;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public SvrProcess getSvrProcess(Properties ctx,String key) throws Exception
|
||||||
|
{
|
||||||
|
UDIMProcess p = (UDIMProcess) singleton.get(ctx, key);
|
||||||
|
Object arr[] = {};
|
||||||
|
SvrProcess process = (SvrProcess) Class.forName(p.getClass().getName()).getConstructors()[0].newInstance(arr); // use better reflection
|
||||||
|
return process;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void loadFactory(Properties ctx, AbstractFactory factory) throws OperationException
|
||||||
|
{
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,162 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
package org.posterita.factory;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.posterita.businesslogic.ProductAttributeManager;
|
||||||
|
import org.posterita.exceptions.OperationException;
|
||||||
|
import org.posterita.exceptions.ReloadFactoryException;
|
||||||
|
import org.posterita.model.UDIMAttributeSet;
|
||||||
|
|
||||||
|
|
||||||
|
public class ProductAttributeFactory extends AbstractFactory
|
||||||
|
{
|
||||||
|
public static final String ATTRIBUTE_CAR_MAKE_ID = "attribute.car.make.id";
|
||||||
|
public static final String ATTRIBUTE_CAR_MODEL_ID = "attribute.car.model.id";
|
||||||
|
public static final String ATTRIBUTE_CAR_MODELGROUP_ID = "attribute.car.modelGroup.id";
|
||||||
|
public static final String ATTRIBUTE_CAR_COLOUR_ID = "attribute.car.colour.id";
|
||||||
|
public static final String ATTRIBUTE_CAR_YEAR_ID = "attribute.car.year.id";
|
||||||
|
public static final String ATTRIBUTE_CAR_TRX_ID = "attribute.car.trx.id";
|
||||||
|
|
||||||
|
private static final String ATTRIBUTE_CAR_MAKE_NAME = "Make";
|
||||||
|
private static final String ATTRIBUTE_CAR_MODEL_NAME = "Model";
|
||||||
|
private static final String ATTRIBUTE_CAR_MODELGROUP_NAME = "Model Group";
|
||||||
|
private static final String ATTRIBUTE_CAR_COLOUR_NAME = "Colour";
|
||||||
|
private static final String ATTRIBUTE_CAR_YEAR_NAME = "Year";
|
||||||
|
private static final String ATTRIBUTE_CAR_TRX_NAME = "Transmission";
|
||||||
|
|
||||||
|
public static final String ATTRIBUTE_BIKE_MAKE_ID = "attribute.bike.make.id";
|
||||||
|
public static final String ATTRIBUTE_BIKE_MODEL_ID = "attribute.bike.model.id";
|
||||||
|
public static final String ATTRIBUTE_BIKE_MODELGROUP_ID = "attribute.bike.modelGroup.id";
|
||||||
|
public static final String ATTRIBUTE_BIKE_COLOUR_ID = "attribute.bike.colour.id";
|
||||||
|
public static final String ATTRIBUTE_BIKE_YEAR_ID = "attribute.bike.year.id";
|
||||||
|
public static final String ATTRIBUTE_BIKE_TRX_ID = "attribute.bike.trx.id";
|
||||||
|
|
||||||
|
private static final String ATTRIBUTE_BIKE_MAKE_NAME = "Make";
|
||||||
|
private static final String ATTRIBUTE_BIKE_MODEL_NAME = "Model";
|
||||||
|
private static final String ATTRIBUTE_BIKE_MODELGROUP_NAME = "Model Group";
|
||||||
|
private static final String ATTRIBUTE_BIKE_COLOUR_NAME = "Colour";
|
||||||
|
private static final String ATTRIBUTE_BIKE_YEAR_NAME = "Year";
|
||||||
|
private static final String ATTRIBUTE_BIKE_TRX_NAME = "Transmission";
|
||||||
|
|
||||||
|
|
||||||
|
private static ProductAttributeFactory pAttributeFactory;
|
||||||
|
private ProductAttributeFactory() throws OperationException
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ProductAttributeFactory getFactoryInstance() throws OperationException
|
||||||
|
{
|
||||||
|
if (pAttributeFactory == null)
|
||||||
|
pAttributeFactory = new ProductAttributeFactory();
|
||||||
|
|
||||||
|
return pAttributeFactory;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void loadFactory(Properties ctx) throws OperationException
|
||||||
|
{
|
||||||
|
loadFactory(ctx, pAttributeFactory);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void loadFactory(Properties ctx, AbstractFactory factory) throws OperationException
|
||||||
|
{
|
||||||
|
factory.add(ctx, ATTRIBUTE_CAR_MAKE_ID, ProductAttributeManager.createAttribute(ctx, ATTRIBUTE_CAR_MAKE_NAME));
|
||||||
|
factory.add(ctx, ATTRIBUTE_CAR_MODEL_ID, ProductAttributeManager.createAttribute(ctx, ATTRIBUTE_CAR_MODEL_NAME));
|
||||||
|
factory.add(ctx, ATTRIBUTE_CAR_MODELGROUP_ID, ProductAttributeManager.createAttribute(ctx,ATTRIBUTE_CAR_MODELGROUP_NAME));
|
||||||
|
factory.add(ctx, ATTRIBUTE_CAR_COLOUR_ID, ProductAttributeManager.createAttribute(ctx, ATTRIBUTE_CAR_COLOUR_NAME));
|
||||||
|
factory.add(ctx, ATTRIBUTE_CAR_TRX_ID, ProductAttributeManager.createAttribute(ctx, ATTRIBUTE_CAR_TRX_NAME));
|
||||||
|
factory.add(ctx, ATTRIBUTE_CAR_YEAR_ID, ProductAttributeManager.createAttribute(ctx, ATTRIBUTE_CAR_YEAR_NAME));
|
||||||
|
|
||||||
|
factory.add(ctx, ATTRIBUTE_BIKE_MAKE_ID, ProductAttributeManager.createAttribute(ctx, ATTRIBUTE_BIKE_MAKE_NAME));
|
||||||
|
factory.add(ctx, ATTRIBUTE_BIKE_MODEL_ID, ProductAttributeManager.createAttribute(ctx, ATTRIBUTE_BIKE_MODEL_NAME));
|
||||||
|
factory.add(ctx, ATTRIBUTE_BIKE_MODELGROUP_ID, ProductAttributeManager.createAttribute(ctx,ATTRIBUTE_BIKE_MODELGROUP_NAME));
|
||||||
|
factory.add(ctx, ATTRIBUTE_BIKE_COLOUR_ID, ProductAttributeManager.createAttribute(ctx, ATTRIBUTE_BIKE_COLOUR_NAME));
|
||||||
|
factory.add(ctx, ATTRIBUTE_BIKE_TRX_ID, ProductAttributeManager.createAttribute(ctx, ATTRIBUTE_BIKE_TRX_NAME));
|
||||||
|
factory.add(ctx, ATTRIBUTE_BIKE_YEAR_ID, ProductAttributeManager.createAttribute(ctx, ATTRIBUTE_BIKE_YEAR_NAME));
|
||||||
|
|
||||||
|
UDIMAttributeSet carAttributeSet = (UDIMAttributeSet) ProductAttributeSetFactory.getFactoryInstance(ctx).get(ctx, ProductAttributeSetFactory.ATTRIBUTE_SET_CAR_ID);
|
||||||
|
ProductAttributeManager.createAttributeUse(ctx, carAttributeSet, ATTRIBUTE_CAR_MAKE_ID);
|
||||||
|
ProductAttributeManager.createAttributeUse(ctx, carAttributeSet, ATTRIBUTE_CAR_MODEL_ID );
|
||||||
|
ProductAttributeManager.createAttributeUse(ctx, carAttributeSet, ATTRIBUTE_CAR_MODELGROUP_ID );
|
||||||
|
ProductAttributeManager.createAttributeUse(ctx, carAttributeSet, ATTRIBUTE_CAR_COLOUR_ID );
|
||||||
|
ProductAttributeManager.createAttributeUse(ctx, carAttributeSet, ATTRIBUTE_CAR_TRX_ID );
|
||||||
|
ProductAttributeManager.createAttributeUse(ctx, carAttributeSet, ATTRIBUTE_CAR_YEAR_ID );
|
||||||
|
|
||||||
|
UDIMAttributeSet bikeAttributeSet = (UDIMAttributeSet) ProductAttributeSetFactory.getFactoryInstance(ctx).get(ctx, ProductAttributeSetFactory.ATTRIBUTE_SET_BIKE_ID);
|
||||||
|
ProductAttributeManager.createAttributeUse(ctx, bikeAttributeSet, ATTRIBUTE_BIKE_MAKE_ID);
|
||||||
|
ProductAttributeManager.createAttributeUse(ctx, bikeAttributeSet, ATTRIBUTE_BIKE_MODEL_ID );
|
||||||
|
ProductAttributeManager.createAttributeUse(ctx, bikeAttributeSet, ATTRIBUTE_BIKE_MODELGROUP_ID );
|
||||||
|
ProductAttributeManager.createAttributeUse(ctx, bikeAttributeSet, ATTRIBUTE_BIKE_COLOUR_ID );
|
||||||
|
ProductAttributeManager.createAttributeUse(ctx, bikeAttributeSet, ATTRIBUTE_BIKE_TRX_ID );
|
||||||
|
ProductAttributeManager.createAttributeUse(ctx, bikeAttributeSet, ATTRIBUTE_BIKE_YEAR_ID );
|
||||||
|
|
||||||
|
//create attribute for t-shirt here
|
||||||
|
//First need to create tshirt Attribute Set
|
||||||
|
//Then create the attributes which are needed
|
||||||
|
//We can use the model and colour attributes already created i.e the ones used by cars and bikes
|
||||||
|
//create attribute use
|
||||||
|
//Attribute Use: An Attribute Set can have many attributes
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* eg a TShirt Attribute Set have attributes namely Model, Colour, Size and Design
|
||||||
|
* AttributeUse links the Attribute Set with the Attributes
|
||||||
|
*
|
||||||
|
* eg Table Structure for M_AttributeUse
|
||||||
|
*
|
||||||
|
* -----------------------------
|
||||||
|
* | AttributeSet | Attribute |
|
||||||
|
* -----------------------------
|
||||||
|
* | TShirt | Model |
|
||||||
|
* -----------------------------
|
||||||
|
* | TShirt | Colour |
|
||||||
|
* -----------------------------
|
||||||
|
* | TShirt | Size |
|
||||||
|
* -----------------------------
|
||||||
|
*
|
||||||
|
* In this way we can dynamically add or remove attributes.
|
||||||
|
*
|
||||||
|
* Note: Product is linked to an AttributeSet.
|
||||||
|
* The AttributeSet has attributes(from AttributeUse)
|
||||||
|
* Attributes has AttributeValues.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void reloadFactory(Properties ctx) throws ReloadFactoryException
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ProductAttributeFactory nFactory = new ProductAttributeFactory();
|
||||||
|
nFactory.initFactory(ctx, nFactory);
|
||||||
|
pAttributeFactory = nFactory;
|
||||||
|
}
|
||||||
|
catch(OperationException ex)
|
||||||
|
{
|
||||||
|
throw new ReloadFactoryException("Could not reload ProductAttributeFactory", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,80 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
package org.posterita.factory;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.posterita.businesslogic.ProductAttributeSetManager;
|
||||||
|
import org.posterita.exceptions.OperationException;
|
||||||
|
import org.posterita.exceptions.ReloadFactoryException;
|
||||||
|
|
||||||
|
|
||||||
|
public class ProductAttributeSetFactory extends AbstractFactory
|
||||||
|
{
|
||||||
|
private static ProductAttributeSetFactory pAttributeSetFactory;
|
||||||
|
|
||||||
|
public static final String ATTRIBUTE_SET_CAR_ID = "attributeset.car.id";
|
||||||
|
private static final String ATTRIBUTE_SET_CAR_NAME = "Car";
|
||||||
|
|
||||||
|
public static final String ATTRIBUTE_SET_BIKE_ID = "attributeset.bike.id";
|
||||||
|
private static final String ATTRIBUTE_SET_BIKE_NAME ="Bike";
|
||||||
|
|
||||||
|
|
||||||
|
private ProductAttributeSetFactory() throws OperationException
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ProductAttributeSetFactory getFactoryInstance(Properties ctx) throws OperationException
|
||||||
|
{
|
||||||
|
if (pAttributeSetFactory == null)
|
||||||
|
pAttributeSetFactory = new ProductAttributeSetFactory();
|
||||||
|
|
||||||
|
return pAttributeSetFactory;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void loadFactory(Properties ctx) throws OperationException
|
||||||
|
{
|
||||||
|
loadFactory(ctx, pAttributeSetFactory);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void loadFactory(Properties ctx, AbstractFactory factory) throws OperationException
|
||||||
|
{
|
||||||
|
factory.add(ctx, ATTRIBUTE_SET_CAR_ID, ProductAttributeSetManager.createAttributeSet(ctx, ATTRIBUTE_SET_CAR_NAME));
|
||||||
|
factory.add(ctx, ATTRIBUTE_SET_BIKE_ID, ProductAttributeSetManager.createAttributeSet(ctx, ATTRIBUTE_SET_BIKE_NAME));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void reloadFactory(Properties ctx) throws ReloadFactoryException
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ProductAttributeSetFactory nFactory = new ProductAttributeSetFactory();
|
||||||
|
nFactory.initFactory(ctx, nFactory);
|
||||||
|
pAttributeSetFactory = nFactory;
|
||||||
|
}
|
||||||
|
catch(OperationException ex)
|
||||||
|
{
|
||||||
|
throw new ReloadFactoryException("Could not reload ProductAttributeSetFactory", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,107 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
package org.posterita.factory;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.compiere.model.MAttributeUse;
|
||||||
|
|
||||||
|
import org.posterita.exceptions.OperationException;
|
||||||
|
import org.posterita.model.UDIMAttribute;
|
||||||
|
import org.posterita.model.UDIMAttributeSet;
|
||||||
|
import org.posterita.model.UDIMAttributeUse;
|
||||||
|
|
||||||
|
|
||||||
|
public class ProductAttributeUseFactory extends AbstractFactory
|
||||||
|
{
|
||||||
|
public static final String CAR_MAKE_ATTRIBUTE_USE_ID = "attributeuse.make.car.id";
|
||||||
|
public static final String CAR_MODEL_ATTRIBUTE_USE_ID = "attributeuse.model.car.id";
|
||||||
|
public static final String CAR_COLOUR_ATTRIBUTE_USE_ID = "attributeuse.colour.car.id";
|
||||||
|
public static final String CAR_YEAR_ATTRIBUTE_USE_ID = "attributeuse.year.car.id";
|
||||||
|
public static final String CAR_TRX_ATTRIBUTE_USE_ID = "attributeuse.trx.car.id";
|
||||||
|
|
||||||
|
public static final String BIKE_MAKE_ATTRIBUTE_USE_ID = "attributeuse.make.bike.id";
|
||||||
|
public static final String BIKE_MODEL_ATTRIBUTE_USE_ID = "attributeuse.model.bike.id";
|
||||||
|
public static final String BIKE_COLOUR_ATTRIBUTE_USE_ID = "attributeuse.colour.bike.id";
|
||||||
|
public static final String BIKE_YEAR_ATTRIBUTE_USE_ID = "attributeuse.year.bike.id";
|
||||||
|
public static final String BIKE_TRX_ATTRIBUTE_USE_ID = "attributeuse.bike.car.id";
|
||||||
|
|
||||||
|
private static ProductAttributeUseFactory productAttributeUseFactory;
|
||||||
|
private ProductAttributeUseFactory() throws OperationException
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void loadFactory(Properties ctx) throws OperationException
|
||||||
|
{
|
||||||
|
loadFactory(ctx, productAttributeUseFactory);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void loadFactory(Properties ctx, AbstractFactory factory) throws OperationException
|
||||||
|
{
|
||||||
|
UDIMAttributeSet carAttributeSet = (UDIMAttributeSet) ProductAttributeSetFactory.getFactoryInstance(ctx).get(ctx, ProductAttributeSetFactory.ATTRIBUTE_SET_CAR_ID);
|
||||||
|
UDIMAttribute carMakeAttribute = (UDIMAttribute) ProductAttributeSetFactory.getFactoryInstance(ctx).get(ctx, ProductAttributeFactory.ATTRIBUTE_CAR_MAKE_ID);
|
||||||
|
UDIMAttribute carColourAttribute = (UDIMAttribute) ProductAttributeFactory.getFactoryInstance().get(ctx, ProductAttributeFactory.ATTRIBUTE_CAR_COLOUR_ID);
|
||||||
|
UDIMAttribute carModelAttribute = (UDIMAttribute) ProductAttributeFactory.getFactoryInstance().get(ctx, ProductAttributeFactory.ATTRIBUTE_CAR_MODEL_ID);
|
||||||
|
UDIMAttribute carTrxAttribute = (UDIMAttribute) ProductAttributeFactory.getFactoryInstance().get(ctx, ProductAttributeFactory.ATTRIBUTE_CAR_TRX_ID);
|
||||||
|
UDIMAttribute carYearAttribute = (UDIMAttribute) ProductAttributeFactory.getFactoryInstance().get(ctx, ProductAttributeFactory.ATTRIBUTE_CAR_YEAR_ID);
|
||||||
|
|
||||||
|
factory.add(ctx, CAR_MAKE_ATTRIBUTE_USE_ID, createAttributeUse(ctx, carAttributeSet, carMakeAttribute));
|
||||||
|
factory.add(ctx, CAR_COLOUR_ATTRIBUTE_USE_ID, createAttributeUse(ctx,carAttributeSet, carColourAttribute));
|
||||||
|
factory.add(ctx, CAR_MODEL_ATTRIBUTE_USE_ID, createAttributeUse(ctx,carAttributeSet, carModelAttribute));
|
||||||
|
factory.add(ctx, CAR_TRX_ATTRIBUTE_USE_ID, createAttributeUse(ctx,carAttributeSet, carTrxAttribute));
|
||||||
|
factory.add(ctx, CAR_YEAR_ATTRIBUTE_USE_ID, createAttributeUse(ctx,carAttributeSet, carYearAttribute));
|
||||||
|
|
||||||
|
UDIMAttributeSet bikeAttributeSet = (UDIMAttributeSet) ProductAttributeSetFactory.getFactoryInstance(ctx).get(ctx, ProductAttributeSetFactory.ATTRIBUTE_SET_BIKE_ID);
|
||||||
|
UDIMAttribute bikeMakeAttribute = (UDIMAttribute) ProductAttributeSetFactory.getFactoryInstance(ctx).get(ctx, ProductAttributeFactory.ATTRIBUTE_BIKE_MAKE_ID);
|
||||||
|
UDIMAttribute bikeColourAttribute = (UDIMAttribute) ProductAttributeFactory.getFactoryInstance().get(ctx, ProductAttributeFactory.ATTRIBUTE_BIKE_COLOUR_ID);
|
||||||
|
UDIMAttribute bikeModelAttribute = (UDIMAttribute) ProductAttributeFactory.getFactoryInstance().get(ctx, ProductAttributeFactory.ATTRIBUTE_BIKE_MODEL_ID);
|
||||||
|
UDIMAttribute bikeTrxAttribute = (UDIMAttribute) ProductAttributeFactory.getFactoryInstance().get(ctx, ProductAttributeFactory.ATTRIBUTE_BIKE_TRX_ID);
|
||||||
|
UDIMAttribute bikeYearAttribute = (UDIMAttribute) ProductAttributeFactory.getFactoryInstance().get(ctx,ProductAttributeFactory.ATTRIBUTE_BIKE_YEAR_ID);
|
||||||
|
|
||||||
|
factory.add(ctx, BIKE_MAKE_ATTRIBUTE_USE_ID, createAttributeUse(ctx, carAttributeSet, bikeMakeAttribute));
|
||||||
|
factory.add(ctx, BIKE_COLOUR_ATTRIBUTE_USE_ID, createAttributeUse(ctx,bikeAttributeSet, bikeColourAttribute));
|
||||||
|
factory.add(ctx, BIKE_MODEL_ATTRIBUTE_USE_ID, createAttributeUse(ctx,bikeAttributeSet, bikeModelAttribute));
|
||||||
|
factory.add(ctx, BIKE_TRX_ATTRIBUTE_USE_ID, createAttributeUse(ctx,bikeAttributeSet, bikeTrxAttribute));
|
||||||
|
factory.add(ctx,BIKE_YEAR_ATTRIBUTE_USE_ID, createAttributeUse(ctx,bikeAttributeSet, bikeYearAttribute));
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ProductAttributeUseFactory getFactoryInstance(Properties ctx) throws Exception
|
||||||
|
{
|
||||||
|
if (productAttributeUseFactory == null)
|
||||||
|
productAttributeUseFactory = new ProductAttributeUseFactory();
|
||||||
|
|
||||||
|
return productAttributeUseFactory;
|
||||||
|
}
|
||||||
|
|
||||||
|
private UDIMAttributeUse createAttributeUse(Properties ctx, UDIMAttributeSet attributeSet, UDIMAttribute attribute)
|
||||||
|
{
|
||||||
|
|
||||||
|
MAttributeUse attributeUse = new MAttributeUse(ctx, 0, null);
|
||||||
|
attributeUse.setM_AttributeSet_ID(attributeSet.getID());
|
||||||
|
attributeUse.setM_Attribute_ID(attribute.getID());
|
||||||
|
attributeUse.setSeqNo(10);
|
||||||
|
UDIMAttributeUse udiAttributeUse = new UDIMAttributeUse(attributeUse);
|
||||||
|
|
||||||
|
return udiAttributeUse;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,205 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
package org.posterita.factory;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.compiere.model.MClient;
|
||||||
|
|
||||||
|
import org.posterita.core.SystemObjects;
|
||||||
|
import org.posterita.exceptions.OperationException;
|
||||||
|
import org.posterita.exceptions.ReloadFactoryException;
|
||||||
|
import org.posterita.lib.UdiConstants;
|
||||||
|
import org.posterita.model.UDIMAssetGroup;
|
||||||
|
import org.posterita.model.UDIMDiscountSchema;
|
||||||
|
import org.posterita.model.UDIMPriceList;
|
||||||
|
import org.posterita.model.UDIMPriceListVersion;
|
||||||
|
import org.posterita.model.UDIMProductCategory;
|
||||||
|
import org.posterita.model.UDIMTax;
|
||||||
|
import org.posterita.model.UDIMTaxCategory;
|
||||||
|
|
||||||
|
|
||||||
|
public class SystemObjectsFactory extends AbstractFactory
|
||||||
|
{
|
||||||
|
|
||||||
|
public static final String PRODUCT_CATEGORY_CAR_ID = "productCategory.car.id";
|
||||||
|
public static final String TAX_CATEGORY_DEFAULT_ID = "taxCategory.default.id";
|
||||||
|
public static final String DEFAULT_BPGROUP_ID = "default.bpartner.group";
|
||||||
|
public static final String CAR_ASSET_GRP_ID = "car.assetgroup.id";
|
||||||
|
public static final String BIKE_ASSET_GRP_ID = "bike.assetgroup.id";
|
||||||
|
public static final String DEFAULT_TAX_ID = "tax.default.id";
|
||||||
|
public static final String SALES_PRICELIST_ID = "pricelist.sales.id";
|
||||||
|
public static final String PURCHASE_PRICELIST_ID = "pricelist.purchase.id";
|
||||||
|
public static final String WEBSTORE_SALES_PRICELIST_ID = "webstore.pricelist.sales.id";
|
||||||
|
|
||||||
|
public static final String PURCHASE_PRICELV_ID = "priceLV.purchase.id";
|
||||||
|
public static final String SALES_PRICELV_ID = "priceLV.sales.id";
|
||||||
|
public static final String DISCOUNT_SCHEMA_ID = "discountschema.id";
|
||||||
|
public static final String WHOLESALE_PURCHASE_PRICELIST_ID="wholesale.priceList.purchase.id";
|
||||||
|
public static final String WHOLESALE_PURCHASE_PRICELV_ID = "wholesale.priceLV.purchase.id";
|
||||||
|
public static final String WEBSTORE_SALES_PRICELV_ID = "webstore.priceLV.sales.id";
|
||||||
|
|
||||||
|
|
||||||
|
public static final String DEALER_TRANSFER_PRICELIST_ID = "dealer.transfer.pricelist.id";
|
||||||
|
public static final String DEALER_TRANSFER_PRICELV_ID = "dealer.transfer.priceLV.id";
|
||||||
|
|
||||||
|
|
||||||
|
public static final String PRODUCT_CATEGORY_USED_CAR_ID = "productCategory.usedCar.id";
|
||||||
|
public static final String USED_CAR_ASSET_GRP_ID = "usedCar.assetgroup.id";
|
||||||
|
|
||||||
|
|
||||||
|
public static final String PRODUCT_CATEGORY_BIKE_ID = "productCategory.bike.id";
|
||||||
|
public static final String PRODUCT_CATEGORY_USED_BIKE_ID = "productCategory.usedbike.id";
|
||||||
|
|
||||||
|
public static final String REQUEST_TYPE_EMAIL = "request.type.email";
|
||||||
|
|
||||||
|
|
||||||
|
private static SystemObjectsFactory systemObjectsFactory;
|
||||||
|
|
||||||
|
private SystemObjectsFactory() throws OperationException
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SystemObjectsFactory getFactoryInstance() throws OperationException
|
||||||
|
{
|
||||||
|
if (systemObjectsFactory == null)
|
||||||
|
systemObjectsFactory = new SystemObjectsFactory();
|
||||||
|
|
||||||
|
return systemObjectsFactory;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected void loadFactory(Properties ctx) throws OperationException
|
||||||
|
{
|
||||||
|
loadFactory(ctx, systemObjectsFactory);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void loadFactory(Properties ctx, AbstractFactory factory) throws OperationException
|
||||||
|
{
|
||||||
|
|
||||||
|
UDIMAssetGroup assetGroup = SystemObjects.getAssetGroup(ctx, "Car Asset Group");
|
||||||
|
factory.add(ctx, CAR_ASSET_GRP_ID, assetGroup);
|
||||||
|
assetGroup = (UDIMAssetGroup) factory.get(ctx, CAR_ASSET_GRP_ID);
|
||||||
|
|
||||||
|
UDIMProductCategory productCategory = SystemObjects.getProductCategory(ctx, "Car");
|
||||||
|
productCategory.setA_Asset_Group_ID(assetGroup.getID());
|
||||||
|
|
||||||
|
factory.add(ctx, PRODUCT_CATEGORY_CAR_ID, productCategory);
|
||||||
|
|
||||||
|
|
||||||
|
factory.add(ctx, BIKE_ASSET_GRP_ID, SystemObjects.getAssetGroup(ctx, "Bike Asset Group"));
|
||||||
|
UDIMAssetGroup bikeAssetGroup = (UDIMAssetGroup) factory.get(ctx, BIKE_ASSET_GRP_ID);
|
||||||
|
|
||||||
|
UDIMProductCategory bikeProductCategory = SystemObjects.getProductCategory(ctx, "Bike");
|
||||||
|
bikeProductCategory.setA_Asset_Group_ID(bikeAssetGroup.getID());
|
||||||
|
|
||||||
|
UDIMProductCategory usedBikeProductCategory = SystemObjects.getProductCategory(ctx, "Used Bike");
|
||||||
|
bikeProductCategory.setA_Asset_Group_ID(bikeAssetGroup.getID());
|
||||||
|
|
||||||
|
factory.add(ctx, PRODUCT_CATEGORY_BIKE_ID, bikeProductCategory);
|
||||||
|
factory.add(ctx, PRODUCT_CATEGORY_USED_BIKE_ID, usedBikeProductCategory);
|
||||||
|
|
||||||
|
|
||||||
|
factory.add(ctx, USED_CAR_ASSET_GRP_ID, SystemObjects.getAssetGroup(ctx, "Car Asset Group"));
|
||||||
|
UDIMAssetGroup usedCarAssetGroup = (UDIMAssetGroup) factory.get(ctx, USED_CAR_ASSET_GRP_ID);
|
||||||
|
|
||||||
|
UDIMProductCategory usedCarProductCategory = SystemObjects.getProductCategory(ctx, "Used Car");
|
||||||
|
usedCarProductCategory.setA_Asset_Group_ID(usedCarAssetGroup.getID());
|
||||||
|
|
||||||
|
factory.add(ctx, PRODUCT_CATEGORY_USED_CAR_ID, usedCarProductCategory);
|
||||||
|
|
||||||
|
factory.add(ctx, TAX_CATEGORY_DEFAULT_ID, SystemObjects.getTaxCategory(ctx, "Default Tax Category"));
|
||||||
|
UDIMTaxCategory taxCategory = (UDIMTaxCategory) factory.get(ctx, TAX_CATEGORY_DEFAULT_ID);
|
||||||
|
|
||||||
|
UDIMTax tax = SystemObjects.getTax(ctx, "Udi tax", UdiConstants.COUNTRY_MAURITIUS, "default udi tax");
|
||||||
|
tax.setC_Tax_Category_ID(taxCategory.getID());
|
||||||
|
factory.add(ctx, DEFAULT_TAX_ID, tax);
|
||||||
|
|
||||||
|
factory.add(ctx, PURCHASE_PRICELIST_ID, SystemObjects.getPriceList(ctx, "Standard Purchase Price List", MClient.get(ctx).getC_Currency_ID()));
|
||||||
|
factory.add(ctx, SALES_PRICELIST_ID, SystemObjects.getPriceList(ctx, "Standard Sales Price List", MClient.get(ctx).getC_Currency_ID()));
|
||||||
|
// systemObjectsFactory.add(ctx, WEBSTORE_SALES_PRICELIST_ID, SystemObjects.getPriceList(ctx, "Webstore Sales Price List Euro", UdiConstants.CURRENCY_EURO));
|
||||||
|
|
||||||
|
factory.add(ctx, DISCOUNT_SCHEMA_ID, SystemObjects.getDiscountSchema(ctx, "Udi Discount Schema"));
|
||||||
|
|
||||||
|
factory.add(ctx, WHOLESALE_PURCHASE_PRICELIST_ID, SystemObjects.getPriceList(ctx,"Wholesale Purchase Price List", MClient.get(ctx).getC_Currency_ID()));
|
||||||
|
factory.add(ctx, DISCOUNT_SCHEMA_ID, SystemObjects.getDiscountSchema(ctx, "Udi Discount Schema"));
|
||||||
|
|
||||||
|
UDIMPriceList purchasePL = (UDIMPriceList) factory.get(ctx, PURCHASE_PRICELIST_ID);
|
||||||
|
// UDIMPriceList webstoreSalesPL = (UDIMPriceList) systemObjectsFactory.get(ctx, WEBSTORE_SALES_PRICELIST_ID);
|
||||||
|
UDIMPriceList salesPL = (UDIMPriceList) factory.get(ctx, SALES_PRICELIST_ID);
|
||||||
|
UDIMDiscountSchema discountSchema = (UDIMDiscountSchema) factory.get(ctx, DISCOUNT_SCHEMA_ID);
|
||||||
|
|
||||||
|
UDIMPriceList WholesalePurchasePL = (UDIMPriceList) factory.get(ctx, WHOLESALE_PURCHASE_PRICELIST_ID);
|
||||||
|
|
||||||
|
UDIMPriceListVersion purchasePLV = SystemObjects.getPriceListVersion(ctx, "Purchase Price List");
|
||||||
|
purchasePLV.setM_DiscountSchema_ID(discountSchema.getID());
|
||||||
|
purchasePLV.setM_PriceList_ID(purchasePL.getID());
|
||||||
|
|
||||||
|
factory.add(ctx, PURCHASE_PRICELV_ID, purchasePLV);
|
||||||
|
|
||||||
|
// UDIMPriceListVersion webstoreSalesPLV = SystemObjects.getPriceListVersion(ctx, "Webstore Sales Price List");
|
||||||
|
// webstoreSalesPLV.setM_DiscountSchema_ID(discountSchema.getID());
|
||||||
|
// webstoreSalesPLV.setM_PriceList_ID(webstoreSalesPL.getID());
|
||||||
|
//
|
||||||
|
// systemObjectsFactory.add(ctx, WEBSTORE_SALES_PRICELV_ID, webstoreSalesPLV);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
UDIMPriceListVersion WholesalePurchasePLV = SystemObjects.getPriceListVersion(ctx, "Wholesale Price List");
|
||||||
|
WholesalePurchasePLV.setM_DiscountSchema_ID(discountSchema.getID());
|
||||||
|
WholesalePurchasePLV.setM_PriceList_ID(WholesalePurchasePL.getID());
|
||||||
|
|
||||||
|
factory.add(ctx, WHOLESALE_PURCHASE_PRICELV_ID, WholesalePurchasePLV);
|
||||||
|
|
||||||
|
UDIMPriceListVersion salesPLV = SystemObjects.getPriceListVersion(ctx, "Retail Price List");
|
||||||
|
salesPLV.setM_DiscountSchema_ID(discountSchema.getID());
|
||||||
|
salesPLV.setM_PriceList_ID(salesPL.getID());
|
||||||
|
|
||||||
|
factory.add(ctx, SALES_PRICELV_ID, salesPLV);
|
||||||
|
|
||||||
|
UDIMPriceList dealerTransferPriceList = SystemObjects.getPriceList(ctx, "Standard Dealer Transfer Price List", MClient.get(ctx).getC_Currency_ID());
|
||||||
|
factory.add(ctx, DEALER_TRANSFER_PRICELIST_ID, dealerTransferPriceList);
|
||||||
|
|
||||||
|
UDIMPriceListVersion dealerTransferPLV = SystemObjects.getPriceListVersion(ctx, "Retail Price List");
|
||||||
|
dealerTransferPLV.setM_DiscountSchema_ID(discountSchema.getID());
|
||||||
|
dealerTransferPLV.setM_PriceList_ID(dealerTransferPriceList.getID());
|
||||||
|
factory.add(ctx, DEALER_TRANSFER_PRICELV_ID, dealerTransferPLV);
|
||||||
|
|
||||||
|
|
||||||
|
/*UDIMRequestType emailRequestType = SystemObjects.getRequestType(ctx, "EMail");
|
||||||
|
systemObjectsFactory.add(ctx, REQUEST_TYPE_EMAIL, emailRequestType);*/
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void reloadFactory(Properties ctx) throws ReloadFactoryException
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
SystemObjectsFactory nFactory = new SystemObjectsFactory();
|
||||||
|
nFactory.initFactory(ctx, nFactory);
|
||||||
|
systemObjectsFactory = nFactory;
|
||||||
|
}
|
||||||
|
catch(OperationException ex)
|
||||||
|
{
|
||||||
|
throw new ReloadFactoryException("Could not reload SystemObjectsFactory", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,92 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
package org.posterita.factory;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.compiere.model.MBPartner;
|
||||||
|
import org.compiere.model.MOrg;
|
||||||
|
import org.compiere.model.MUser;
|
||||||
|
import org.compiere.util.Env;
|
||||||
|
|
||||||
|
import org.posterita.core.SystemObjects;
|
||||||
|
import org.posterita.exceptions.OperationException;
|
||||||
|
import org.posterita.model.UDIMUser;
|
||||||
|
import org.posterita.model.UDIPO;
|
||||||
|
|
||||||
|
|
||||||
|
public class UserFactory extends AbstractFactory
|
||||||
|
{
|
||||||
|
private static UserFactory singleton;
|
||||||
|
|
||||||
|
public static final String SUPER_USER_ID = "superUser.id";
|
||||||
|
public static String UDI_ADMIN_ID = "udiAdmin.id";
|
||||||
|
public static String HSAFAUTO_ADMIN_ID = "hsafAuto.admin.id";
|
||||||
|
public static String HSAFWING_ADMIN_ID = "hsafWing.Admin.id";
|
||||||
|
|
||||||
|
private UserFactory() throws OperationException
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static UserFactory getFactoryInstance() throws OperationException
|
||||||
|
{
|
||||||
|
if (singleton == null)
|
||||||
|
singleton = new UserFactory();
|
||||||
|
|
||||||
|
return singleton;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void loadFactory(Properties ctx) throws OperationException
|
||||||
|
{
|
||||||
|
loadFactory(ctx, singleton);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void loadFactory(Properties ctx, AbstractFactory factory) throws OperationException
|
||||||
|
{
|
||||||
|
factory.add(ctx, SUPER_USER_ID, createUser(ctx, SystemObjects.getSuperUser(ctx)));
|
||||||
|
// singleton.add(UDI_ADMIN_ID, createUser(ctx, SystemObjects.getUdiAdmin(ctx)));
|
||||||
|
// singleton.add(HSAFAUTO_ADMIN_ID, createUser(ctx, SystemObjects.getHsafAuto(ctx)));
|
||||||
|
// singleton.add(HSAFWING_ADMIN_ID, createUser(ctx, SystemObjects.getHsafWing(ctx)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private UDIPO createUser(Properties ctx, MUser mUser) throws OperationException
|
||||||
|
{
|
||||||
|
MUser user = new MUser(ctx, 0, null);
|
||||||
|
user.setName(mUser.getName());
|
||||||
|
user.setPassword(mUser.getPassword());
|
||||||
|
user.setEMail(mUser.getEMail());
|
||||||
|
|
||||||
|
int ad_org_id = Env.getAD_Org_ID(ctx);
|
||||||
|
MOrg org = new MOrg(ctx, ad_org_id, null);
|
||||||
|
|
||||||
|
// Is it necessary, taking business partner of the organisation.
|
||||||
|
// Should create a bpartner for this user.
|
||||||
|
// DefaultUser, Should maybe call a manager here.
|
||||||
|
MBPartner bpartner = new MBPartner(ctx, org.getLinkedC_BPartner_ID(null), null);
|
||||||
|
|
||||||
|
user.setC_BPartner_ID(bpartner.get_ID());
|
||||||
|
|
||||||
|
UDIMUser udiMuser = new UDIMUser(user);
|
||||||
|
|
||||||
|
return udiMuser;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,86 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
package org.posterita.factory;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.posterita.exceptions.OperationException;
|
||||||
|
|
||||||
|
|
||||||
|
public class UserRoleFactory extends AbstractFactory
|
||||||
|
{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void loadFactory(Properties ctx) throws OperationException
|
||||||
|
{
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void loadFactory(Properties ctx, AbstractFactory factory) throws OperationException
|
||||||
|
{
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
/*private static UserRoleFactory singleton;
|
||||||
|
|
||||||
|
public static final String USER_ROLE_SUPER_USER_ID = "user.role.superUser.id";
|
||||||
|
|
||||||
|
private UserRoleFactory() throws OperationException
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static UserRoleFactory getFactoryInstance() throws Exception
|
||||||
|
{
|
||||||
|
if (singleton ==null)
|
||||||
|
singleton = new UserRoleFactory();
|
||||||
|
|
||||||
|
return singleton;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void loadFactory(Properties ctx) throws OperationException
|
||||||
|
{
|
||||||
|
//TODO Change the key
|
||||||
|
singleton.add(ctx, USER_ROLE_SUPER_USER_ID, createUserRole(ctx,UserFactory.SUPER_USER_ID, RoleFactory.ROLE_SYSTEM_ADMINISTRATOR_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
private UDIPO createUserRole(Properties ctx, String userKey, String roleKey) throws OperationException
|
||||||
|
{
|
||||||
|
MUserRoles userRoles = new MUserRoles(ctx, 0, null);
|
||||||
|
|
||||||
|
UserFactory userFactory = UserFactory.getFactoryInstance();
|
||||||
|
UDIMUser udiMUser = (UDIMUser) userFactory.get(ctx, userKey);
|
||||||
|
|
||||||
|
RoleFactory roleFactory = RoleFactory.getFactoryInstance();
|
||||||
|
UDIMRole udiMRole = (UDIMRole) roleFactory.get(ctx, roleKey);
|
||||||
|
|
||||||
|
userRoles.setAD_User_ID(udiMUser.getID());
|
||||||
|
userRoles.setAD_Role_ID(udiMRole.getID());
|
||||||
|
|
||||||
|
UDIMUserRoles udiUserRoles = new UDIMUserRoles(userRoles);
|
||||||
|
|
||||||
|
return udiUserRoles;
|
||||||
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
/**
|
||||||
|
* 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 12-Oct-2005
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.factory;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.posterita.exceptions.OperationException;
|
||||||
|
|
||||||
|
public interface WebProperties
|
||||||
|
{
|
||||||
|
public void put(Properties ctx, String key, String value) throws OperationException;
|
||||||
|
public String get(Properties ctx, String key) throws OperationException;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
/**
|
||||||
|
* 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 26-Aug-2005 by alok
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.AttachmentBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class AttachmentForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public AttachmentForm()
|
||||||
|
{
|
||||||
|
setBean(new AttachmentBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
/**
|
||||||
|
* 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 Jun 15, 2006
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.AttributeBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class AttributeForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public AttributeForm()
|
||||||
|
{
|
||||||
|
setBean(new AttributeBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
/**
|
||||||
|
* 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 May 23, 2006 by ashley
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.AttributeValueDetailBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class AttributeValuesForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public AttributeValuesForm()
|
||||||
|
{
|
||||||
|
setBean(new AttributeValueDetailBean());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
/**
|
||||||
|
* 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 Jul 26, 2006
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.BPartnerInfoBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class BPartnerInfoForm extends DefaultForm
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public BPartnerInfoForm()
|
||||||
|
{
|
||||||
|
setBean(new BPartnerInfoBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
/**
|
||||||
|
* 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 26-Jul-2005 by alok
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.BankBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class BankForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public BankForm()
|
||||||
|
{
|
||||||
|
setBean(new BankBean());
|
||||||
|
addRequiredFields(new String[]{"bankName"});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
/**
|
||||||
|
* 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 26-Jul-2005 by alok
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.BlackListedBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class BlackListForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public BlackListForm()
|
||||||
|
{
|
||||||
|
setBean(new BlackListedBean());
|
||||||
|
//addRequiredFields(new String[] {"bankName", "chequeNo"});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
/**
|
||||||
|
* 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 May 5, 2006
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.CashBookDetailBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class CashBookDetailForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public CashBookDetailForm()
|
||||||
|
{
|
||||||
|
setBean(new CashBookDetailBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
/**
|
||||||
|
* 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 Sep 11, 2006 by ashley
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
@author ashley
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.CashBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class CashForm extends DefaultForm
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public CashForm()
|
||||||
|
{
|
||||||
|
this.setBean(new CashBean());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ChangeDocumentStatusBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class ChangeDocumentStatusForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public ChangeDocumentStatusForm()
|
||||||
|
{
|
||||||
|
setBean(new ChangeDocumentStatusBean());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
/**
|
||||||
|
* 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 29, 2005 by din
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ChangePasswordBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class ChangePasswordForm extends DefaultForm
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public ChangePasswordForm()
|
||||||
|
{
|
||||||
|
setBean(new ChangePasswordBean());
|
||||||
|
addRequiredFields(new String[] {"oldPassword","newPassword","confirmPassword"});
|
||||||
|
addMatchFields("newPassword","confirmPassword");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
/**
|
||||||
|
* 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 Nov 7, 2006
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.CommissionBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class CommissionForm extends DefaultForm
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public CommissionForm()
|
||||||
|
{
|
||||||
|
this.setBean(new CommissionBean());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
/**
|
||||||
|
* 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 25-Jul-2005 by alok
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.BPartnerBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class CreateBPartnerForm extends DefaultForm
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public CreateBPartnerForm()
|
||||||
|
{
|
||||||
|
setBean( new BPartnerBean());
|
||||||
|
addRequiredFields(new String[]{"partnerName","name2","address1"});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
/**
|
||||||
|
* 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 Jul 26, 2005 by praveen
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.BankAccountBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class CreateBankAccountForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public CreateBankAccountForm()
|
||||||
|
{
|
||||||
|
setBean(new BankAccountBean());
|
||||||
|
addRequiredFields(new String[]{"bankId","accountNo","accountType","currentBalance"});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
/**
|
||||||
|
* 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 26-Jul-2005 by alok
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.LocatorBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class CreateLocatorForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public CreateLocatorForm()
|
||||||
|
{
|
||||||
|
setBean(new LocatorBean());
|
||||||
|
addRequiredFields(new String[]{"aisle","bin","level"});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
/**
|
||||||
|
* 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 Jul 28, 2005 by praveen
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ProductAttributeBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class CreateProductAttributeForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public CreateProductAttributeForm()
|
||||||
|
{
|
||||||
|
setBean(new ProductAttributeBean());
|
||||||
|
//addRequiredFields(new String[]{"attributeValue"});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
/**
|
||||||
|
* 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 Jul 28, 2005 by praveen
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ProductAttributeBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class CreateProductAttributeValueForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public CreateProductAttributeValueForm()
|
||||||
|
{
|
||||||
|
setBean(new ProductAttributeBean());
|
||||||
|
addRequiredFields(new String[]{"attributeValue"});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
/**
|
||||||
|
* 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 Jul 29, 2005 by din
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.UserBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class CreateUserForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public CreateUserForm()
|
||||||
|
{
|
||||||
|
setBean(new UserBean());
|
||||||
|
addRequiredFields(new String[]{"username", "password", "confirmPassword","userPIN"});
|
||||||
|
addMatchFields("password","confirmPassword");
|
||||||
|
//addEmailValidation("email");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
/**
|
||||||
|
* 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 Jul 26, 2005 by din
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.WarehouseBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class CreateWarehouseForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public CreateWarehouseForm()
|
||||||
|
{
|
||||||
|
setBean(new WarehouseBean());
|
||||||
|
addRequiredFields(new String [] {"warehouseName", "address1", "city", "postalAddress", "regionId", "isPublic"});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
/**
|
||||||
|
* 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 02-Sep-2005
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.CustomerBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class CreditCardForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public CreditCardForm()
|
||||||
|
{
|
||||||
|
|
||||||
|
setBean(new CustomerBean());
|
||||||
|
addRequiredFields(new String[]{"creditCardNumber", "cvv", "creditCardExpMonth", "creditCardExpYear"});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
/**
|
||||||
|
* 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 May 5, 2006
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.CurrentTillAmountBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class CurrenrPOSBalanceForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public CurrenrPOSBalanceForm()
|
||||||
|
{
|
||||||
|
setBean(new CurrentTillAmountBean());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
/**
|
||||||
|
* 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 02-Sep-2005
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.CustomerBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class CustomerAndCreditCardForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public CustomerAndCreditCardForm()
|
||||||
|
{
|
||||||
|
setBean(new CustomerBean());
|
||||||
|
|
||||||
|
addRequiredFields(new String[]{"creditCardPayment","username","userSurname", "email", "address1","address2","city","countryId"});
|
||||||
|
addCreditCardFieldsValidation("creditCardPayment");
|
||||||
|
addCVVFieldsValidation("creditCardPayment");
|
||||||
|
addCreditCardExpiryDateFieldsValidation("creditCardPayment");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,48 @@
|
||||||
|
/**
|
||||||
|
* 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 02-Sep-2005
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.CustomerBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class CustomerForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public CustomerForm()
|
||||||
|
{
|
||||||
|
|
||||||
|
setBean(new CustomerBean());
|
||||||
|
addRequiredFields(new String[]{
|
||||||
|
"partnerName"
|
||||||
|
,"surname"
|
||||||
|
,"address1"
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
/**
|
||||||
|
* 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 Sep 11, 2006 by ashley
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
@author ashley
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.DateFilterBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class DateFilterForm extends DefaultForm
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public DateFilterForm()
|
||||||
|
{
|
||||||
|
this.setBean(new DateFilterBean());
|
||||||
|
addRequiredFields(new String[]{"fromDate", "toDate"});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
/**
|
||||||
|
* 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 12-Aug-2005 by alok
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.DocumentBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class DocumentForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public DocumentForm()
|
||||||
|
{
|
||||||
|
setBean(new DocumentBean());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
/**
|
||||||
|
* 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 25-Jul-2005 by alok
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.DocumentHistoryBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class DocumentHistoryForm extends DefaultForm
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public DocumentHistoryForm()
|
||||||
|
{
|
||||||
|
setBean( new DocumentHistoryBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
/**
|
||||||
|
* 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 Oct 27, 2006
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.DunningBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class DunningForm extends DefaultForm
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public DunningForm()
|
||||||
|
{
|
||||||
|
setBean( new DunningBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
/**
|
||||||
|
* 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 May 24, 2006 by ashley
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.AttributeValueDetailBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class EditAttributeForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public EditAttributeForm()
|
||||||
|
{
|
||||||
|
this.setBean(new AttributeValueDetailBean());
|
||||||
|
this.addRequiredFields(new String[]{"newName"});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
/**
|
||||||
|
* 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 Oct 20, 2005 by praveen
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.EditPriceBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class EditPriceListForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public EditPriceListForm()
|
||||||
|
{
|
||||||
|
setBean(new EditPriceBean());
|
||||||
|
addRequiredFields(new String[]{"price"});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
/**
|
||||||
|
* 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 4, 2005 by praveen
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ProductBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class EditProductForm extends DefaultForm
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public EditProductForm()
|
||||||
|
{
|
||||||
|
setBean(new ProductBean());
|
||||||
|
//addRequiredFields(new String[] {"productName","revenueRecognition","description"});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
/**
|
||||||
|
* 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 Jun 30, 2006
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ProductBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class GarmentForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public GarmentForm()
|
||||||
|
{
|
||||||
|
setBean(new ProductBean());
|
||||||
|
addRequiredFields(new String[] {"description","brandName","modelName","revenueRecognition","designName","colourName","purchasePriceStandard","salesPriceStandard"});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.PaymentBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class GeneralPaymentForm extends DefaultForm
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public GeneralPaymentForm()
|
||||||
|
{
|
||||||
|
setBean(new PaymentBean());
|
||||||
|
addRequiredFields(new String[]{"amount","bpartnerId"});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.GenericProductBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class GenericProductForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public GenericProductForm()
|
||||||
|
{
|
||||||
|
setBean(new GenericProductBean());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
/**
|
||||||
|
* 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 16, 2005 by praveen
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.InOutHistoryBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class InOutHistoryForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public InOutHistoryForm()
|
||||||
|
{
|
||||||
|
setBean(new InOutHistoryBean());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
/**
|
||||||
|
* 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 Jan 16, 2007
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.CustomerBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class InitCustomerForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public InitCustomerForm()
|
||||||
|
{
|
||||||
|
setBean(new CustomerBean());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
/**
|
||||||
|
* 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 Dec 8, 2006
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.InventoryBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class InventoryForm extends DefaultForm
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public InventoryForm()
|
||||||
|
{
|
||||||
|
setBean( new InventoryBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
/**
|
||||||
|
* 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 15, 2005 by praveen
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.InvoiceHistoryBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class InvoiceHistoryForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public InvoiceHistoryForm()
|
||||||
|
{
|
||||||
|
setBean(new InvoiceHistoryBean());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
/**
|
||||||
|
* 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 11-Aug-2005 by alok
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.OrderLineBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class InvokeOrderForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public InvokeOrderForm()
|
||||||
|
{
|
||||||
|
setBean(new OrderLineBean());
|
||||||
|
addRequiredFields(new String[]{"documentNo"});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ItemBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class ItemForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public ItemForm()
|
||||||
|
{
|
||||||
|
setBean(new ItemBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.LoginBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class LoginForm extends DefaultForm
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public LoginForm()
|
||||||
|
{
|
||||||
|
setBean(new LoginBean());
|
||||||
|
//addRequiredFields(new String[] {"username", "password"});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
/**
|
||||||
|
* 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 15, 2005 by din
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.LoginBean;
|
||||||
|
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class LoginUserForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public LoginUserForm()
|
||||||
|
{
|
||||||
|
setBean(new LoginBean());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
/**
|
||||||
|
* 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 26-Jul-2005 by alok
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.MenuItemBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class MenuItemForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public MenuItemForm()
|
||||||
|
{
|
||||||
|
setBean(new MenuItemBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
/**
|
||||||
|
* 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 Oct 17, 2006
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.OpenItemBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class OpenItemForm extends DefaultForm
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public OpenItemForm()
|
||||||
|
{
|
||||||
|
setBean( new OpenItemBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
/**
|
||||||
|
@author ashley
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.OrderBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class OrderForm extends DefaultForm
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public OrderForm()
|
||||||
|
{
|
||||||
|
this.setBean(new OrderBean());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
/**
|
||||||
|
* 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 04-Aug-2005 by alok
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.OrderHistoryBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class OrderHistoryForm extends DefaultForm
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public OrderHistoryForm()
|
||||||
|
{
|
||||||
|
setBean(new OrderHistoryBean());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
/**
|
||||||
|
* 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 11-Aug-2005 by alok
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.OrderLineBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class OrderLineForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public OrderLineForm()
|
||||||
|
{
|
||||||
|
setBean(new OrderLineBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.OrgBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class OrgForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public OrgForm()
|
||||||
|
{
|
||||||
|
setBean(new OrgBean());
|
||||||
|
addRequiredFields(new String[]{"orgName","address1","city","postalAddress"});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.UDIBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class OrgTypeForm extends DefaultForm
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public OrgTypeForm()
|
||||||
|
{
|
||||||
|
setBean(new UDIBean());
|
||||||
|
addRequiredFields(new String[] {"orgType"});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
/**
|
||||||
|
* 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 May 5, 2006
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.POSDescriptionBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class POSDescriptionForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public POSDescriptionForm()
|
||||||
|
{
|
||||||
|
setBean(new POSDescriptionBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
/**
|
||||||
|
* 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 22-Mar-2006
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
|
||||||
|
import org.posterita.beans.POSBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class POSForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public POSForm()
|
||||||
|
{
|
||||||
|
setBean(new POSBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,65 @@
|
||||||
|
/**
|
||||||
|
* 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 May 15, 2006
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import java.util.Calendar;
|
||||||
|
|
||||||
|
import org.posterita.beans.POSHistoryBean;
|
||||||
|
import org.posterita.exceptions.ApplicationException;
|
||||||
|
import org.posterita.exceptions.OperationException;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class POSHistoryForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public POSHistoryForm() throws OperationException
|
||||||
|
{
|
||||||
|
setBean(new POSHistoryBean());
|
||||||
|
initForm();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initForm() throws OperationException
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Calendar cal = Calendar.getInstance();
|
||||||
|
POSHistoryBean bean = (POSHistoryBean) getBean();
|
||||||
|
|
||||||
|
bean.setMonth(Integer.valueOf(cal.get(Calendar.MONTH) + 1));
|
||||||
|
bean.setYear(Integer.valueOf(cal.get(Calendar.YEAR)));
|
||||||
|
|
||||||
|
month = bean.getMonth().toString();
|
||||||
|
year = bean.getYear().toString();
|
||||||
|
}
|
||||||
|
catch (ApplicationException e)
|
||||||
|
{
|
||||||
|
throw new OperationException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
/**
|
||||||
|
* 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 May 5, 2006
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.POSInfoBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class POSInfoForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public POSInfoForm()
|
||||||
|
{
|
||||||
|
setBean(new POSInfoBean());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
/**
|
||||||
|
* 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 11-Aug-2005 by alok
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.OrderLineBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class POSOrderLineForm2 extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public POSOrderLineForm2()
|
||||||
|
{
|
||||||
|
setBean(new OrderLineBean());
|
||||||
|
|
||||||
|
addRequiredFields(new String[] {"bpartnerId"});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ProductBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class POSProductForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public POSProductForm()
|
||||||
|
{
|
||||||
|
setBean(new ProductBean());
|
||||||
|
addRequiredFields(new String[] {"productName","purchasePriceStandard","description","salesPriceStandard","salesPriceLimit","salesPriceList"});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
/**
|
||||||
|
* 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 May 11, 2006
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.POSReportBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class POSReportForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public POSReportForm()
|
||||||
|
{
|
||||||
|
setBean(new POSReportBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
/**
|
||||||
|
* 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 May 8, 2006
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.POSStockBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class POSStockForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public POSStockForm()
|
||||||
|
{
|
||||||
|
setBean(new POSStockBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
/**
|
||||||
|
* 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 May 8, 2006
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.POSSupplierBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class POSSupplierForm extends DefaultForm
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public POSSupplierForm()
|
||||||
|
{
|
||||||
|
setBean(new POSSupplierBean());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
/**
|
||||||
|
* 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 Oct 30, 2006
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.PaymentAllocationBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class PaymentAllocationForm extends DefaultForm
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public PaymentAllocationForm()
|
||||||
|
{
|
||||||
|
setBean( new PaymentAllocationBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
* 08-Dec-2006 14:08:03 by praveen
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.PaymentBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class PaymentForm extends DefaultForm
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public PaymentForm()
|
||||||
|
{
|
||||||
|
setBean(new PaymentBean());
|
||||||
|
addRequiredFields(new String[]{"amount", "allocateAmount"});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
/**
|
||||||
|
* 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 15, 2005 by praveen
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.PaymentHistoryBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class PaymentHistoryForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public PaymentHistoryForm()
|
||||||
|
{
|
||||||
|
setBean(new PaymentHistoryBean());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
/**
|
||||||
|
* 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 Nov 1, 2006
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
import org.apache.struts.action.ActionErrors;
|
||||||
|
import org.apache.struts.action.ActionMapping;
|
||||||
|
|
||||||
|
import org.posterita.beans.PaymentTermBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class PaymentTermForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public PaymentTermForm()
|
||||||
|
{
|
||||||
|
setBean(new PaymentTermBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request)
|
||||||
|
{
|
||||||
|
//some custom validation
|
||||||
|
|
||||||
|
if("true".equalsIgnoreCase(getFixedDueDate()))
|
||||||
|
{
|
||||||
|
addRequiredFields(new String[]{"paymentTermName","fixedMonthDay","fixedMonthOffset","fiedMonthCutoff"});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
addRequiredFields(new String[]{"paymentTermName","netDays"});
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.validate(mapping, request);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
/**
|
||||||
|
* 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 Dec 28, 2006
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.PaymentTermBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class PaymentTermForm2 extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public PaymentTermForm2()
|
||||||
|
{
|
||||||
|
setBean(new PaymentTermBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class PriceCheckForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public PriceCheckForm()
|
||||||
|
{
|
||||||
|
addRequiredFields(new String[]{"barCode"});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
/**
|
||||||
|
* 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.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.PriceListBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class PriceListForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public PriceListForm()
|
||||||
|
{
|
||||||
|
setBean(new PriceListBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
/**
|
||||||
|
* 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 1, 2005 by praveen
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ProductAttributeBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class ProductAttributeForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public ProductAttributeForm()
|
||||||
|
{
|
||||||
|
setBean(new ProductAttributeBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
/**
|
||||||
|
* 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 1, 2005 by praveen
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ProductAttributeBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class ProductAttributeValueForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public ProductAttributeValueForm()
|
||||||
|
{
|
||||||
|
setBean(new ProductAttributeBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
/**
|
||||||
|
@author ashley
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ProductDetailsBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class ProductDetailInfoForm extends DefaultForm
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public ProductDetailInfoForm()
|
||||||
|
{
|
||||||
|
this.setBean(new ProductDetailsBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
/**
|
||||||
|
* 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 4, 2005 by praveen
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ProductBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class ProductForm extends DefaultForm
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public ProductForm()
|
||||||
|
{
|
||||||
|
setBean(new ProductBean());
|
||||||
|
addRequiredFields(new String[] {"productName","revenueRecognition","description"});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
/**
|
||||||
|
* 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 Mar 14, 2006 by praveen
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ProductImageBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class ProductImageForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public ProductImageForm()
|
||||||
|
{
|
||||||
|
setBean(new ProductImageBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
/**
|
||||||
|
* 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 May 12, 2006 by ashley
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ProductKeywordsBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class ProductKeywordsForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public ProductKeywordsForm()
|
||||||
|
{
|
||||||
|
setBean(new ProductKeywordsBean());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
/**
|
||||||
|
* 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 30, 2005 by praveen
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ProductRestrictionBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class ProductRestrictionForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public ProductRestrictionForm()
|
||||||
|
{
|
||||||
|
setBean(new ProductRestrictionBean());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
/**
|
||||||
|
* 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 May 17, 2006 by ashley
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ProductSearchBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class ProductSearchForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public ProductSearchForm()
|
||||||
|
{
|
||||||
|
//this.setIsActive("true");
|
||||||
|
//this.setIsWebstoreFeatured("true");
|
||||||
|
setBean(new ProductSearchBean());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
/**
|
||||||
|
* 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 Feb 9, 2006 by praveen
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ProductStatusBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class ProductStatusForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public ProductStatusForm()
|
||||||
|
{
|
||||||
|
setBean(new ProductStatusBean());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
/**
|
||||||
|
* 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 Jan 26, 2007
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.RemoveSessionBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class RemoveSessionForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public RemoveSessionForm()
|
||||||
|
{
|
||||||
|
setBean(new RemoveSessionBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ReportBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class ReportForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public ReportForm()
|
||||||
|
{
|
||||||
|
//initForm();
|
||||||
|
setBean(new ReportBean());
|
||||||
|
addRequiredFields(new String[]{"fromDate", "toDate"});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ReportImageBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class ReportImageForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public ReportImageForm()
|
||||||
|
{
|
||||||
|
setBean(new ReportImageBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
/**
|
||||||
|
* 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 Sep 11, 2006 by ashley
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
@author ashley
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class ReportSummaryHistoryForm extends DefaultForm
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
/**
|
||||||
|
* 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 16, 2005 by praveen
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.RoleBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class RoleForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public RoleForm()
|
||||||
|
{
|
||||||
|
setBean(new RoleBean());
|
||||||
|
addRequiredFields(new String[]{"name"});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
* 14-Jul-2006 13:57:30 by praveen
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.SalesAnalysisReportBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class SalesAnalysisReportForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public SalesAnalysisReportForm()
|
||||||
|
{
|
||||||
|
setBean(new SalesAnalysisReportBean());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ReportBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class SalesReportForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public SalesReportForm()
|
||||||
|
{
|
||||||
|
//initForm();
|
||||||
|
setBean(new ReportBean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
/**
|
||||||
|
* 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 Apr 27, 2006 by ashley
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.StockBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
public class SearchProductForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public SearchProductForm()
|
||||||
|
{
|
||||||
|
setBean(new StockBean());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
* */
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ApplicationParametersBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class SetApplicationParametersForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public SetApplicationParametersForm()
|
||||||
|
{
|
||||||
|
setBean(new ApplicationParametersBean());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ShipperBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class ShipperForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public ShipperForm()
|
||||||
|
{
|
||||||
|
setBean(new ShipperBean());
|
||||||
|
addRequiredFields(new String[] {"name"});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
/**
|
||||||
|
* 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 Nov 7, 2006
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.ReportBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class SingleDateFilterForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public SingleDateFilterForm()
|
||||||
|
{
|
||||||
|
//initForm();
|
||||||
|
setBean(new ReportBean());
|
||||||
|
addRequiredFields(new String[]{"fromDate"});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
package org.posterita.form;
|
||||||
|
|
||||||
|
import org.posterita.beans.StockBean;
|
||||||
|
import org.posterita.struts.core.DefaultForm;
|
||||||
|
|
||||||
|
|
||||||
|
public class StockForm extends DefaultForm
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public StockForm()
|
||||||
|
{
|
||||||
|
setBean(new StockBean());
|
||||||
|
addRequiredFields(new String[] {"checkbox"});
|
||||||
|
}
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue