All SQL + Code
This commit is contained in:
parent
0b4b07daa8
commit
af67456aa2
Binary file not shown.
|
|
@ -10,7 +10,8 @@ Require-Bundle: org.adempiere.base;bundle-version="5.1.0",
|
|||
zk;bundle-version="8.0.2",
|
||||
zcommon;bundle-version="8.0.2",
|
||||
zul;bundle-version="8.0.2",
|
||||
org.adempiere.ui.zk
|
||||
org.adempiere.ui.zk,
|
||||
org.adempiere.ui;bundle-version="5.1.0"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Service-Component: OSGI-INF/MID_ProcessFactory.xml,OSGI-INF/MID_ModelFactory.xml,OSGI-INF/MID_CalloutFactory.xml,OSGI-INF/MID_ValidatorFactory.xml,OSGI-INF/MID_CreateFromFactory.xml,OSGI-INF/MID_FormFactory.xml,
|
||||
OSGI-INF/MID_DocFactory.xml
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
package andromedia.midsuit.doc;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.compiere.acct.Doc;
|
||||
import org.compiere.acct.Fact;
|
||||
import org.compiere.model.MAcctSchema;
|
||||
import org.compiere.util.Env;
|
||||
|
||||
import andromedia.midsuit.model.MID_MRequisitionTrx;
|
||||
|
||||
public class MID_DocMidRequsiition extends Doc {
|
||||
|
||||
public MID_DocMidRequsiition(MAcctSchema as, ResultSet rs, String trxName) {
|
||||
super(as, MID_MRequisitionTrx.class, rs, null, trxName);
|
||||
} // Doc_Invoice
|
||||
|
||||
public MID_DocMidRequsiition(MAcctSchema as, Class<?> clazz, ResultSet rs, String defaultDocumentType,
|
||||
String trxName) {
|
||||
super(as, clazz, rs, defaultDocumentType, trxName);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected String loadDocumentDetails() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getBalance() {
|
||||
return Env.ZERO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Fact> createFacts(MAcctSchema as) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,5 +1,14 @@
|
|||
package andromedia.midsuit.factory;
|
||||
|
||||
public class MID_CalloutFactory {
|
||||
import org.adempiere.base.IColumnCallout;
|
||||
import org.adempiere.base.IColumnCalloutFactory;
|
||||
|
||||
public class MID_CalloutFactory implements IColumnCalloutFactory{
|
||||
|
||||
@Override
|
||||
public IColumnCallout[] getColumnCallouts(String tableName, String columnName) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,15 +4,21 @@ import org.compiere.grid.ICreateFrom;
|
|||
import org.compiere.grid.ICreateFromFactory;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.X_C_Order;
|
||||
import org.compiere.model.X_M_InOut;
|
||||
|
||||
import andromedia.midsuit.form.MID_CreateFromOrder;
|
||||
import andromedia.midsuit.form.MID_WCreateFromOrder;
|
||||
import andromedia.midsuit.form.MID_WCreateFromShipment;
|
||||
|
||||
public class MID_CreateFromFactory implements ICreateFromFactory{
|
||||
@Override
|
||||
public ICreateFrom create(GridTab mTab) {
|
||||
String tableName = mTab.getTableName();
|
||||
if (tableName.equals(X_C_Order.Table_Name))
|
||||
return new MID_CreateFromOrder(mTab);
|
||||
return new MID_WCreateFromOrder(mTab);
|
||||
if (tableName.equals(X_M_InOut.Table_Name))
|
||||
return new MID_WCreateFromShipment(mTab);
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,58 @@
|
|||
package andromedia.midsuit.factory;
|
||||
|
||||
public class MID_DocFactory {
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.base.IDocFactory;
|
||||
import org.compiere.acct.Doc;
|
||||
import org.compiere.model.MAcctSchema;
|
||||
import org.compiere.model.MInvoice;
|
||||
import org.compiere.model.MTable;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Env;
|
||||
|
||||
import andromedia.midsuit.doc.MID_DocMidRequsiition;
|
||||
import andromedia.midsuit.model.MID_MRequisitionTrx;
|
||||
|
||||
public class MID_DocFactory implements IDocFactory{
|
||||
|
||||
private final static CLogger s_log = CLogger.getCLogger(MID_DocFactory.class);
|
||||
|
||||
@Override
|
||||
public Doc getDocument(MAcctSchema as, int AD_Table_ID, int Record_ID, String trxName) {
|
||||
String tableName = MTable.getTableName(Env.getCtx(), AD_Table_ID);
|
||||
//
|
||||
Doc doc = null;
|
||||
StringBuffer sql = new StringBuffer("SELECT * FROM ").append(tableName).append(" WHERE ").append(tableName)
|
||||
.append("_ID=? AND Processed='Y'");
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
try {
|
||||
pstmt = DB.prepareStatement(sql.toString(), trxName);
|
||||
pstmt.setInt(1, Record_ID);
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
doc = getDocument(as, AD_Table_ID, rs, trxName);
|
||||
} else
|
||||
s_log.severe("Not Found: " + tableName + "_ID=" + Record_ID);
|
||||
} catch (Exception e) {
|
||||
s_log.log(Level.SEVERE, sql.toString(), e);
|
||||
} finally {
|
||||
DB.close(rs, pstmt);
|
||||
rs = null;
|
||||
pstmt = null;
|
||||
}
|
||||
return doc;
|
||||
}
|
||||
@Override
|
||||
public Doc getDocument(MAcctSchema as, int AD_Table_ID, ResultSet rs, String trxName) {
|
||||
|
||||
String tableName = MTable.getTableName(Env.getCtx(), AD_Table_ID);
|
||||
if(tableName.equals(MID_MRequisitionTrx.Table_Name))
|
||||
return new MID_DocMidRequsiition(as,rs,trxName);
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,10 +9,17 @@ import org.adempiere.base.IModelFactory;
|
|||
import org.compiere.model.PO;
|
||||
import org.compiere.util.Env;
|
||||
|
||||
import andromedia.midsuit.model.MID_Aging;
|
||||
import andromedia.midsuit.model.MID_MRequisitionTrx;
|
||||
import andromedia.midsuit.model.MID_MRequisitionTrxLine;
|
||||
|
||||
public class MID_ModelFactory implements IModelFactory{
|
||||
private static HashMap<String, String> mapTableModels = new HashMap<String, String>();
|
||||
static {
|
||||
//Ex mapTableModels.put(MOrderLine.Table_Name, "org.semeru.project.model.SMT_MOrderLine");
|
||||
mapTableModels.put(MID_MRequisitionTrx.Table_Name, "andromedia.midsuit.model.MID_MRequisitionTrx");
|
||||
mapTableModels.put(MID_MRequisitionTrxLine.Table_Name, "andromedia.midsuit.model.MID_MRequisitionTrxLine");
|
||||
mapTableModels.put(MID_Aging.Table_Name, "andromedia.midsuit.model.MID_Aging");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -1,11 +1,17 @@
|
|||
package andromedia.midsuit.factory;
|
||||
|
||||
import org.adempiere.base.event.AbstractEventHandler;
|
||||
import org.adempiere.base.event.IEventTopics;
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.compiere.model.MOrder;
|
||||
import org.compiere.model.MRMA;
|
||||
import org.compiere.model.PO;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.osgi.service.event.Event;
|
||||
|
||||
import andromedia.midsuit.validator.MID_OrderValidator;
|
||||
import andromedia.midsuit.validator.MID_RMAValidator;
|
||||
|
||||
public class MID_ValidatorFactory extends AbstractEventHandler {
|
||||
public CLogger log = CLogger.getCLogger(MID_ValidatorFactory.class);
|
||||
|
||||
|
|
@ -16,6 +22,10 @@ public class MID_ValidatorFactory extends AbstractEventHandler {
|
|||
|
||||
// if (getPO(event).get_TableName().equals(MOrderLandedCostAllocation.Table_Name))
|
||||
// msg = SMT_LandedCostAllocationValidator.executeEvent(event, getPO(event));
|
||||
if (getPO(event).get_TableName().equals(MOrder.Table_Name))
|
||||
msg = MID_OrderValidator.executeEvent(event, getPO(event));
|
||||
if (getPO(event).get_TableName().equals(MRMA.Table_Name))
|
||||
msg = MID_RMAValidator.executeEvent(event, getPO(event));
|
||||
logEvent(event, getPO(event), msg);
|
||||
}
|
||||
|
||||
|
|
@ -29,6 +39,11 @@ public class MID_ValidatorFactory extends AbstractEventHandler {
|
|||
protected void initialize() {
|
||||
|
||||
// registerTableEvent(IEventTopics.DOC_BEFORE_COMPLETE, Table_Name);
|
||||
registerTableEvent(IEventTopics.DOC_AFTER_COMPLETE, MOrder.Table_Name);
|
||||
|
||||
//RMA
|
||||
registerTableEvent(IEventTopics.DOC_AFTER_COMPLETE, MRMA.Table_Name);
|
||||
registerTableEvent(IEventTopics.PO_AFTER_NEW, MRMA.Table_Name);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@ import org.compiere.util.Env;
|
|||
import org.compiere.util.KeyNamePair;
|
||||
import org.compiere.util.Msg;
|
||||
|
||||
import andromedia.midsuit.model.MID_MRequisitionTrx;
|
||||
import andromedia.midsuit.model.MID_MRequisitionTrxLine;
|
||||
|
||||
public class MID_CreateFromOrder extends CreateFrom {
|
||||
/*
|
||||
* create by yonk
|
||||
|
|
@ -76,7 +79,7 @@ public class MID_CreateFromOrder extends CreateFrom {
|
|||
|
||||
}
|
||||
|
||||
protected Vector<Vector<Object>> getRequisitionData(int M_Requisition_ID, int M_Product_ID, Timestamp dateRequired, int C_Charge_ID, int salesRepID)
|
||||
protected Vector<Vector<Object>> getRequisitionData(int M_Requisition_ID, int M_Product_ID, Timestamp dateRequired, int C_Charge_ID, int salesRepID, boolean IsSOTrx)
|
||||
{
|
||||
//int C_Order_ID = Env.getContextAsInt(Env.getCtx(), getGridTab().getWindowNo(), "C_Order_ID");
|
||||
Vector<Vector<Object>> data = new Vector<Vector<Object>>();
|
||||
|
|
@ -90,23 +93,39 @@ public class MID_CreateFromOrder extends CreateFrom {
|
|||
* 4 Qty Entered
|
||||
*/
|
||||
StringBuilder sqlStmt = new StringBuilder();
|
||||
|
||||
sqlStmt.append("SELECT rl.M_RequisitionLine_ID, rl.Line, "); //1..2
|
||||
sqlStmt.append("CASE WHEN rl.M_Product_ID IS NOT NULL THEN (SELECT p.Value||'-'||p.Name FROM M_Product p WHERE p.M_Product_ID = rl.M_Product_ID) END as ProductName, "); //3
|
||||
sqlStmt.append("rl.qty as Qty, mr.DateRequired, "); //4..5
|
||||
sqlStmt.append("CASE WHEN rl.C_UOM_ID IS NOT NULL THEN (SELECT u.Name FROM C_UOM u WHERE u.C_UOM_ID = rl.C_UOM_ID) END AS uomName, "); //7
|
||||
sqlStmt.append("CASE WHEN rl.C_Charge_ID IS NOT NULL THEN (SELECT c.Name FROM C_Charge c WHERE c.C_Charge_ID = rl.C_Charge_ID) END as ChargeName, ");
|
||||
sqlStmt.append("COALESCE(rl.qty - COALESCE(ol.QtyOrdered,0), 0) as sisapo ");
|
||||
sqlStmt.append("FROM M_RequisitionLine rl ");
|
||||
sqlStmt.append("INNER JOIN M_Requisition mr ON mr.M_Requisition_ID=rl.M_Requisition_ID ");
|
||||
sqlStmt.append(" LEFT JOIN (SELECT M_RequisitionLine_ID, COALESCE(SUM(QtyOrdered),0) as QtyOrdered FROM C_OrderLine");
|
||||
sqlStmt.append(" GROUP BY M_RequisitionLine_ID) ol ON (ol.M_RequisitionLine_ID=rl.M_RequisitionLine_ID)");
|
||||
sqlStmt.append(" WHERE rl.AD_Client_ID=? AND mr.DocStatus=? ");
|
||||
sqlStmt.append(" AND (rl.qty > ol.QtyOrdered OR COALESCE(rl.qty - COALESCE(ol.QtyOrdered,0), 0) > 0)");
|
||||
|
||||
if(!isSOTrx){
|
||||
sqlStmt.append("SELECT rl.M_RequisitionLine_ID, rl.Line, "); //1..2
|
||||
sqlStmt.append("CASE WHEN rl.M_Product_ID IS NOT NULL THEN (SELECT p.Value||'-'||p.Name FROM M_Product p WHERE p.M_Product_ID = rl.M_Product_ID) END as ProductName, "); //3
|
||||
sqlStmt.append("rl.qty as Qty, mr.DateRequired, "); //4..5
|
||||
sqlStmt.append("CASE WHEN rl.C_UOM_ID IS NOT NULL THEN (SELECT u.Name FROM C_UOM u WHERE u.C_UOM_ID = rl.C_UOM_ID) END AS uomName, "); //7
|
||||
sqlStmt.append("CASE WHEN rl.C_Charge_ID IS NOT NULL THEN (SELECT c.Name FROM C_Charge c WHERE c.C_Charge_ID = rl.C_Charge_ID) END as ChargeName, ");
|
||||
sqlStmt.append("COALESCE(rl.qty - COALESCE(ol.QtyOrdered,0), 0) as sisapo ");
|
||||
sqlStmt.append("FROM M_RequisitionLine rl ");
|
||||
sqlStmt.append("INNER JOIN M_Requisition mr ON mr.M_Requisition_ID=rl.M_Requisition_ID ");
|
||||
sqlStmt.append(" LEFT JOIN (SELECT M_RequisitionLine_ID, COALESCE(SUM(QtyOrdered),0) as QtyOrdered FROM C_OrderLine");
|
||||
sqlStmt.append(" GROUP BY M_RequisitionLine_ID) ol ON (ol.M_RequisitionLine_ID=rl.M_RequisitionLine_ID)");
|
||||
sqlStmt.append(" WHERE rl.AD_Client_ID=? AND mr.DocStatus=? ");
|
||||
sqlStmt.append(" AND (rl.qty > ol.QtyOrdered OR COALESCE(rl.qty - COALESCE(ol.QtyOrdered,0), 0) > 0)");}
|
||||
else{
|
||||
sqlStmt.append("SELECT rl.MID_RequisitionLine_ID, rl.Line, "); //1..2
|
||||
sqlStmt.append("CASE WHEN rl.M_Product_ID IS NOT NULL THEN (SELECT p.Value||'-'||p.Name FROM M_Product p WHERE p.M_Product_ID = rl.M_Product_ID) END as ProductName, "); //3
|
||||
sqlStmt.append("rl.qty as Qty, mr.DateRequired, "); //4..5
|
||||
sqlStmt.append("CASE WHEN rl.C_UOM_ID IS NOT NULL THEN (SELECT u.Name FROM C_UOM u WHERE u.C_UOM_ID = rl.C_UOM_ID) END AS uomName, "); //7
|
||||
sqlStmt.append("CASE WHEN rl.C_Charge_ID IS NOT NULL THEN (SELECT c.Name FROM C_Charge c WHERE c.C_Charge_ID = rl.C_Charge_ID) END as ChargeName, ");
|
||||
sqlStmt.append("COALESCE(rl.qty - COALESCE(ol.QtyOrdered,0), 0) as sisapo ");
|
||||
sqlStmt.append("FROM MID_RequisitionLine rl ");
|
||||
sqlStmt.append("INNER JOIN MID_Requisition mr ON mr.MID_Requisition_ID=rl.MID_Requisition_ID ");
|
||||
sqlStmt.append(" LEFT JOIN (SELECT MID_RequisitionLine_ID, COALESCE(SUM(QtyOrdered),0) as QtyOrdered FROM C_OrderLine");
|
||||
sqlStmt.append(" GROUP BY MID_RequisitionLine_ID) ol ON (ol.MID_RequisitionLine_ID=rl.MID_RequisitionLine_ID)");
|
||||
sqlStmt.append(" WHERE rl.AD_Client_ID=? AND mr.DocStatus=? ");
|
||||
sqlStmt.append(" AND (rl.qty > ol.QtyOrdered OR COALESCE(rl.qty - COALESCE(ol.QtyOrdered,0), 0) > 0)");
|
||||
}
|
||||
|
||||
if (M_Requisition_ID > 0) {
|
||||
sqlStmt.append("AND rl.M_Requisition_ID=? ");
|
||||
if(!isSOTrx)
|
||||
sqlStmt.append("AND rl.M_Requisition_ID=? ");
|
||||
else
|
||||
sqlStmt.append("AND rl.MID_Requisition_ID=? ");
|
||||
MRequisition req = new MRequisition(Env.getCtx(), M_Requisition_ID, null);
|
||||
desc = req.getDescription();
|
||||
}
|
||||
|
|
@ -184,6 +203,58 @@ public class MID_CreateFromOrder extends CreateFrom {
|
|||
return data;
|
||||
}
|
||||
|
||||
protected ArrayList<KeyNamePair> loadRequisitionSOData (int C_BPartner_ID, int M_Warehouse_ID)
|
||||
{
|
||||
int C_Order_ID = Env.getContextAsInt(Env.getCtx(), getGridTab().getWindowNo(), "C_Order_ID");
|
||||
MOrder order = new MOrder(Env.getCtx(), C_Order_ID, null);
|
||||
|
||||
ArrayList<KeyNamePair> list = new ArrayList<KeyNamePair>();
|
||||
int AD_Client_ID = Env.getContextAsInt(Env.getCtx(), getGridTab().getWindowNo(), "AD_Client_ID");
|
||||
|
||||
// Display
|
||||
StringBuilder display = new StringBuilder("r.DocumentNo");
|
||||
//.append(DB.TO_CHAR("r.TotaLines", DisplayType.Amount, Env.getAD_Language(Env.getCtx())));
|
||||
|
||||
StringBuilder sql = new StringBuilder("SELECT DISTINCT r.MID_Requisition_ID,").append(display)
|
||||
.append(" FROM MID_Requisition r ")
|
||||
.append(" LEFT JOIN MID_RequisitionLine rl ON (rl.MID_Requisition_ID=r.MID_Requisition_ID)")
|
||||
.append(" LEFT JOIN (SELECT MID_RequisitionLine_ID, SUM(QtyOrdered) as QtyOrdered FROM C_OrderLine")
|
||||
.append(" GROUP BY MID_RequisitionLine_ID) ol ON (ol.MID_RequisitionLine_ID=rl.MID_RequisitionLine_ID)")
|
||||
.append(" WHERE EXISTS (SELECT 1 FROM MID_RequisitionLine l WHERE r.MID_Requisition_ID=l.MID_Requisition_ID")
|
||||
//.append(" AND l.AD_Client_ID=? AND r.DocStatus=?) AND r.C_BPartner_ID =?");
|
||||
.append(" AND l.AD_Client_ID=? AND r.DocStatus='CO') AND r.M_Warehouse_ID =?")
|
||||
.append(" AND (rl.qty > ol.QtyOrdered OR COALESCE(rl.qty - COALESCE(ol.QtyOrdered,0), 0) > 0)")
|
||||
.append(" GROUP BY r.MID_Requisition_ID");
|
||||
|
||||
sql = sql.append(" ORDER BY r.DocumentNo DESC");
|
||||
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
try
|
||||
{
|
||||
int count = 0;
|
||||
pstmt = DB.prepareStatement(sql.toString(), null);
|
||||
pstmt.setInt(++count, AD_Client_ID);
|
||||
// pstmt.setString(++count, DocAction.STATUS_Completed);
|
||||
pstmt.setInt(++count, M_Warehouse_ID);
|
||||
//pstmt.setInt(++count, C_BPartner_ID);
|
||||
rs = pstmt.executeQuery();
|
||||
while (rs.next())
|
||||
list.add(new KeyNamePair(rs.getInt(1), rs.getString(2)));
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
log.log(Level.SEVERE, sql.toString(), e);
|
||||
}
|
||||
finally
|
||||
{
|
||||
DB.close(rs, pstmt);
|
||||
rs = null; pstmt = null;
|
||||
}
|
||||
|
||||
return list;
|
||||
} // initBPartnerOIS
|
||||
|
||||
protected ArrayList<KeyNamePair> loadRequisitionData (int C_BPartner_ID, int M_Warehouse_ID)
|
||||
{
|
||||
int C_Order_ID = Env.getContextAsInt(Env.getCtx(), getGridTab().getWindowNo(), "C_Order_ID");
|
||||
|
|
@ -273,121 +344,230 @@ public class MID_CreateFromOrder extends CreateFrom {
|
|||
BigDecimal qtyOrdered = qty;
|
||||
// BigDecimal qtyOrdered = sisapo;
|
||||
KeyNamePair pp = (KeyNamePair)miniTable.getValueAt(i, 1); // 1-Line
|
||||
if(!isSOTrx){
|
||||
|
||||
int requisitionLineID = pp.getKey();
|
||||
MRequisitionLine reqLine = new MRequisitionLine(Env.getCtx(), requisitionLineID, null);
|
||||
int requisitionLineID = pp.getKey();
|
||||
MRequisitionLine reqLine = new MRequisitionLine(Env.getCtx(), requisitionLineID, null);
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
StringBuilder sql = new StringBuilder();
|
||||
|
||||
if (reqLine.getC_UOM_ID()>0 && reqLine.getM_Product_ID() > 0) {
|
||||
if(reqLine.getC_UOM_ID()!=reqLine.getM_Product().getC_UOM_ID())
|
||||
if (reqLine.getC_UOM_ID()>0 && reqLine.getM_Product_ID() > 0) {
|
||||
if(reqLine.getC_UOM_ID()!=reqLine.getM_Product().getC_UOM_ID())
|
||||
// qtyOrdered = MUOMConversion.convertProductTo (Env.getCtx(), reqLine.getM_Product_ID(), reqLine.getC_UOM_ID(), qty);
|
||||
qtyOrdered = MUOMConversion.convertProductTo(Env.getCtx(), reqLine.getM_Product_ID(), reqLine.getC_UOM_ID(), qty);
|
||||
if (qtyOrdered == null)
|
||||
qtyOrdered = Env.ZERO;
|
||||
}
|
||||
qtyOrdered = MUOMConversion.convertProductTo(Env.getCtx(), reqLine.getM_Product_ID(), reqLine.getC_UOM_ID(), qty);
|
||||
if (qtyOrdered == null)
|
||||
qtyOrdered = Env.ZERO;
|
||||
}
|
||||
|
||||
BigDecimal Qty = reqLine.getQty();
|
||||
boolean IsSOTrx = order.isSOTrx();
|
||||
MProductPricing pricing = new MProductPricing (reqLine.getM_Product_ID(), order.getC_BPartner_ID(), Qty, IsSOTrx);
|
||||
BigDecimal Qty = reqLine.getQty();
|
||||
boolean IsSOTrx = order.isSOTrx();
|
||||
MProductPricing pricing = new MProductPricing (reqLine.getM_Product_ID(), order.getC_BPartner_ID(), Qty, IsSOTrx);
|
||||
|
||||
int M_PriceList_ID = order.getM_PriceList_ID();
|
||||
pricing.setM_PriceList_ID(M_PriceList_ID);
|
||||
int M_PriceList_ID = order.getM_PriceList_ID();
|
||||
pricing.setM_PriceList_ID(M_PriceList_ID);
|
||||
|
||||
String sqlString = "SELECT plv.M_PriceList_Version_ID "
|
||||
+ "FROM M_PriceList_Version plv "
|
||||
+ "WHERE plv.M_PriceList_ID=? " // 1
|
||||
+ " AND plv.ValidFrom <= ? "
|
||||
+ "ORDER BY plv.ValidFrom DESC";
|
||||
// Use newest price list - may not be future
|
||||
String sqlString = "SELECT plv.M_PriceList_Version_ID "
|
||||
+ "FROM M_PriceList_Version plv "
|
||||
+ "WHERE plv.M_PriceList_ID=? " // 1
|
||||
+ " AND plv.ValidFrom <= ? "
|
||||
+ "ORDER BY plv.ValidFrom DESC";
|
||||
// Use newest price list - may not be future
|
||||
|
||||
int M_PriceList_Version_ID = DB.getSQLValueEx(null, sqlString,order.getM_PriceList_ID(), order.getDateOrdered());
|
||||
int M_PriceList_Version_ID = DB.getSQLValueEx(null, sqlString,order.getM_PriceList_ID(), order.getDateOrdered());
|
||||
|
||||
pricing.setM_PriceList_Version_ID(M_PriceList_Version_ID);
|
||||
pricing.setPriceDate(order.getDateOrdered());
|
||||
pricing.setM_PriceList_Version_ID(M_PriceList_Version_ID);
|
||||
pricing.setPriceDate(order.getDateOrdered());
|
||||
|
||||
orderLine.setPriceEntered(pricing.getPriceStd().subtract(pricing.getPriceStd().multiply(orderLine.getDiscount())));
|
||||
orderLine.setPriceActual(pricing.getPriceStd());
|
||||
orderLine.setPriceList(pricing.getPriceList());
|
||||
orderLine.setPriceLimit(pricing.getPriceLimit());
|
||||
orderLine.setPriceEntered(pricing.getPriceStd().subtract(pricing.getPriceStd().multiply(orderLine.getDiscount())));
|
||||
orderLine.setPriceActual(pricing.getPriceStd());
|
||||
orderLine.setPriceList(pricing.getPriceList());
|
||||
orderLine.setPriceLimit(pricing.getPriceLimit());
|
||||
|
||||
//@Hodianto Change Default Price List
|
||||
MPriceList priceList = new MPriceList(Env.getCtx(), M_PriceList_ID, null);
|
||||
if(priceList.get_ValueAsBoolean("isLastPriceUsed")){
|
||||
int invoiceLineID = new Query(Env.getCtx(), MInvoiceLine.Table_Name, "C_InvoiceLine.M_Product_ID =?", null)
|
||||
.addJoinClause("JOIN C_Invoice i ON i.C_Invoice_ID = C_InvoiceLine.C_Invoice_ID ")
|
||||
.setParameters(new Object[]{reqLine.getM_Product_ID() })
|
||||
.setOrderBy("i.DateInvoiced DESC")
|
||||
.setOnlyActiveRecords(true)
|
||||
.firstId();
|
||||
//@Hodianto Change Default Price List
|
||||
MPriceList priceList = new MPriceList(Env.getCtx(), M_PriceList_ID, null);
|
||||
if(priceList.get_ValueAsBoolean("isLastPriceUsed")){
|
||||
int invoiceLineID = new Query(Env.getCtx(), MInvoiceLine.Table_Name, "C_InvoiceLine.M_Product_ID =?", null)
|
||||
.addJoinClause("JOIN C_Invoice i ON i.C_Invoice_ID = C_InvoiceLine.C_Invoice_ID ")
|
||||
.setParameters(new Object[]{reqLine.getM_Product_ID() })
|
||||
.setOrderBy("i.DateInvoiced DESC")
|
||||
.setOnlyActiveRecords(true)
|
||||
.firstId();
|
||||
|
||||
if(invoiceLineID>0){
|
||||
MInvoiceLine invoiceLine = new MInvoiceLine(Env.getCtx(),invoiceLineID,null);
|
||||
orderLine.setPriceEntered(invoiceLine.getPriceEntered());
|
||||
orderLine.setPriceActual(invoiceLine.getPriceEntered());
|
||||
orderLine.setPriceList(invoiceLine.getPriceEntered());
|
||||
orderLine.setPriceLimit(invoiceLine.getPriceEntered());
|
||||
}
|
||||
}
|
||||
orderLine.setLineNetAmt();
|
||||
if(invoiceLineID>0){
|
||||
MInvoiceLine invoiceLine = new MInvoiceLine(Env.getCtx(),invoiceLineID,null);
|
||||
orderLine.setPriceEntered(invoiceLine.getPriceEntered());
|
||||
orderLine.setPriceActual(invoiceLine.getPriceEntered());
|
||||
orderLine.setPriceList(invoiceLine.getPriceEntered());
|
||||
orderLine.setPriceLimit(invoiceLine.getPriceEntered());
|
||||
}
|
||||
}
|
||||
orderLine.setLineNetAmt();
|
||||
|
||||
if(orderLine.getC_Tax_ID()>0){
|
||||
MTax tax = (MTax) orderLine.getC_Tax();
|
||||
orderLine.set_ValueNoCheck("TotalLines", orderLine.getLineNetAmt()
|
||||
.add(orderLine.getLineNetAmt().multiply(tax.getRate()).divide(Env.ONEHUNDRED)));
|
||||
}else{
|
||||
orderLine.set_ValueNoCheck("TotalLines",orderLine.getLineNetAmt());
|
||||
}
|
||||
if(orderLine.getC_Tax_ID()>0){
|
||||
MTax tax = (MTax) orderLine.getC_Tax();
|
||||
orderLine.set_ValueNoCheck("TotalLines", orderLine.getLineNetAmt()
|
||||
.add(orderLine.getLineNetAmt().multiply(tax.getRate()).divide(Env.ONEHUNDRED)));
|
||||
}else{
|
||||
orderLine.set_ValueNoCheck("TotalLines",orderLine.getLineNetAmt());
|
||||
}
|
||||
|
||||
if(reqLine.getC_Charge_ID()>0)
|
||||
orderLine.setC_Charge_ID(reqLine.getC_Charge_ID());
|
||||
else
|
||||
orderLine.setM_Product_ID(reqLine.getM_Product_ID());
|
||||
if(reqLine.getC_Charge_ID()>0)
|
||||
orderLine.setC_Charge_ID(reqLine.getC_Charge_ID());
|
||||
else
|
||||
orderLine.setM_Product_ID(reqLine.getM_Product_ID());
|
||||
|
||||
if(reqLine.getC_BPartner_ID()>0)
|
||||
orderLine.set_ValueOfColumn("C_BPartner_Requisition_ID",reqLine.getC_BPartner_ID());
|
||||
if(reqLine.getC_BPartner_ID()>0)
|
||||
orderLine.set_ValueOfColumn("C_BPartner_Requisition_ID",reqLine.getC_BPartner_ID());
|
||||
|
||||
if(reqLine.getC_Charge_ID()>0)
|
||||
orderLine.setC_Charge_ID(reqLine.getC_Charge_ID());
|
||||
else
|
||||
orderLine.setM_Product_ID(reqLine.getM_Product_ID());
|
||||
if(reqLine.getC_Charge_ID()>0)
|
||||
orderLine.setC_Charge_ID(reqLine.getC_Charge_ID());
|
||||
else
|
||||
orderLine.setM_Product_ID(reqLine.getM_Product_ID());
|
||||
|
||||
|
||||
orderLine.setC_UOM_ID(reqLine.getC_UOM_ID());
|
||||
int a = reqLine.getC_UOM_ID();
|
||||
orderLine.setC_UOM_ID(reqLine.getC_UOM_ID());
|
||||
// orderLine.setQtyEntered(qty);
|
||||
orderLine.setQtyEntered(qtyOrdered);
|
||||
//orderLine.setC_Tax_ID(order.getC_Tax_ID());
|
||||
orderLine.setQtyOrdered(qtyOrdered);
|
||||
orderLine.setQtyEntered(qtyOrdered);
|
||||
//orderLine.setC_Tax_ID(order.getC_Tax_ID());
|
||||
orderLine.setQtyOrdered(qtyOrdered);
|
||||
// orderLine.setLine(reqLine.getLine());
|
||||
|
||||
//Add by @solrizal increment LIne Number by 10
|
||||
orderLine.set_ValueOfColumn("PriceRequisition", reqLine.getPriceActual());
|
||||
//Add by @solrizal increment LIne Number by 10
|
||||
orderLine.set_ValueOfColumn("PriceRequisition", reqLine.getPriceActual());
|
||||
|
||||
orderLine.set_ValueOfColumn("DiscAmt", Env.ZERO);
|
||||
orderLine.set_ValueOfColumn("M_Requisition_ID", reqLine.getM_Requisition_ID());
|
||||
orderLine.set_ValueOfColumn("M_RequisitionLine_ID", reqLine.get_ID());
|
||||
orderLine.set_ValueOfColumn("DiscAmt", Env.ZERO);
|
||||
orderLine.set_ValueOfColumn("M_Requisition_ID", reqLine.getM_Requisition_ID());
|
||||
orderLine.set_ValueOfColumn("M_RequisitionLine_ID", reqLine.get_ID());
|
||||
|
||||
orderLine.set_ValueOfColumn("IsTrackAsAsset", reqLine.get_ValueAsBoolean("IsTrackAsAsset"));
|
||||
orderLine.set_ValueOfColumn("IsTrackAsAsset", reqLine.get_ValueAsBoolean("IsTrackAsAsset"));
|
||||
|
||||
orderLine.setDescription(reqLine.getDescription()==null? "" : reqLine.getDescription());
|
||||
orderLine.set_ValueNoCheck("Comments", reqLine.get_Value("Comments"));
|
||||
orderLine.setDescription(reqLine.getDescription()==null? "" : reqLine.getDescription());
|
||||
orderLine.set_ValueNoCheck("Comments", reqLine.get_Value("Comments"));
|
||||
// orderLine.set_ValueOfColumn("Comments", reqLine.get_Value("Comments"));
|
||||
|
||||
if(!orderLine.save()){
|
||||
if(!orderLine.save()){
|
||||
// String sqlDelete = "DELETE FROM C_OrderLine WHERE C_Order_ID=?";
|
||||
// int line = DB.executeUpdate(sqlDelete, order.getC_Order_ID(), null);
|
||||
throw new AdempiereException("Cannot create order line for product "+reqLine.getM_Product().getName());
|
||||
}
|
||||
orderLine.saveEx();
|
||||
if(reqLine.getM_Requisition().getDescription()==null || reqLine.getM_Requisition().getDescription().equals("null"))
|
||||
desc = desc + "";
|
||||
else
|
||||
desc = desc + reqLine.getM_Requisition().getDescription() +"; ";
|
||||
throw new AdempiereException("Cannot create order line for product "+reqLine.getM_Product().getName());
|
||||
}
|
||||
orderLine.saveEx();
|
||||
if(reqLine.getM_Requisition().getDescription()==null || reqLine.getM_Requisition().getDescription().equals("null"))
|
||||
desc = desc + "";
|
||||
else
|
||||
desc = desc + reqLine.getM_Requisition().getDescription() +"; ";
|
||||
|
||||
|
||||
MRequisition req = (MRequisition) reqLine.getM_Requisition();
|
||||
if(req.get_ValueAsInt("C_BPartner_ID")>0)
|
||||
order.setC_BPartner_ID(req.get_ValueAsInt("C_BPartner_ID"));
|
||||
MRequisition req = (MRequisition) reqLine.getM_Requisition();
|
||||
if(req.get_ValueAsInt("C_BPartner_ID")>0)
|
||||
order.setC_BPartner_ID(req.get_ValueAsInt("C_BPartner_ID"));
|
||||
}else{
|
||||
//Is SO Trx = Y
|
||||
int requisitionLineID = pp.getKey();
|
||||
MID_MRequisitionTrxLine reqLine = new MID_MRequisitionTrxLine(Env.getCtx(), requisitionLineID, null);
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
|
||||
if (reqLine.getC_UOM_ID()>0 && reqLine.getM_Product_ID() > 0) {
|
||||
if(reqLine.getC_UOM_ID()!=reqLine.getM_Product().getC_UOM_ID())
|
||||
// qtyOrdered = MUOMConversion.convertProductTo (Env.getCtx(), reqLine.getM_Product_ID(), reqLine.getC_UOM_ID(), qty);
|
||||
qtyOrdered = MUOMConversion.convertProductTo(Env.getCtx(), reqLine.getM_Product_ID(), reqLine.getC_UOM_ID(), qty);
|
||||
if (qtyOrdered == null)
|
||||
qtyOrdered = Env.ZERO;
|
||||
}
|
||||
|
||||
BigDecimal Qty = reqLine.getQty();
|
||||
boolean IsSOTrx = order.isSOTrx();
|
||||
MProductPricing pricing = new MProductPricing (reqLine.getM_Product_ID(), order.getC_BPartner_ID(), Qty, IsSOTrx);
|
||||
|
||||
int M_PriceList_ID = order.getM_PriceList_ID();
|
||||
pricing.setM_PriceList_ID(M_PriceList_ID);
|
||||
|
||||
String sqlString = "SELECT plv.M_PriceList_Version_ID "
|
||||
+ "FROM M_PriceList_Version plv "
|
||||
+ "WHERE plv.M_PriceList_ID=? " // 1
|
||||
+ " AND plv.ValidFrom <= ? "
|
||||
+ "ORDER BY plv.ValidFrom DESC";
|
||||
// Use newest price list - may not be future
|
||||
|
||||
int M_PriceList_Version_ID = DB.getSQLValueEx(null, sqlString,order.getM_PriceList_ID(), order.getDateOrdered());
|
||||
|
||||
pricing.setM_PriceList_Version_ID(M_PriceList_Version_ID);
|
||||
pricing.setPriceDate(order.getDateOrdered());
|
||||
|
||||
orderLine.setPriceEntered(pricing.getPriceStd().subtract(pricing.getPriceStd().multiply(orderLine.getDiscount())));
|
||||
orderLine.setPriceActual(pricing.getPriceStd());
|
||||
orderLine.setPriceList(pricing.getPriceList());
|
||||
orderLine.setPriceLimit(pricing.getPriceLimit());
|
||||
|
||||
//@Hodianto Change Default Price List
|
||||
MPriceList priceList = new MPriceList(Env.getCtx(), M_PriceList_ID, null);
|
||||
if(priceList.get_ValueAsBoolean("isLastPriceUsed")){
|
||||
int invoiceLineID = new Query(Env.getCtx(), MInvoiceLine.Table_Name, "C_InvoiceLine.M_Product_ID =?", null)
|
||||
.addJoinClause("JOIN C_Invoice i ON i.C_Invoice_ID = C_InvoiceLine.C_Invoice_ID ")
|
||||
.setParameters(new Object[]{reqLine.getM_Product_ID() })
|
||||
.setOrderBy("i.DateInvoiced DESC")
|
||||
.setOnlyActiveRecords(true)
|
||||
.firstId();
|
||||
|
||||
if(invoiceLineID>0){
|
||||
MInvoiceLine invoiceLine = new MInvoiceLine(Env.getCtx(),invoiceLineID,null);
|
||||
orderLine.setPriceEntered(invoiceLine.getPriceEntered());
|
||||
orderLine.setPriceActual(invoiceLine.getPriceEntered());
|
||||
orderLine.setPriceList(invoiceLine.getPriceEntered());
|
||||
orderLine.setPriceLimit(invoiceLine.getPriceEntered());
|
||||
}
|
||||
}
|
||||
orderLine.setLineNetAmt();
|
||||
|
||||
if(orderLine.getC_Tax_ID()>0){
|
||||
MTax tax = (MTax) orderLine.getC_Tax();
|
||||
orderLine.set_ValueNoCheck("TotalLines", orderLine.getLineNetAmt()
|
||||
.add(orderLine.getLineNetAmt().multiply(tax.getRate()).divide(Env.ONEHUNDRED)));
|
||||
}else{
|
||||
orderLine.set_ValueNoCheck("TotalLines",orderLine.getLineNetAmt());
|
||||
}
|
||||
|
||||
if(reqLine.getC_Charge_ID()>0)
|
||||
orderLine.setC_Charge_ID(reqLine.getC_Charge_ID());
|
||||
else
|
||||
orderLine.setM_Product_ID(reqLine.getM_Product_ID());
|
||||
|
||||
if(reqLine.getC_BPartner_ID()>0)
|
||||
orderLine.set_ValueOfColumn("C_BPartner_Requisition_ID",reqLine.getC_BPartner_ID());
|
||||
|
||||
if(reqLine.getC_Charge_ID()>0)
|
||||
orderLine.setC_Charge_ID(reqLine.getC_Charge_ID());
|
||||
else
|
||||
orderLine.setM_Product_ID(reqLine.getM_Product_ID());
|
||||
|
||||
int a = reqLine.getC_UOM_ID();
|
||||
orderLine.setC_UOM_ID(reqLine.getC_UOM_ID());
|
||||
// orderLine.setQtyEntered(qty);
|
||||
orderLine.setQtyEntered(qtyOrdered);
|
||||
//orderLine.setC_Tax_ID(order.getC_Tax_ID());
|
||||
orderLine.setQtyOrdered(qtyOrdered);
|
||||
// orderLine.setLine(reqLine.getLine());
|
||||
|
||||
//Add by @solrizal increment LIne Number by 10
|
||||
orderLine.set_ValueOfColumn("PriceRequisition", reqLine.getPriceActual());
|
||||
|
||||
orderLine.set_ValueOfColumn("DiscAmt", Env.ZERO);
|
||||
orderLine.set_ValueOfColumn("MIDRequisition_ID", reqLine.getMID_Requisition_ID());
|
||||
orderLine.set_ValueOfColumn("MIDRequisitionLine_ID", reqLine.getMID_RequisitionLine_ID());
|
||||
|
||||
orderLine.set_ValueOfColumn("IsTrackAsAsset", reqLine.get_ValueAsBoolean("IsTrackAsAsset"));
|
||||
|
||||
orderLine.setDescription(reqLine.getDescription()==null? "" : reqLine.getDescription());
|
||||
orderLine.set_ValueNoCheck("Comments", reqLine.get_Value("Comments"));
|
||||
// orderLine.set_ValueOfColumn("Comments", reqLine.get_Value("Comments"));
|
||||
|
||||
if(!orderLine.save()){
|
||||
// String sqlDelete = "DELETE FROM C_OrderLine WHERE C_Order_ID=?";
|
||||
// int line = DB.executeUpdate(sqlDelete, order.getC_Order_ID(), null);
|
||||
throw new AdempiereException("Cannot create order line for product "+reqLine.getM_Product().getName());
|
||||
}
|
||||
orderLine.saveEx();
|
||||
}
|
||||
}
|
||||
}
|
||||
order.setDescription(order.getDescription()==null? desc : order.getDescription()+";"+desc);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,786 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2009 Low Heng Sin *
|
||||
* Copyright (C) 2009 Idalica Corporation *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. 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., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
|
||||
package andromedia.midsuit.form;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Vector;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.compiere.apps.IStatusBar;
|
||||
import org.compiere.grid.CreateFrom;
|
||||
import org.compiere.minigrid.IMiniTable;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MInOut;
|
||||
import org.compiere.model.MInOutLine;
|
||||
import org.compiere.model.MInvoice;
|
||||
import org.compiere.model.MInvoiceLine;
|
||||
import org.compiere.model.MLocator;
|
||||
import org.compiere.model.MOrder;
|
||||
import org.compiere.model.MOrderLine;
|
||||
import org.compiere.model.MProduct;
|
||||
import org.compiere.model.MRMA;
|
||||
import org.compiere.model.MRMALine;
|
||||
import org.compiere.model.MWarehouse;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.DisplayType;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
import org.compiere.util.Msg;
|
||||
|
||||
/**
|
||||
* Create Invoice Transactions from PO Orders or Receipt
|
||||
*
|
||||
* @author Jorg Janke
|
||||
* @version $Id: VCreateFromShipment.java,v 1.4 2006/07/30 00:51:28 jjanke Exp $
|
||||
*
|
||||
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
|
||||
* <li>BF [ 1896947 ] Generate invoice from Order error
|
||||
* <li>BF [ 2007837 ] VCreateFrom.save() should run in trx
|
||||
*/
|
||||
public abstract class MID_CreateFromShipment extends CreateFrom
|
||||
{
|
||||
/** Loaded Invoice */
|
||||
private MInvoice m_invoice = null;
|
||||
/** Loaded RMA */
|
||||
private MRMA m_rma = null;
|
||||
private int defaultLocator_ID=0;
|
||||
|
||||
/**
|
||||
* Protected Constructor
|
||||
* @param mTab MTab
|
||||
*/
|
||||
public MID_CreateFromShipment(GridTab mTab)
|
||||
{
|
||||
super(mTab);
|
||||
if (log.isLoggable(Level.INFO)) log.info(mTab.toString());
|
||||
} // VCreateFromShipment
|
||||
|
||||
/**
|
||||
* Dynamic Init
|
||||
* @return true if initialized
|
||||
*/
|
||||
public boolean dynInit() throws Exception
|
||||
{
|
||||
log.config("");
|
||||
setTitle(Msg.getElement(Env.getCtx(), "M_InOut_ID", false) + " .. " + Msg.translate(Env.getCtx(), "CreateFrom"));
|
||||
|
||||
return true;
|
||||
} // dynInit
|
||||
|
||||
|
||||
/**
|
||||
* Load PBartner dependent Order/Invoice/Shipment Field.
|
||||
* @param C_BPartner_ID BPartner
|
||||
*/
|
||||
protected ArrayList<KeyNamePair> loadRMAData(int C_BPartner_ID) {
|
||||
ArrayList<KeyNamePair> list = new ArrayList<KeyNamePair>();
|
||||
|
||||
String sqlStmt = "SELECT r.M_RMA_ID, r.DocumentNo || '-' || r.Amt from M_RMA r "
|
||||
+ "WHERE ISSOTRX='Y' AND r.DocStatus in ('CO', 'CL') "
|
||||
+ "AND r.C_BPartner_ID=? "
|
||||
+ "AND r.M_RMA_ID in (SELECT rl.M_RMA_ID FROM M_RMALine rl "
|
||||
+ "WHERE rl.M_RMA_ID=r.M_RMA_ID AND rl.QtyDelivered < rl.Qty "
|
||||
+ "AND rl.M_InOutLine_ID IS NOT NULL)";
|
||||
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
try {
|
||||
pstmt = DB.prepareStatement(sqlStmt, null);
|
||||
pstmt.setInt(1, C_BPartner_ID);
|
||||
rs = pstmt.executeQuery();
|
||||
while (rs.next()) {
|
||||
list.add(new KeyNamePair(rs.getInt(1), rs.getString(2)));
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
log.log(Level.SEVERE, sqlStmt.toString(), e);
|
||||
} finally{
|
||||
DB.close(rs, pstmt);
|
||||
rs = null;
|
||||
pstmt = null;
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load PBartner dependent Order/Invoice/Shipment Field.
|
||||
* @param C_BPartner_ID
|
||||
*/
|
||||
protected ArrayList<KeyNamePair> loadInvoiceData (int C_BPartner_ID)
|
||||
{
|
||||
ArrayList<KeyNamePair> list = new ArrayList<KeyNamePair>();
|
||||
|
||||
StringBuffer display = new StringBuffer("i.DocumentNo||' - '||")
|
||||
.append(DB.TO_CHAR("DateInvoiced", DisplayType.Date, Env.getAD_Language(Env.getCtx())))
|
||||
.append("|| ' - ' ||")
|
||||
.append(DB.TO_CHAR("GrandTotal", DisplayType.Amount, Env.getAD_Language(Env.getCtx())));
|
||||
//
|
||||
StringBuffer sql = new StringBuffer("SELECT i.C_Invoice_ID,").append(display)
|
||||
.append(" FROM C_Invoice i "
|
||||
+ "WHERE i.C_BPartner_ID=? AND i.IsSOTrx='N' AND i.DocStatus IN ('CL','CO')"
|
||||
+ " AND i.C_Invoice_ID IN "
|
||||
+ "(SELECT il.C_Invoice_ID FROM C_InvoiceLine il"
|
||||
+ " LEFT OUTER JOIN M_MatchInv mi ON (il.C_InvoiceLine_ID=mi.C_InvoiceLine_ID) "
|
||||
+ " JOIN C_Invoice i2 ON (il.C_Invoice_ID = i2.C_Invoice_ID) "
|
||||
+ " WHERE i2.C_BPartner_ID=? AND i2.IsSOTrx='N' AND i2.DocStatus IN ('CL','CO') "
|
||||
+ "GROUP BY il.C_Invoice_ID,mi.C_InvoiceLine_ID,il.QtyInvoiced "
|
||||
+ "HAVING (il.QtyInvoiced<>SUM(mi.Qty) AND mi.C_InvoiceLine_ID IS NOT NULL)"
|
||||
+ " OR mi.C_InvoiceLine_ID IS NULL) "
|
||||
+ "ORDER BY i.DateInvoiced");
|
||||
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
try
|
||||
{
|
||||
pstmt = DB.prepareStatement(sql.toString(), null);
|
||||
pstmt.setInt(1, C_BPartner_ID);
|
||||
pstmt.setInt(2, C_BPartner_ID);
|
||||
rs = pstmt.executeQuery();
|
||||
while (rs.next())
|
||||
{
|
||||
list.add(new KeyNamePair(rs.getInt(1), rs.getString(2)));
|
||||
}
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
log.log(Level.SEVERE, sql.toString(), e);
|
||||
}finally
|
||||
{
|
||||
DB.close(rs, pstmt);
|
||||
rs = null;
|
||||
pstmt = null;
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load Data - Order
|
||||
* @param C_Order_ID Order
|
||||
* @param forInvoice true if for invoice vs. delivery qty
|
||||
*/
|
||||
protected Vector<Vector<Object>> getOrderData (int C_Order_ID, boolean forInvoice)
|
||||
{
|
||||
/**
|
||||
* Selected - 0
|
||||
* Qty - 1
|
||||
* C_UOM_ID - 2
|
||||
* M_Locator_ID - 3
|
||||
* M_Product_ID - 4
|
||||
* VendorProductNo - 5
|
||||
* OrderLine - 6
|
||||
* ShipmentLine - 7
|
||||
* InvoiceLine - 8
|
||||
*/
|
||||
if (log.isLoggable(Level.CONFIG)) log.config("C_Order_ID=" + C_Order_ID);
|
||||
p_order = new MOrder (Env.getCtx(), C_Order_ID, null); // save
|
||||
|
||||
Vector<Vector<Object>> data = new Vector<Vector<Object>>();
|
||||
StringBuilder sql = new StringBuilder("SELECT "
|
||||
+ "l.QtyOrdered-SUM(COALESCE(m.Qty,0))"
|
||||
// subtract drafted lines from this or other orders IDEMPIERE-2889
|
||||
+ "-COALESCE((SELECT SUM(MovementQty) FROM M_InOutLine iol JOIN M_InOut io ON iol.M_InOut_ID=io.M_InOut_ID WHERE l.C_OrderLine_ID=iol.C_OrderLine_ID AND io.Processed='N'),0)," // 1
|
||||
+ "CASE WHEN l.QtyOrdered=0 THEN 0 ELSE l.QtyEntered/l.QtyOrdered END," // 2
|
||||
+ " l.C_UOM_ID,COALESCE(uom.UOMSymbol,uom.Name)," // 3..4
|
||||
+ " p.M_Locator_ID, loc.Value, " // 5..6
|
||||
+ " COALESCE(l.M_Product_ID,0),COALESCE(p.Name,c.Name), " // 7..8
|
||||
+ " po.VendorProductNo, " // 9
|
||||
+ " l.C_OrderLine_ID,l.Line " // 10..11
|
||||
+ "FROM C_OrderLine l"
|
||||
+ " LEFT OUTER JOIN M_Product_PO po ON (l.M_Product_ID = po.M_Product_ID AND l.C_BPartner_ID = po.C_BPartner_ID) "
|
||||
+ " LEFT OUTER JOIN M_MatchPO m ON (l.C_OrderLine_ID=m.C_OrderLine_ID AND ");
|
||||
sql.append(forInvoice ? "m.C_InvoiceLine_ID" : "m.M_InOutLine_ID");
|
||||
sql.append(" IS NOT NULL)")
|
||||
.append(" LEFT OUTER JOIN M_Product p ON (l.M_Product_ID=p.M_Product_ID)"
|
||||
+ " LEFT OUTER JOIN M_Locator loc on (p.M_Locator_ID=loc.M_Locator_ID)"
|
||||
+ " LEFT OUTER JOIN C_Charge c ON (l.C_Charge_ID=c.C_Charge_ID)");
|
||||
if (Env.isBaseLanguage(Env.getCtx(), "C_UOM"))
|
||||
sql.append(" LEFT OUTER JOIN C_UOM uom ON (l.C_UOM_ID=uom.C_UOM_ID)");
|
||||
else
|
||||
sql.append(" LEFT OUTER JOIN C_UOM_Trl uom ON (l.C_UOM_ID=uom.C_UOM_ID AND uom.AD_Language='")
|
||||
.append(Env.getAD_Language(Env.getCtx())).append("')");
|
||||
//
|
||||
sql.append(" WHERE l.C_Order_ID=? " // #1
|
||||
+ "GROUP BY l.QtyOrdered,CASE WHEN l.QtyOrdered=0 THEN 0 ELSE l.QtyEntered/l.QtyOrdered END, "
|
||||
+ "l.C_UOM_ID,COALESCE(uom.UOMSymbol,uom.Name), p.M_Locator_ID, loc.Value, po.VendorProductNo, "
|
||||
+ "l.M_Product_ID,COALESCE(p.Name,c.Name), l.Line,l.C_OrderLine_ID "
|
||||
+ "ORDER BY l.Line");
|
||||
//
|
||||
if (log.isLoggable(Level.FINER)) log.finer(sql.toString());
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
try
|
||||
{
|
||||
pstmt = DB.prepareStatement(sql.toString(), null);
|
||||
pstmt.setInt(1, C_Order_ID);
|
||||
rs = pstmt.executeQuery();
|
||||
while (rs.next())
|
||||
{
|
||||
Vector<Object> line = new Vector<Object>();
|
||||
line.add(new Boolean(false)); // 0-Selection
|
||||
BigDecimal qtyOrdered = rs.getBigDecimal(1);
|
||||
BigDecimal multiplier = rs.getBigDecimal(2);
|
||||
BigDecimal qtyEntered = qtyOrdered.multiply(multiplier);
|
||||
line.add(qtyEntered); // 1-Qty
|
||||
KeyNamePair pp = new KeyNamePair(rs.getInt(3), rs.getString(4).trim());
|
||||
line.add(pp); // 2-UOM
|
||||
// Add locator
|
||||
line.add(getLocatorKeyNamePair(rs.getInt(5)));// 3-Locator
|
||||
// Add product
|
||||
pp = new KeyNamePair(rs.getInt(7), rs.getString(8));
|
||||
line.add(pp); // 4-Product
|
||||
line.add(rs.getString(9)); // 5-VendorProductNo
|
||||
pp = new KeyNamePair(rs.getInt(10), rs.getString(11));
|
||||
line.add(pp); // 6-OrderLine
|
||||
line.add(null); // 7-Ship
|
||||
line.add(null); // 8-Invoice
|
||||
data.add(line);
|
||||
}
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
log.log(Level.SEVERE, sql.toString(), e);
|
||||
//throw new DBException(e, sql.toString());
|
||||
}
|
||||
finally
|
||||
{
|
||||
DB.close(rs, pstmt);
|
||||
rs = null; pstmt = null;
|
||||
}
|
||||
return data;
|
||||
} // LoadOrder
|
||||
|
||||
/**
|
||||
* Load RMA details
|
||||
* @param M_RMA_ID RMA
|
||||
*/
|
||||
protected Vector<Vector<Object>> getRMAData(int M_RMA_ID)
|
||||
{
|
||||
m_invoice = null;
|
||||
p_order = null;
|
||||
m_rma = new MRMA(Env.getCtx(), M_RMA_ID, null);
|
||||
|
||||
Vector<Vector<Object>> data = new Vector<Vector<Object>>();
|
||||
StringBuilder sqlStmt = new StringBuilder();
|
||||
sqlStmt.append("SELECT rl.M_RMALine_ID, rl.line, rl.Qty - rl.QtyDelivered, p.M_Product_ID, COALESCE(p.Name, c.Name), uom.C_UOM_ID, COALESCE(uom.UOMSymbol,uom.Name) ");
|
||||
sqlStmt.append("FROM M_RMALine rl INNER JOIN M_InOutLine iol ON rl.M_InOutLine_ID=iol.M_InOutLine_ID ");
|
||||
|
||||
if (Env.isBaseLanguage(Env.getCtx(), "C_UOM"))
|
||||
{
|
||||
sqlStmt.append("LEFT OUTER JOIN C_UOM uom ON (uom.C_UOM_ID=iol.C_UOM_ID) ");
|
||||
}
|
||||
else
|
||||
{
|
||||
sqlStmt.append("LEFT OUTER JOIN C_UOM_Trl uom ON (uom.C_UOM_ID=iol.C_UOM_ID AND uom.AD_Language='");
|
||||
sqlStmt.append(Env.getAD_Language(Env.getCtx())).append("') ");
|
||||
}
|
||||
sqlStmt.append("LEFT OUTER JOIN M_Product p ON p.M_Product_ID=iol.M_Product_ID ");
|
||||
sqlStmt.append("LEFT OUTER JOIN C_Charge c ON c.C_Charge_ID=iol.C_Charge_ID ");
|
||||
sqlStmt.append("WHERE rl.M_RMA_ID=? ");
|
||||
sqlStmt.append("AND rl.M_InOutLine_ID IS NOT NULL");
|
||||
|
||||
sqlStmt.append(" UNION ");
|
||||
|
||||
sqlStmt.append("SELECT rl.M_RMALine_ID, rl.line, rl.Qty - rl.QtyDelivered, p.M_Product_ID, p.Name, uom.C_UOM_ID, COALESCE(uom.UOMSymbol,uom.Name) ");
|
||||
sqlStmt.append("FROM M_RMALine rl INNER JOIN M_Product p ON p.M_Product_ID = rl.M_Product_ID ");
|
||||
if (Env.isBaseLanguage(Env.getCtx(), "C_UOM"))
|
||||
{
|
||||
sqlStmt.append("LEFT OUTER JOIN C_UOM uom ON (uom.C_UOM_ID=p.C_UOM_ID) ");
|
||||
}
|
||||
else
|
||||
{
|
||||
sqlStmt.append("LEFT OUTER JOIN C_UOM_Trl uom ON (uom.C_UOM_ID=100 AND uom.AD_Language='");
|
||||
sqlStmt.append(Env.getAD_Language(Env.getCtx())).append("') ");
|
||||
}
|
||||
sqlStmt.append("WHERE rl.M_RMA_ID=? ");
|
||||
sqlStmt.append("AND rl.M_Product_ID IS NOT NULL AND rl.M_InOutLine_ID IS NULL");
|
||||
|
||||
sqlStmt.append(" UNION ");
|
||||
|
||||
sqlStmt.append("SELECT rl.M_RMALine_ID, rl.line, rl.Qty - rl.QtyDelivered, 0, c.Name, uom.C_UOM_ID, COALESCE(uom.UOMSymbol,uom.Name) ");
|
||||
sqlStmt.append("FROM M_RMALine rl INNER JOIN C_Charge c ON c.C_Charge_ID = rl.C_Charge_ID ");
|
||||
if (Env.isBaseLanguage(Env.getCtx(), "C_UOM"))
|
||||
{
|
||||
sqlStmt.append("LEFT OUTER JOIN C_UOM uom ON (uom.C_UOM_ID=100) ");
|
||||
}
|
||||
else
|
||||
{
|
||||
sqlStmt.append("LEFT OUTER JOIN C_UOM_Trl uom ON (uom.C_UOM_ID=100 AND uom.AD_Language='");
|
||||
sqlStmt.append(Env.getAD_Language(Env.getCtx())).append("') ");
|
||||
}
|
||||
sqlStmt.append("WHERE rl.M_RMA_ID=? ");
|
||||
sqlStmt.append("AND rl.C_Charge_ID IS NOT NULL AND rl.M_InOutLine_ID IS NULL");
|
||||
sqlStmt.append(" ORDER BY 2");
|
||||
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
try
|
||||
{
|
||||
pstmt = DB.prepareStatement(sqlStmt.toString(), null);
|
||||
pstmt.setInt(1, M_RMA_ID);
|
||||
pstmt.setInt(2, M_RMA_ID);
|
||||
pstmt.setInt(3, M_RMA_ID);
|
||||
rs = pstmt.executeQuery();
|
||||
|
||||
while (rs.next())
|
||||
{
|
||||
Vector<Object> line = new Vector<Object>(7);
|
||||
line.add(new Boolean(false)); // 0-Selection
|
||||
line.add(rs.getBigDecimal(3)); // 1-Qty
|
||||
KeyNamePair pp = new KeyNamePair(rs.getInt(6), rs.getString(7));
|
||||
line.add(pp); // 2-UOM
|
||||
line.add(getLocatorKeyNamePair(0));
|
||||
pp = new KeyNamePair(rs.getInt(4), rs.getString(5));
|
||||
line.add(pp); // 4-Product
|
||||
line.add(null); //5-Vendor Product No
|
||||
line.add(null); //6-Order
|
||||
pp = new KeyNamePair(rs.getInt(1), rs.getString(2));
|
||||
line.add(pp); //7-RMA
|
||||
line.add(null); //8-invoice
|
||||
data.add(line);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.log(Level.SEVERE, sqlStmt.toString(), ex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
DB.close(rs, pstmt);
|
||||
rs = null; pstmt = null;
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load Invoice details
|
||||
* @param C_Invoice_ID Invoice
|
||||
*/
|
||||
protected Vector<Vector<Object>> getInvoiceData(int C_Invoice_ID)
|
||||
{
|
||||
m_invoice = new MInvoice(Env.getCtx(), C_Invoice_ID, null); // save
|
||||
p_order = null;
|
||||
m_rma = null;
|
||||
|
||||
Vector<Vector<Object>> data = new Vector<Vector<Object>>();
|
||||
StringBuilder sql = new StringBuilder("SELECT " // Entered UOM
|
||||
+ "l.QtyInvoiced-SUM(NVL(mi.Qty,0)),l.QtyEntered/l.QtyInvoiced,"
|
||||
+ " l.C_UOM_ID,COALESCE(uom.UOMSymbol,uom.Name)," // 3..4
|
||||
+ " p.M_Locator_ID, loc.Value, " // 5..6
|
||||
+ " l.M_Product_ID,p.Name, po.VendorProductNo, l.C_InvoiceLine_ID,l.Line," // 7..11
|
||||
+ " l.C_OrderLine_ID " // 12
|
||||
+ " FROM C_InvoiceLine l ");
|
||||
if (Env.isBaseLanguage(Env.getCtx(), "C_UOM"))
|
||||
sql.append(" LEFT OUTER JOIN C_UOM uom ON (l.C_UOM_ID=uom.C_UOM_ID)");
|
||||
else
|
||||
sql.append(" LEFT OUTER JOIN C_UOM_Trl uom ON (l.C_UOM_ID=uom.C_UOM_ID AND uom.AD_Language='")
|
||||
.append(Env.getAD_Language(Env.getCtx())).append("')");
|
||||
|
||||
sql.append(" LEFT OUTER JOIN M_Product p ON (l.M_Product_ID=p.M_Product_ID)")
|
||||
.append(" LEFT OUTER JOIN M_Locator loc on (p.M_Locator_ID=loc.M_Locator_ID)")
|
||||
.append(" INNER JOIN C_Invoice inv ON (l.C_Invoice_ID=inv.C_Invoice_ID)")
|
||||
.append(" LEFT OUTER JOIN M_Product_PO po ON (l.M_Product_ID = po.M_Product_ID AND inv.C_BPartner_ID = po.C_BPartner_ID)")
|
||||
.append(" LEFT OUTER JOIN M_MatchInv mi ON (l.C_InvoiceLine_ID=mi.C_InvoiceLine_ID)")
|
||||
|
||||
.append(" WHERE l.C_Invoice_ID=? AND l.QtyInvoiced<>0 ")
|
||||
.append("GROUP BY l.QtyInvoiced,l.QtyEntered/l.QtyInvoiced,"
|
||||
+ "l.C_UOM_ID,COALESCE(uom.UOMSymbol,uom.Name),"
|
||||
+ "p.M_Locator_ID, loc.Value, "
|
||||
+ "l.M_Product_ID,p.Name, po.VendorProductNo, l.C_InvoiceLine_ID,l.Line,l.C_OrderLine_ID ")
|
||||
.append("ORDER BY l.Line");
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
try
|
||||
{
|
||||
pstmt = DB.prepareStatement(sql.toString(), null);
|
||||
pstmt.setInt(1, C_Invoice_ID);
|
||||
rs = pstmt.executeQuery();
|
||||
while (rs.next())
|
||||
{
|
||||
Vector<Object> line = new Vector<Object>(7);
|
||||
line.add(new Boolean(false)); // 0-Selection
|
||||
BigDecimal qtyInvoiced = rs.getBigDecimal(1);
|
||||
BigDecimal multiplier = rs.getBigDecimal(2);
|
||||
BigDecimal qtyEntered = qtyInvoiced.multiply(multiplier);
|
||||
line.add(qtyEntered); // 1-Qty
|
||||
KeyNamePair pp = new KeyNamePair(rs.getInt(3), rs.getString(4).trim());
|
||||
line.add(pp); // 2-UOM
|
||||
// Add locator
|
||||
line.add(getLocatorKeyNamePair(rs.getInt(5))); // 3-Locator
|
||||
pp = new KeyNamePair(rs.getInt(7), rs.getString(8));
|
||||
line.add(pp); // 4-Product
|
||||
line.add(rs.getString(9)); // 5-VendorProductNo
|
||||
int C_OrderLine_ID = rs.getInt(12);
|
||||
if (rs.wasNull())
|
||||
line.add(null); // 6-Order
|
||||
else
|
||||
line.add(new KeyNamePair(C_OrderLine_ID, "."));
|
||||
line.add(null); // 7-Ship
|
||||
pp = new KeyNamePair(rs.getInt(10), rs.getString(11));
|
||||
line.add(pp); // 8-Invoice
|
||||
data.add(line);
|
||||
}
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
log.log(Level.SEVERE, sql.toString(), e);
|
||||
//throw new DBException(e, sql);
|
||||
}
|
||||
finally
|
||||
{
|
||||
DB.close(rs, pstmt);
|
||||
rs = null; pstmt = null;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get KeyNamePair for Locator.
|
||||
* If no locator specified or the specified locator is not valid (e.g. warehouse not match),
|
||||
* a default one will be used.
|
||||
* @param M_Locator_ID
|
||||
* @return KeyNamePair
|
||||
*/
|
||||
protected KeyNamePair getLocatorKeyNamePair(int M_Locator_ID)
|
||||
{
|
||||
MLocator locator = null;
|
||||
|
||||
// Load desired Locator
|
||||
if (M_Locator_ID > 0)
|
||||
{
|
||||
locator = MLocator.get(Env.getCtx(), M_Locator_ID);
|
||||
// Validate warehouse
|
||||
if (locator != null && locator.getM_Warehouse_ID() != getM_Warehouse_ID())
|
||||
{
|
||||
locator = null;
|
||||
}
|
||||
}
|
||||
|
||||
// Try to use default locator from Order Warehouse
|
||||
if (locator == null && p_order != null && p_order.getM_Warehouse_ID() == getM_Warehouse_ID())
|
||||
{
|
||||
MWarehouse wh = MWarehouse.get(Env.getCtx(), p_order.getM_Warehouse_ID());
|
||||
if (wh != null)
|
||||
{
|
||||
locator = wh.getDefaultLocator();
|
||||
}
|
||||
}
|
||||
// Try to get from locator field
|
||||
if (locator == null)
|
||||
{
|
||||
if (defaultLocator_ID > 0)
|
||||
{
|
||||
locator = MLocator.get(Env.getCtx(), defaultLocator_ID);
|
||||
}
|
||||
}
|
||||
// Validate Warehouse
|
||||
if (locator == null || locator.getM_Warehouse_ID() != getM_Warehouse_ID())
|
||||
{
|
||||
locator = MWarehouse.get(Env.getCtx(), getM_Warehouse_ID()).getDefaultLocator();
|
||||
}
|
||||
|
||||
KeyNamePair pp = null ;
|
||||
if (locator != null)
|
||||
{
|
||||
pp = new KeyNamePair(locator.get_ID(), locator.getValue());
|
||||
}
|
||||
return pp;
|
||||
}
|
||||
|
||||
/**
|
||||
* List number of rows selected
|
||||
*/
|
||||
public void info(IMiniTable miniTable, IStatusBar statusBar)
|
||||
{
|
||||
|
||||
} // infoInvoice
|
||||
|
||||
protected void configureMiniTable (IMiniTable miniTable)
|
||||
{
|
||||
miniTable.setColumnClass(0, Boolean.class, false); // Selection
|
||||
miniTable.setColumnClass(1, BigDecimal.class, false); // Qty
|
||||
miniTable.setColumnClass(2, String.class, true); // UOM
|
||||
miniTable.setColumnClass(3, String.class, false); // Locator
|
||||
miniTable.setColumnClass(4, String.class, true); // Product
|
||||
miniTable.setColumnClass(5, String.class, true); // VendorProductNo
|
||||
miniTable.setColumnClass(6, String.class, true); // Order
|
||||
miniTable.setColumnClass(7, String.class, true); // Ship
|
||||
miniTable.setColumnClass(8, String.class, true); // Invoice
|
||||
|
||||
// Table UI
|
||||
miniTable.autoSize();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Save - Create Invoice Lines
|
||||
* @return true if saved
|
||||
*/
|
||||
public boolean save(IMiniTable miniTable, String trxName)
|
||||
{
|
||||
/*
|
||||
dataTable.stopEditor(true);
|
||||
log.config("");
|
||||
TableModel model = dataTable.getModel();
|
||||
int rows = model.getRowCount();
|
||||
if (rows == 0)
|
||||
return false;
|
||||
//
|
||||
Integer defaultLoc = (Integer) locatorField.getValue();
|
||||
if (defaultLoc == null || defaultLoc.intValue() == 0) {
|
||||
locatorField.setBackground(AdempierePLAF.getFieldBackground_Error());
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
int M_Locator_ID = defaultLocator_ID;
|
||||
if (M_Locator_ID == 0) {
|
||||
return false;
|
||||
}
|
||||
// Get Shipment
|
||||
int M_InOut_ID = ((Integer) getGridTab().getValue("M_InOut_ID")).intValue();
|
||||
MInOut inout = new MInOut(Env.getCtx(), M_InOut_ID, trxName);
|
||||
if (log.isLoggable(Level.CONFIG)) log.config(inout + ", C_Locator_ID=" + M_Locator_ID);
|
||||
|
||||
// Lines
|
||||
for (int i = 0; i < miniTable.getRowCount(); i++)
|
||||
{
|
||||
if (((Boolean)miniTable.getValueAt(i, 0)).booleanValue()) {
|
||||
// variable values
|
||||
BigDecimal QtyEntered = (BigDecimal) miniTable.getValueAt(i, 1); // Qty
|
||||
KeyNamePair pp = (KeyNamePair) miniTable.getValueAt(i, 2); // UOM
|
||||
int C_UOM_ID = pp.getKey();
|
||||
pp = (KeyNamePair) miniTable.getValueAt(i, 3); // Locator
|
||||
// If a locator is specified on the product, choose that otherwise default locator
|
||||
M_Locator_ID = pp!=null && pp.getKey()!=0 ? pp.getKey() : defaultLocator_ID;
|
||||
|
||||
pp = (KeyNamePair) miniTable.getValueAt(i, 4); // Product
|
||||
int M_Product_ID = pp.getKey();
|
||||
int C_OrderLine_ID = 0;
|
||||
pp = (KeyNamePair) miniTable.getValueAt(i, 6); // OrderLine
|
||||
if (pp != null)
|
||||
C_OrderLine_ID = pp.getKey();
|
||||
int M_RMALine_ID = 0;
|
||||
pp = (KeyNamePair) miniTable.getValueAt(i, 7); // RMA
|
||||
// If we have RMA
|
||||
if (pp != null)
|
||||
M_RMALine_ID = pp.getKey();
|
||||
int C_InvoiceLine_ID = 0;
|
||||
MInvoiceLine il = null;
|
||||
pp = (KeyNamePair) miniTable.getValueAt(i, 8); // InvoiceLine
|
||||
if (pp != null)
|
||||
C_InvoiceLine_ID = pp.getKey();
|
||||
if (C_InvoiceLine_ID != 0)
|
||||
il = new MInvoiceLine (Env.getCtx(), C_InvoiceLine_ID, trxName);
|
||||
//boolean isInvoiced = (C_InvoiceLine_ID != 0);
|
||||
// Precision of Qty UOM
|
||||
int precision = 2;
|
||||
if (M_Product_ID != 0)
|
||||
{
|
||||
MProduct product = MProduct.get(Env.getCtx(), M_Product_ID);
|
||||
precision = product.getUOMPrecision();
|
||||
}
|
||||
QtyEntered = QtyEntered.setScale(precision, BigDecimal.ROUND_HALF_DOWN);
|
||||
//
|
||||
if (log.isLoggable(Level.FINE)) log.fine("Line QtyEntered=" + QtyEntered
|
||||
+ ", Product=" + M_Product_ID
|
||||
+ ", OrderLine=" + C_OrderLine_ID + ", InvoiceLine=" + C_InvoiceLine_ID);
|
||||
|
||||
// Credit Memo - negative Qty
|
||||
if (m_invoice != null && m_invoice.isCreditMemo() )
|
||||
QtyEntered = QtyEntered.negate();
|
||||
|
||||
// Create new InOut Line
|
||||
MInOutLine iol = new MInOutLine (inout);
|
||||
iol.setM_Product_ID(M_Product_ID, C_UOM_ID); // Line UOM
|
||||
iol.setQty(QtyEntered); // Movement/Entered
|
||||
//
|
||||
MOrderLine ol = null;
|
||||
MRMALine rmal = null;
|
||||
if (C_OrderLine_ID != 0)
|
||||
{
|
||||
iol.setC_OrderLine_ID(C_OrderLine_ID);
|
||||
ol = new MOrderLine (Env.getCtx(), C_OrderLine_ID, trxName);
|
||||
if (ol.getQtyEntered().compareTo(ol.getQtyOrdered()) != 0)
|
||||
{
|
||||
iol.setMovementQty(QtyEntered
|
||||
.multiply(ol.getQtyOrdered())
|
||||
.divide(ol.getQtyEntered(), 12, BigDecimal.ROUND_HALF_UP));
|
||||
iol.setC_UOM_ID(ol.getC_UOM_ID());
|
||||
}
|
||||
iol.setM_AttributeSetInstance_ID(ol.getM_AttributeSetInstance_ID());
|
||||
iol.setDescription(ol.getDescription());
|
||||
//
|
||||
iol.setC_Project_ID(ol.getC_Project_ID());
|
||||
iol.setC_ProjectPhase_ID(ol.getC_ProjectPhase_ID());
|
||||
iol.setC_ProjectTask_ID(ol.getC_ProjectTask_ID());
|
||||
iol.setC_Activity_ID(ol.getC_Activity_ID());
|
||||
iol.setC_Campaign_ID(ol.getC_Campaign_ID());
|
||||
iol.setAD_OrgTrx_ID(ol.getAD_OrgTrx_ID());
|
||||
iol.setUser1_ID(ol.getUser1_ID());
|
||||
iol.setUser2_ID(ol.getUser2_ID());
|
||||
}
|
||||
else if (il != null)
|
||||
{
|
||||
if (il.getQtyEntered().compareTo(il.getQtyInvoiced()) != 0)
|
||||
{
|
||||
iol.setQtyEntered(QtyEntered
|
||||
.multiply(il.getQtyInvoiced())
|
||||
.divide(il.getQtyEntered(), 12, BigDecimal.ROUND_HALF_UP));
|
||||
iol.setC_UOM_ID(il.getC_UOM_ID());
|
||||
}
|
||||
iol.setDescription(il.getDescription());
|
||||
iol.setC_Project_ID(il.getC_Project_ID());
|
||||
iol.setC_ProjectPhase_ID(il.getC_ProjectPhase_ID());
|
||||
iol.setC_ProjectTask_ID(il.getC_ProjectTask_ID());
|
||||
iol.setC_Activity_ID(il.getC_Activity_ID());
|
||||
iol.setC_Campaign_ID(il.getC_Campaign_ID());
|
||||
iol.setAD_OrgTrx_ID(il.getAD_OrgTrx_ID());
|
||||
iol.setUser1_ID(il.getUser1_ID());
|
||||
iol.setUser2_ID(il.getUser2_ID());
|
||||
}
|
||||
else if (M_RMALine_ID != 0)
|
||||
{
|
||||
rmal = new MRMALine(Env.getCtx(), M_RMALine_ID, trxName);
|
||||
iol.setM_RMALine_ID(M_RMALine_ID);
|
||||
iol.setQtyEntered(QtyEntered);
|
||||
iol.setDescription(rmal.getDescription());
|
||||
iol.setM_AttributeSetInstance_ID(rmal.getM_AttributeSetInstance_ID());
|
||||
iol.setC_Project_ID(rmal.getC_Project_ID());
|
||||
iol.setC_ProjectPhase_ID(rmal.getC_ProjectPhase_ID());
|
||||
iol.setC_ProjectTask_ID(rmal.getC_ProjectTask_ID());
|
||||
iol.setC_Activity_ID(rmal.getC_Activity_ID());
|
||||
iol.setAD_OrgTrx_ID(rmal.getAD_OrgTrx_ID());
|
||||
iol.setUser1_ID(rmal.getUser1_ID());
|
||||
iol.setUser2_ID(rmal.getUser2_ID());
|
||||
}
|
||||
|
||||
// Charge
|
||||
if (M_Product_ID == 0)
|
||||
{
|
||||
if (ol != null && ol.getC_Charge_ID() != 0) // from order
|
||||
iol.setC_Charge_ID(ol.getC_Charge_ID());
|
||||
else if (il != null && il.getC_Charge_ID() != 0) // from invoice
|
||||
iol.setC_Charge_ID(il.getC_Charge_ID());
|
||||
else if (rmal != null && rmal.getC_Charge_ID() != 0) // from rma
|
||||
iol.setC_Charge_ID(rmal.getC_Charge_ID());
|
||||
}
|
||||
// Set locator
|
||||
iol.setM_Locator_ID(M_Locator_ID);
|
||||
iol.saveEx();
|
||||
// Create Invoice Line Link
|
||||
if (il != null)
|
||||
{
|
||||
il.setM_InOutLine_ID(iol.getM_InOutLine_ID());
|
||||
il.saveEx();
|
||||
}
|
||||
} // if selected
|
||||
} // for all rows
|
||||
|
||||
/**
|
||||
* Update Header
|
||||
* - if linked to another order/invoice/rma - remove link
|
||||
* - if no link set it
|
||||
*/
|
||||
if (p_order != null && p_order.getC_Order_ID() != 0)
|
||||
{
|
||||
inout.setC_Order_ID (p_order.getC_Order_ID());
|
||||
inout.setAD_OrgTrx_ID(p_order.getAD_OrgTrx_ID());
|
||||
inout.setC_Project_ID(p_order.getC_Project_ID());
|
||||
inout.setC_Campaign_ID(p_order.getC_Campaign_ID());
|
||||
inout.setC_Activity_ID(p_order.getC_Activity_ID());
|
||||
inout.setUser1_ID(p_order.getUser1_ID());
|
||||
inout.setUser2_ID(p_order.getUser2_ID());
|
||||
|
||||
if ( p_order.isDropShip() )
|
||||
{
|
||||
inout.setM_Warehouse_ID( p_order.getM_Warehouse_ID() );
|
||||
inout.setIsDropShip(p_order.isDropShip());
|
||||
inout.setDropShip_BPartner_ID(p_order.getDropShip_BPartner_ID());
|
||||
inout.setDropShip_Location_ID(p_order.getDropShip_Location_ID());
|
||||
inout.setDropShip_User_ID(p_order.getDropShip_User_ID());
|
||||
}
|
||||
}
|
||||
if (m_invoice != null && m_invoice.getC_Invoice_ID() != 0)
|
||||
{
|
||||
if (inout.getC_Order_ID() == 0)
|
||||
inout.setC_Order_ID (m_invoice.getC_Order_ID());
|
||||
inout.setC_Invoice_ID (m_invoice.getC_Invoice_ID());
|
||||
inout.setAD_OrgTrx_ID(m_invoice.getAD_OrgTrx_ID());
|
||||
inout.setC_Project_ID(m_invoice.getC_Project_ID());
|
||||
inout.setC_Campaign_ID(m_invoice.getC_Campaign_ID());
|
||||
inout.setC_Activity_ID(m_invoice.getC_Activity_ID());
|
||||
inout.setUser1_ID(m_invoice.getUser1_ID());
|
||||
inout.setUser2_ID(m_invoice.getUser2_ID());
|
||||
}
|
||||
if (m_rma != null && m_rma.getM_RMA_ID() != 0)
|
||||
{
|
||||
MInOut originalIO = m_rma.getShipment();
|
||||
inout.setIsSOTrx(m_rma.isSOTrx());
|
||||
inout.setC_Order_ID(0);
|
||||
inout.setC_Invoice_ID(0);
|
||||
inout.setM_RMA_ID(m_rma.getM_RMA_ID());
|
||||
inout.setAD_OrgTrx_ID(originalIO.getAD_OrgTrx_ID());
|
||||
inout.setC_Project_ID(originalIO.getC_Project_ID());
|
||||
inout.setC_Campaign_ID(originalIO.getC_Campaign_ID());
|
||||
inout.setC_Activity_ID(originalIO.getC_Activity_ID());
|
||||
inout.setUser1_ID(originalIO.getUser1_ID());
|
||||
inout.setUser2_ID(originalIO.getUser2_ID());
|
||||
}
|
||||
inout.saveEx();
|
||||
return true;
|
||||
|
||||
} // saveInvoice
|
||||
|
||||
protected Vector<String> getOISColumnNames()
|
||||
{
|
||||
// Header Info
|
||||
Vector<String> columnNames = new Vector<String>(7);
|
||||
columnNames.add(Msg.getMsg(Env.getCtx(), "Select"));
|
||||
columnNames.add(Msg.translate(Env.getCtx(), "Quantity"));
|
||||
columnNames.add(Msg.translate(Env.getCtx(), "C_UOM_ID"));
|
||||
columnNames.add(Msg.translate(Env.getCtx(), "M_Locator_ID"));
|
||||
columnNames.add(Msg.translate(Env.getCtx(), "M_Product_ID"));
|
||||
columnNames.add(Msg.getElement(Env.getCtx(), "VendorProductNo", false));
|
||||
columnNames.add(Msg.getElement(Env.getCtx(), "C_Order_ID", false));
|
||||
columnNames.add(Msg.getElement(Env.getCtx(), "M_RMA_ID", false));
|
||||
columnNames.add(Msg.getElement(Env.getCtx(), "C_Invoice_ID", false));
|
||||
|
||||
return columnNames;
|
||||
}
|
||||
|
||||
protected Vector<Vector<Object>> getOrderData (int C_Order_ID, boolean forInvoice, int M_Locator_ID)
|
||||
{
|
||||
defaultLocator_ID = M_Locator_ID;
|
||||
return getOrderData (C_Order_ID, forInvoice);
|
||||
}
|
||||
|
||||
protected Vector<Vector<Object>> getRMAData (int M_RMA_ID, int M_Locator_ID)
|
||||
{
|
||||
defaultLocator_ID = M_Locator_ID;
|
||||
return getRMAData (M_RMA_ID);
|
||||
}
|
||||
|
||||
protected Vector<Vector<Object>> getInvoiceData (int C_Invoice_ID, int M_Locator_ID)
|
||||
{
|
||||
defaultLocator_ID = M_Locator_ID;
|
||||
return getInvoiceData (C_Invoice_ID);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -128,10 +128,10 @@ public class MID_WCreateFromOrder extends MID_CreateFromOrder implements EventLi
|
|||
requisitionField.setHflex("1");
|
||||
row.appendChild(requisitionField);
|
||||
|
||||
if (order.isSOTrx()) {
|
||||
requisitionLabel.setVisible(false);
|
||||
requisitionField.setVisible(false);
|
||||
}
|
||||
// if (order.isSOTrx()) {
|
||||
// requisitionLabel.setVisible(false);
|
||||
// requisitionField.setVisible(false);
|
||||
// }
|
||||
|
||||
row = rows.newRow();
|
||||
|
||||
|
|
@ -162,8 +162,8 @@ public class MID_WCreateFromOrder extends MID_CreateFromOrder implements EventLi
|
|||
}
|
||||
|
||||
MOrder order = new MOrder(Env.getCtx(),C_Order_ID,null);
|
||||
if (order.isSOTrx())
|
||||
return;
|
||||
// if (order.isSOTrx())
|
||||
// return;
|
||||
|
||||
Timestamp dateRequired = null;
|
||||
int M_Requisition_ID = 0;
|
||||
|
|
@ -321,6 +321,10 @@ public class MID_WCreateFromOrder extends MID_CreateFromOrder implements EventLi
|
|||
ArrayList<KeyNamePair> list = loadRequisitionData(C_BPartner_ID, M_Warehouse_ID);
|
||||
for(KeyNamePair knp : list)
|
||||
requisitionField.addItem(knp);
|
||||
}else{
|
||||
ArrayList<KeyNamePair> list = loadRequisitionSOData(C_BPartner_ID, M_Warehouse_ID);
|
||||
for(KeyNamePair knp : list)
|
||||
requisitionField.addItem(knp);
|
||||
}
|
||||
|
||||
requisitionField.setSelectedIndex(0);
|
||||
|
|
@ -339,7 +343,8 @@ public class MID_WCreateFromOrder extends MID_CreateFromOrder implements EventLi
|
|||
*/
|
||||
protected void loadRequisition (int m_Requisition_ID, int M_Product_ID, Timestamp dateRequired, int C_Charge_ID, int salesRepID)
|
||||
{
|
||||
loadTableOIS(getRequisitionData(m_Requisition_ID, M_Product_ID, dateRequired, C_Charge_ID, salesRepID));
|
||||
boolean isSOTrx = "Y".equals((Env.getContext(Env.getCtx(),p_WindowNo, "IsSOTrx")));
|
||||
loadTableOIS(getRequisitionData(m_Requisition_ID, M_Product_ID, dateRequired, C_Charge_ID, salesRepID,isSOTrx));
|
||||
} // Load Requisition
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -0,0 +1,637 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2009 Low Heng Sin *
|
||||
* Copyright (C) 2009 Idalica Corporation *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. 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., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
|
||||
package andromedia.midsuit.form;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.adempiere.webui.ClientInfo;
|
||||
import org.adempiere.webui.LayoutUtils;
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.adempiere.webui.apps.form.WCreateFromWindow;
|
||||
import org.adempiere.webui.component.Checkbox;
|
||||
import org.adempiere.webui.component.Column;
|
||||
import org.adempiere.webui.component.Columns;
|
||||
import org.adempiere.webui.component.Grid;
|
||||
import org.adempiere.webui.component.GridFactory;
|
||||
import org.adempiere.webui.component.Label;
|
||||
import org.adempiere.webui.component.ListModelTable;
|
||||
import org.adempiere.webui.component.Listbox;
|
||||
import org.adempiere.webui.component.ListboxFactory;
|
||||
import org.adempiere.webui.component.Panel;
|
||||
import org.adempiere.webui.component.Row;
|
||||
import org.adempiere.webui.component.Rows;
|
||||
import org.adempiere.webui.editor.WEditor;
|
||||
import org.adempiere.webui.editor.WLocatorEditor;
|
||||
import org.adempiere.webui.editor.WSearchEditor;
|
||||
import org.adempiere.webui.editor.WStringEditor;
|
||||
import org.adempiere.webui.event.ValueChangeEvent;
|
||||
import org.adempiere.webui.event.ValueChangeListener;
|
||||
import org.adempiere.webui.util.ZKUpdateUtil;
|
||||
import org.compiere.grid.CreateFromShipment;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MLocatorLookup;
|
||||
import org.compiere.model.MLookup;
|
||||
import org.compiere.model.MLookupFactory;
|
||||
import org.compiere.model.MProduct;
|
||||
|
||||
import static org.compiere.model.SystemIDs.*;
|
||||
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.DisplayType;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
import org.compiere.util.Msg;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
import org.zkoss.zul.Space;
|
||||
import org.zkoss.zul.Vlayout;
|
||||
|
||||
public class MID_WCreateFromShipment extends CreateFromShipment implements EventListener<Event>, ValueChangeListener
|
||||
{
|
||||
|
||||
private WCreateFromWindow window;
|
||||
|
||||
public MID_WCreateFromShipment(GridTab tab)
|
||||
{
|
||||
super(tab);
|
||||
log.info(getGridTab().toString());
|
||||
|
||||
window = new WCreateFromWindow(this, getGridTab().getWindowNo());
|
||||
|
||||
p_WindowNo = getGridTab().getWindowNo();
|
||||
|
||||
try
|
||||
{
|
||||
if (!dynInit())
|
||||
return;
|
||||
zkInit();
|
||||
setInitOK(true);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
log.log(Level.SEVERE, "", e);
|
||||
setInitOK(false);
|
||||
throw new AdempiereException(e.getMessage());
|
||||
}
|
||||
AEnv.showWindow(window);
|
||||
}
|
||||
|
||||
/** Window No */
|
||||
private int p_WindowNo;
|
||||
|
||||
/** Logger */
|
||||
private CLogger log = CLogger.getCLogger(getClass());
|
||||
|
||||
protected Label bPartnerLabel = new Label();
|
||||
protected WEditor bPartnerField;
|
||||
|
||||
protected Label orderLabel = new Label();
|
||||
protected Listbox orderField = ListboxFactory.newDropdownListbox();
|
||||
|
||||
/** Label for the rma selection */
|
||||
protected Label rmaLabel = new Label();
|
||||
/** Combo box for selecting RMA document */
|
||||
protected Listbox rmaField = ListboxFactory.newDropdownListbox();
|
||||
|
||||
protected Label invoiceLabel = new Label();
|
||||
protected Listbox invoiceField = ListboxFactory.newDropdownListbox();
|
||||
protected Checkbox sameWarehouseCb = new Checkbox();
|
||||
protected Label locatorLabel = new Label();
|
||||
protected WLocatorEditor locatorField = new WLocatorEditor();
|
||||
protected Label upcLabel = new Label();
|
||||
protected WStringEditor upcField = new WStringEditor();
|
||||
|
||||
private Grid parameterStdLayout;
|
||||
|
||||
private int noOfParameterColumn;
|
||||
|
||||
/**
|
||||
* Dynamic Init
|
||||
* @throws Exception if Lookups cannot be initialized
|
||||
* @return true if initialized
|
||||
*/
|
||||
public boolean dynInit() throws Exception
|
||||
{
|
||||
log.config("");
|
||||
|
||||
super.dynInit();
|
||||
|
||||
window.setTitle(getTitle());
|
||||
|
||||
sameWarehouseCb.setSelected(true);
|
||||
sameWarehouseCb.addActionListener(this);
|
||||
// load Locator
|
||||
MLocatorLookup locator = new MLocatorLookup(Env.getCtx(), p_WindowNo);
|
||||
locatorField = new WLocatorEditor ("M_Locator_ID", true, false, true, locator, p_WindowNo);
|
||||
|
||||
initBPartner(false);
|
||||
bPartnerField.addValueChangeListener(this);
|
||||
locatorLabel.setMandatory(true);
|
||||
|
||||
upcField = new WStringEditor ("UPC", false, false, true, 10, 30, null, null);
|
||||
upcField.getComponent().addEventListener(Events.ON_CHANGE, this);
|
||||
|
||||
return true;
|
||||
} // dynInit
|
||||
|
||||
protected void zkInit() throws Exception
|
||||
{
|
||||
boolean isRMAWindow = ((getGridTab().getAD_Window_ID() == WINDOW_RETURNTOVENDOR) || (getGridTab().getAD_Window_ID() == WINDOW_CUSTOMERRETURN));
|
||||
|
||||
bPartnerLabel.setText(Msg.getElement(Env.getCtx(), "C_BPartner_ID"));
|
||||
orderLabel.setText(Msg.getElement(Env.getCtx(), "C_Order_ID", false));
|
||||
invoiceLabel.setText(Msg.getElement(Env.getCtx(), "C_Invoice_ID", false));
|
||||
rmaLabel.setText(Msg.translate(Env.getCtx(), "M_RMA_ID"));
|
||||
locatorLabel.setText(Msg.translate(Env.getCtx(), "M_Locator_ID"));
|
||||
sameWarehouseCb.setText(Msg.getMsg(Env.getCtx(), "FromSameWarehouseOnly", true));
|
||||
sameWarehouseCb.setTooltiptext(Msg.getMsg(Env.getCtx(), "FromSameWarehouseOnly", false));
|
||||
upcLabel.setText(Msg.getElement(Env.getCtx(), "UPC", false));
|
||||
|
||||
Vlayout vlayout = new Vlayout();
|
||||
ZKUpdateUtil.setVflex(vlayout, "min");
|
||||
ZKUpdateUtil.setWidth(vlayout, "100%");
|
||||
Panel parameterPanel = window.getParameterPanel();
|
||||
parameterPanel.appendChild(vlayout);
|
||||
|
||||
parameterStdLayout = GridFactory.newGridLayout();
|
||||
vlayout.appendChild(parameterStdLayout);
|
||||
ZKUpdateUtil.setVflex(vlayout, "parameterStdLayout");
|
||||
|
||||
setupColumns(parameterStdLayout);
|
||||
|
||||
Rows rows = (Rows) parameterStdLayout.newRows();
|
||||
Row row = rows.newRow();
|
||||
row.appendChild(bPartnerLabel.rightAlign());
|
||||
if (bPartnerField != null) {
|
||||
row.appendChild(bPartnerField.getComponent());
|
||||
bPartnerField.fillHorizontal();
|
||||
}
|
||||
if (! isRMAWindow) {
|
||||
row.appendChild(orderLabel.rightAlign());
|
||||
row.appendChild(orderField);
|
||||
ZKUpdateUtil.setHflex(orderField, "1");
|
||||
}
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendChild(locatorLabel.rightAlign());
|
||||
row.appendChild(locatorField.getComponent());
|
||||
if (! isRMAWindow) {
|
||||
row.appendChild(invoiceLabel.rightAlign());
|
||||
row.appendChild(invoiceField);
|
||||
ZKUpdateUtil.setHflex(invoiceField, "1");
|
||||
}
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendChild(new Space());
|
||||
row.appendChild(sameWarehouseCb);
|
||||
|
||||
row = rows.newRow();
|
||||
row.appendChild(upcLabel.rightAlign());
|
||||
row.appendChild(upcField.getComponent());
|
||||
ZKUpdateUtil.setHflex(upcField.getComponent(), "1");
|
||||
if (isRMAWindow) {
|
||||
// Add RMA document selection to panel
|
||||
row.appendChild(rmaLabel.rightAlign());
|
||||
row.appendChild(rmaField);
|
||||
ZKUpdateUtil.setHflex(rmaField, "1");
|
||||
}
|
||||
|
||||
if (ClientInfo.isMobile()) {
|
||||
if (noOfParameterColumn == 2)
|
||||
LayoutUtils.compactTo(parameterStdLayout, 2);
|
||||
ClientInfo.onClientInfo(window, this::onClientInfo);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean m_actionActive = false;
|
||||
|
||||
/**
|
||||
* Action Listener
|
||||
* @param e event
|
||||
* @throws Exception
|
||||
*/
|
||||
public void onEvent(Event e) throws Exception
|
||||
{
|
||||
if (m_actionActive)
|
||||
return;
|
||||
m_actionActive = true;
|
||||
/*
|
||||
// Order
|
||||
if (e.getTarget().equals(orderField))
|
||||
{
|
||||
ListItem li = orderField.getSelectedItem();
|
||||
int C_Order_ID = 0;
|
||||
if (li != null && li.getValue() != null)
|
||||
C_Order_ID = ((Integer) li.getValue()).intValue();
|
||||
// set Invoice, RMA and Shipment to Null
|
||||
rmaField.setSelectedIndex(-1);
|
||||
//shipmentField.setSelectedIndex(-1);
|
||||
loadOrder(C_Order_ID, true);
|
||||
}
|
||||
// Shipment
|
||||
else if (e.getTarget().equals(invoiceField))
|
||||
{
|
||||
ListItem li = shipmentField.getSelectedItem();
|
||||
int M_InOut_ID = 0;
|
||||
if (li != null && li.getValue() != null)
|
||||
M_InOut_ID = ((Integer) li.getValue()).intValue();
|
||||
// set Order, RMA and Invoice to Null
|
||||
orderField.setSelectedIndex(-1);
|
||||
rmaField.setSelectedIndex(-1);
|
||||
loadShipment(M_InOut_ID);
|
||||
}
|
||||
// RMA
|
||||
else if (e.getTarget().equals(rmaField))
|
||||
{
|
||||
ListItem li = rmaField.getSelectedItem();
|
||||
int M_RMA_ID = 0;
|
||||
if (li != null && li.getValue() != null)
|
||||
M_RMA_ID = ((Integer) li.getValue()).intValue();
|
||||
// set Order and Invoice to Null
|
||||
orderField.setSelectedIndex(-1);
|
||||
//shipmentField.setSelectedIndex(-1);
|
||||
loadRMA(M_RMA_ID);
|
||||
}
|
||||
m_actionActive = false;
|
||||
*/
|
||||
|
||||
// Order
|
||||
if (e.getTarget().equals(orderField))
|
||||
{
|
||||
KeyNamePair pp = orderField.getSelectedItem().toKeyNamePair();
|
||||
if (pp == null || pp.getKey() == 0)
|
||||
;
|
||||
else
|
||||
{
|
||||
int C_Order_ID = pp.getKey();
|
||||
// set Invoice and Shipment to Null
|
||||
invoiceField.setSelectedIndex(-1);
|
||||
rmaField.setSelectedIndex(-1);
|
||||
loadOrder(C_Order_ID, false, locatorField.getValue()!=null?((Integer)locatorField.getValue()).intValue():0);
|
||||
}
|
||||
}
|
||||
// Invoice
|
||||
else if (e.getTarget().equals(invoiceField))
|
||||
{
|
||||
KeyNamePair pp = invoiceField.getSelectedItem().toKeyNamePair();
|
||||
if (pp == null || pp.getKey() == 0)
|
||||
;
|
||||
else
|
||||
{
|
||||
int C_Invoice_ID = pp.getKey();
|
||||
// set Order and Shipment to Null
|
||||
orderField.setSelectedIndex(-1);
|
||||
rmaField.setSelectedIndex(-1);
|
||||
loadInvoice(C_Invoice_ID, locatorField.getValue()!=null?((Integer)locatorField.getValue()).intValue():0);
|
||||
}
|
||||
}
|
||||
// RMA
|
||||
else if (e.getTarget().equals(rmaField))
|
||||
{
|
||||
KeyNamePair pp = rmaField.getSelectedItem().toKeyNamePair();
|
||||
if (pp == null || pp.getKey() == 0)
|
||||
;
|
||||
else
|
||||
{
|
||||
int M_RMA_ID = pp.getKey();
|
||||
// set Order and Shipment to Null
|
||||
orderField.setSelectedIndex(-1);
|
||||
invoiceField.setSelectedIndex(-1);
|
||||
loadRMA(M_RMA_ID, locatorField.getValue()!=null?((Integer)locatorField.getValue()).intValue():0);
|
||||
}
|
||||
}
|
||||
//sameWarehouseCb
|
||||
else if (e.getTarget().equals(sameWarehouseCb))
|
||||
{
|
||||
int bpId = bPartnerField.getValue() == null?0:((Integer)bPartnerField.getValue()).intValue();
|
||||
initBPOrderDetails(bpId, false);
|
||||
}
|
||||
else if (e.getTarget().equals(upcField.getComponent()))
|
||||
{
|
||||
checkProductUsingUPC();
|
||||
}
|
||||
|
||||
m_actionActive = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks the UPC value and checks if the UPC matches any of the products in the
|
||||
* list.
|
||||
*/
|
||||
private void checkProductUsingUPC()
|
||||
{
|
||||
String upc = upcField.getDisplay();
|
||||
//DefaultTableModel model = (DefaultTableModel) dialog.getMiniTable().getModel();
|
||||
ListModelTable model = (ListModelTable) window.getWListbox().getModel();
|
||||
|
||||
// Lookup UPC
|
||||
List<MProduct> products = MProduct.getByUPC(Env.getCtx(), upc, null);
|
||||
for (MProduct product : products)
|
||||
{
|
||||
int row = findProductRow(product.get_ID());
|
||||
if (row >= 0)
|
||||
{
|
||||
BigDecimal qty = (BigDecimal)model.getValueAt(row, 1);
|
||||
model.setValueAt(qty, row, 1);
|
||||
model.setValueAt(Boolean.TRUE, row, 0);
|
||||
model.updateComponent(row, row);
|
||||
}
|
||||
}
|
||||
upcField.setValue("");
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the row where a given product is. If the product is not found
|
||||
* in the table -1 is returned.
|
||||
* @param M_Product_ID
|
||||
* @return Row of the product or -1 if non existing.
|
||||
*
|
||||
*/
|
||||
private int findProductRow(int M_Product_ID)
|
||||
{
|
||||
//DefaultTableModel model = (DefaultTableModel)dialog.getMiniTable().getModel();
|
||||
ListModelTable model = (ListModelTable) window.getWListbox().getModel();
|
||||
KeyNamePair kp;
|
||||
for (int i=0; i<model.getRowCount(); i++) {
|
||||
kp = (KeyNamePair)model.getValueAt(i, 4);
|
||||
if (kp.getKey()==M_Product_ID) {
|
||||
return(i);
|
||||
}
|
||||
}
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Change Listener
|
||||
* @param e event
|
||||
*/
|
||||
public void valueChange (ValueChangeEvent e)
|
||||
{
|
||||
if (log.isLoggable(Level.CONFIG)) log.config(e.getPropertyName() + "=" + e.getNewValue());
|
||||
|
||||
// BPartner - load Order/Invoice/Shipment
|
||||
if (e.getPropertyName().equals("C_BPartner_ID"))
|
||||
{
|
||||
int C_BPartner_ID = 0;
|
||||
if (e.getNewValue() != null){
|
||||
C_BPartner_ID = ((Integer)e.getNewValue()).intValue();
|
||||
}
|
||||
|
||||
initBPOrderDetails (C_BPartner_ID, true);
|
||||
}
|
||||
window.tableChanged(null);
|
||||
} // vetoableChange
|
||||
|
||||
/**************************************************************************
|
||||
* Load BPartner Field
|
||||
* @param forInvoice true if Invoices are to be created, false receipts
|
||||
* @throws Exception if Lookups cannot be initialized
|
||||
*/
|
||||
protected void initBPartner (boolean forInvoice) throws Exception
|
||||
{
|
||||
// load BPartner
|
||||
int AD_Column_ID = 3499; // C_Invoice.C_BPartner_ID
|
||||
MLookup lookup = MLookupFactory.get (Env.getCtx(), p_WindowNo, 0, AD_Column_ID, DisplayType.Search);
|
||||
bPartnerField = new WSearchEditor ("C_BPartner_ID", true, false, true, lookup);
|
||||
//
|
||||
int C_BPartner_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_BPartner_ID");
|
||||
bPartnerField.setValue(new Integer(C_BPartner_ID));
|
||||
|
||||
// initial loading
|
||||
initBPOrderDetails(C_BPartner_ID, forInvoice);
|
||||
} // initBPartner
|
||||
|
||||
/**
|
||||
* Init Details - load invoices not shipped
|
||||
* @param C_BPartner_ID BPartner
|
||||
*/
|
||||
private void initBPInvoiceDetails(int C_BPartner_ID)
|
||||
{
|
||||
if (log.isLoggable(Level.CONFIG)) log.config("C_BPartner_ID" + C_BPartner_ID);
|
||||
|
||||
// load Shipments (Receipts) - Completed, Closed
|
||||
invoiceField.removeActionListener(this);
|
||||
invoiceField.removeAllItems();
|
||||
// None
|
||||
KeyNamePair pp = new KeyNamePair(0,"");
|
||||
invoiceField.addItem(pp);
|
||||
|
||||
ArrayList<KeyNamePair> list = loadInvoiceData(C_BPartner_ID);
|
||||
for(KeyNamePair knp : list)
|
||||
invoiceField.addItem(knp);
|
||||
|
||||
invoiceField.setSelectedIndex(0);
|
||||
invoiceField.addActionListener(this);
|
||||
upcField.addValueChangeListener(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load PBartner dependent Order/Invoice/Shipment Field.
|
||||
* @param C_BPartner_ID BPartner
|
||||
* @param forInvoice for invoice
|
||||
*/
|
||||
protected void initBPOrderDetails (int C_BPartner_ID, boolean forInvoice)
|
||||
{
|
||||
if (log.isLoggable(Level.CONFIG)) log.config("C_BPartner_ID=" + C_BPartner_ID);
|
||||
KeyNamePair pp = new KeyNamePair(0,"");
|
||||
// load PO Orders - Closed, Completed
|
||||
orderField.removeActionListener(this);
|
||||
orderField.removeAllItems();
|
||||
orderField.addItem(pp);
|
||||
|
||||
ArrayList<KeyNamePair> list = loadOrderData(C_BPartner_ID, forInvoice, sameWarehouseCb.isSelected());
|
||||
for(KeyNamePair knp : list)
|
||||
orderField.addItem(knp);
|
||||
|
||||
orderField.setSelectedIndex(0);
|
||||
orderField.addActionListener(this);
|
||||
|
||||
initBPDetails(C_BPartner_ID);
|
||||
} // initBPartnerOIS
|
||||
|
||||
public void initBPDetails(int C_BPartner_ID)
|
||||
{
|
||||
initBPInvoiceDetails(C_BPartner_ID);
|
||||
initBPRMADetails(C_BPartner_ID);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load RMA that are candidates for shipment
|
||||
* @param C_BPartner_ID BPartner
|
||||
*/
|
||||
private void initBPRMADetails(int C_BPartner_ID)
|
||||
{
|
||||
rmaField.removeActionListener(this);
|
||||
rmaField.removeAllItems();
|
||||
// None
|
||||
KeyNamePair pp = new KeyNamePair(0,"");
|
||||
rmaField.addItem(pp);
|
||||
|
||||
ArrayList<KeyNamePair> list = loadRMAData(C_BPartner_ID);
|
||||
for(KeyNamePair knp : list)
|
||||
rmaField.addItem(knp);
|
||||
|
||||
rmaField.setSelectedIndex(0);
|
||||
rmaField.addActionListener(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load Data - Order
|
||||
* @param C_Order_ID Order
|
||||
* @param forInvoice true if for invoice vs. delivery qty
|
||||
*/
|
||||
/* protected void loadOrder (int C_Order_ID, boolean forInvoice)
|
||||
{
|
||||
loadTableOIS(getOrderData(C_Order_ID, forInvoice));
|
||||
} // LoadOrder
|
||||
|
||||
protected void loadRMA (int M_RMA_ID)
|
||||
{
|
||||
loadTableOIS(getRMAData(M_RMA_ID));
|
||||
}
|
||||
|
||||
protected void loadShipment (int M_InOut_ID)
|
||||
{
|
||||
loadTableOIS(getShipmentData(M_InOut_ID));
|
||||
}*/
|
||||
|
||||
/**
|
||||
* Load Data - Order
|
||||
* @param C_Order_ID Order
|
||||
* @param forInvoice true if for invoice vs. delivery qty
|
||||
* @param M_Locator_ID
|
||||
*/
|
||||
protected void loadOrder (int C_Order_ID, boolean forInvoice, int M_Locator_ID)
|
||||
{
|
||||
loadTableOIS(getOrderData(C_Order_ID, forInvoice, M_Locator_ID));
|
||||
} // LoadOrder
|
||||
|
||||
/**
|
||||
* Load Data - RMA
|
||||
* @param M_RMA_ID RMA
|
||||
* @param M_Locator_ID
|
||||
*/
|
||||
protected void loadRMA (int M_RMA_ID, int M_Locator_ID)
|
||||
{
|
||||
loadTableOIS(getRMAData(M_RMA_ID, M_Locator_ID));
|
||||
}
|
||||
|
||||
/**
|
||||
* Load Data - Invoice
|
||||
* @param C_Invoice_ID Invoice
|
||||
* @param M_Locator_ID
|
||||
*/
|
||||
protected void loadInvoice (int C_Invoice_ID, int M_Locator_ID)
|
||||
{
|
||||
loadTableOIS(getInvoiceData(C_Invoice_ID, M_Locator_ID));
|
||||
}
|
||||
|
||||
/**
|
||||
* Load Order/Invoice/Shipment data into Table
|
||||
* @param data data
|
||||
*/
|
||||
protected void loadTableOIS (Vector<?> data)
|
||||
{
|
||||
window.getWListbox().clear();
|
||||
|
||||
// Remove previous listeners
|
||||
window.getWListbox().getModel().removeTableModelListener(window);
|
||||
// Set Model
|
||||
ListModelTable model = new ListModelTable(data);
|
||||
model.addTableModelListener(window);
|
||||
window.getWListbox().setData(model, getOISColumnNames());
|
||||
//
|
||||
|
||||
configureMiniTable(window.getWListbox());
|
||||
} // loadOrder
|
||||
|
||||
public void showWindow()
|
||||
{
|
||||
window.setVisible(true);
|
||||
}
|
||||
|
||||
public void closeWindow()
|
||||
{
|
||||
window.dispose();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getWindow() {
|
||||
return window;
|
||||
}
|
||||
|
||||
protected void setupColumns(Grid parameterGrid) {
|
||||
noOfParameterColumn = ClientInfo.maxWidth((ClientInfo.EXTRA_SMALL_WIDTH+ClientInfo.SMALL_WIDTH)/2) ? 2 : 4;
|
||||
Columns columns = new Columns();
|
||||
parameterGrid.appendChild(columns);
|
||||
if (ClientInfo.maxWidth((ClientInfo.EXTRA_SMALL_WIDTH+ClientInfo.SMALL_WIDTH)/2))
|
||||
{
|
||||
Column column = new Column();
|
||||
ZKUpdateUtil.setWidth(column, "35%");
|
||||
columns.appendChild(column);
|
||||
column = new Column();
|
||||
ZKUpdateUtil.setWidth(column, "65%");
|
||||
columns.appendChild(column);
|
||||
}
|
||||
else
|
||||
{
|
||||
Column column = new Column();
|
||||
columns.appendChild(column);
|
||||
column = new Column();
|
||||
ZKUpdateUtil.setWidth(column, "15%");
|
||||
columns.appendChild(column);
|
||||
ZKUpdateUtil.setWidth(column, "35%");
|
||||
column = new Column();
|
||||
ZKUpdateUtil.setWidth(column, "15%");
|
||||
columns.appendChild(column);
|
||||
column = new Column();
|
||||
ZKUpdateUtil.setWidth(column, "35%");
|
||||
columns.appendChild(column);
|
||||
}
|
||||
}
|
||||
|
||||
protected void onClientInfo()
|
||||
{
|
||||
if (ClientInfo.isMobile() && parameterStdLayout != null && parameterStdLayout.getRows() != null)
|
||||
{
|
||||
int nc = ClientInfo.maxWidth((ClientInfo.EXTRA_SMALL_WIDTH+ClientInfo.SMALL_WIDTH)/2) ? 2 : 4;
|
||||
int cc = noOfParameterColumn;
|
||||
if (nc == cc)
|
||||
return;
|
||||
|
||||
parameterStdLayout.getColumns().detach();
|
||||
setupColumns(parameterStdLayout);
|
||||
if (cc > nc)
|
||||
{
|
||||
LayoutUtils.compactTo(parameterStdLayout, nc);
|
||||
}
|
||||
else
|
||||
{
|
||||
LayoutUtils.expandTo(parameterStdLayout, nc, false);
|
||||
}
|
||||
|
||||
ZKUpdateUtil.setCSSHeight(window);
|
||||
ZKUpdateUtil.setCSSWidth(window);
|
||||
window.invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,382 @@
|
|||
/******************************************************************************
|
||||
* Product: iDempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software, you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. 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., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package andromedia.midsuit.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Timestamp;
|
||||
import org.compiere.model.*;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
|
||||
/** Generated Interface for MID_Requisition
|
||||
* @author iDempiere (generated)
|
||||
* @version Release 5.1
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public interface I_MID_Requisition
|
||||
{
|
||||
|
||||
/** TableName=MID_Requisition */
|
||||
public static final String Table_Name = "MID_Requisition";
|
||||
|
||||
/** AD_Table_ID=300000 */
|
||||
public static final int Table_ID = 300000;
|
||||
|
||||
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||
|
||||
/** AccessLevel = 3 - Client - Org
|
||||
*/
|
||||
BigDecimal accessLevel = BigDecimal.valueOf(3);
|
||||
|
||||
/** Load Meta Data */
|
||||
|
||||
/** Column name AD_Client_ID */
|
||||
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
|
||||
|
||||
/** Get Client.
|
||||
* Client/Tenant for this installation.
|
||||
*/
|
||||
public int getAD_Client_ID();
|
||||
|
||||
/** Column name AD_Org_ID */
|
||||
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
|
||||
|
||||
/** Set Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public void setAD_Org_ID (int AD_Org_ID);
|
||||
|
||||
/** Get Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public int getAD_Org_ID();
|
||||
|
||||
/** Column name AD_User_ID */
|
||||
public static final String COLUMNNAME_AD_User_ID = "AD_User_ID";
|
||||
|
||||
/** Set User/Contact.
|
||||
* User within the system - Internal or Business Partner Contact
|
||||
*/
|
||||
public void setAD_User_ID (int AD_User_ID);
|
||||
|
||||
/** Get User/Contact.
|
||||
* User within the system - Internal or Business Partner Contact
|
||||
*/
|
||||
public int getAD_User_ID();
|
||||
|
||||
public org.compiere.model.I_AD_User getAD_User() throws RuntimeException;
|
||||
|
||||
/** Column name C_DocType_ID */
|
||||
public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID";
|
||||
|
||||
/** Set Document Type.
|
||||
* Document type or rules
|
||||
*/
|
||||
public void setC_DocType_ID (int C_DocType_ID);
|
||||
|
||||
/** Get Document Type.
|
||||
* Document type or rules
|
||||
*/
|
||||
public int getC_DocType_ID();
|
||||
|
||||
public org.compiere.model.I_C_DocType getC_DocType() throws RuntimeException;
|
||||
|
||||
/** Column name Created */
|
||||
public static final String COLUMNNAME_Created = "Created";
|
||||
|
||||
/** Get Created.
|
||||
* Date this record was created
|
||||
*/
|
||||
public Timestamp getCreated();
|
||||
|
||||
/** Column name CreatedBy */
|
||||
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
|
||||
|
||||
/** Get Created By.
|
||||
* User who created this records
|
||||
*/
|
||||
public int getCreatedBy();
|
||||
|
||||
/** Column name DateDoc */
|
||||
public static final String COLUMNNAME_DateDoc = "DateDoc";
|
||||
|
||||
/** Set Document Date.
|
||||
* Date of the Document
|
||||
*/
|
||||
public void setDateDoc (Timestamp DateDoc);
|
||||
|
||||
/** Get Document Date.
|
||||
* Date of the Document
|
||||
*/
|
||||
public Timestamp getDateDoc();
|
||||
|
||||
/** Column name DateRequired */
|
||||
public static final String COLUMNNAME_DateRequired = "DateRequired";
|
||||
|
||||
/** Set Date Required.
|
||||
* Date when required
|
||||
*/
|
||||
public void setDateRequired (Timestamp DateRequired);
|
||||
|
||||
/** Get Date Required.
|
||||
* Date when required
|
||||
*/
|
||||
public Timestamp getDateRequired();
|
||||
|
||||
/** Column name Description */
|
||||
public static final String COLUMNNAME_Description = "Description";
|
||||
|
||||
/** Set Description.
|
||||
* Optional short description of the record
|
||||
*/
|
||||
public void setDescription (String Description);
|
||||
|
||||
/** Get Description.
|
||||
* Optional short description of the record
|
||||
*/
|
||||
public String getDescription();
|
||||
|
||||
/** Column name DocAction */
|
||||
public static final String COLUMNNAME_DocAction = "DocAction";
|
||||
|
||||
/** Set Document Action.
|
||||
* The targeted status of the document
|
||||
*/
|
||||
public void setDocAction (String DocAction);
|
||||
|
||||
/** Get Document Action.
|
||||
* The targeted status of the document
|
||||
*/
|
||||
public String getDocAction();
|
||||
|
||||
/** Column name DocStatus */
|
||||
public static final String COLUMNNAME_DocStatus = "DocStatus";
|
||||
|
||||
/** Set Document Status.
|
||||
* The current status of the document
|
||||
*/
|
||||
public void setDocStatus (String DocStatus);
|
||||
|
||||
/** Get Document Status.
|
||||
* The current status of the document
|
||||
*/
|
||||
public String getDocStatus();
|
||||
|
||||
/** Column name DocumentNo */
|
||||
public static final String COLUMNNAME_DocumentNo = "DocumentNo";
|
||||
|
||||
/** Set Document No.
|
||||
* Document sequence number of the document
|
||||
*/
|
||||
public void setDocumentNo (String DocumentNo);
|
||||
|
||||
/** Get Document No.
|
||||
* Document sequence number of the document
|
||||
*/
|
||||
public String getDocumentNo();
|
||||
|
||||
/** Column name Help */
|
||||
public static final String COLUMNNAME_Help = "Help";
|
||||
|
||||
/** Set Comment/Help.
|
||||
* Comment or Hint
|
||||
*/
|
||||
public void setHelp (String Help);
|
||||
|
||||
/** Get Comment/Help.
|
||||
* Comment or Hint
|
||||
*/
|
||||
public String getHelp();
|
||||
|
||||
/** Column name IsActive */
|
||||
public static final String COLUMNNAME_IsActive = "IsActive";
|
||||
|
||||
/** Set Active.
|
||||
* The record is active in the system
|
||||
*/
|
||||
public void setIsActive (boolean IsActive);
|
||||
|
||||
/** Get Active.
|
||||
* The record is active in the system
|
||||
*/
|
||||
public boolean isActive();
|
||||
|
||||
/** Column name IsApproved */
|
||||
public static final String COLUMNNAME_IsApproved = "IsApproved";
|
||||
|
||||
/** Set Approved.
|
||||
* Indicates if this document requires approval
|
||||
*/
|
||||
public void setIsApproved (boolean IsApproved);
|
||||
|
||||
/** Get Approved.
|
||||
* Indicates if this document requires approval
|
||||
*/
|
||||
public boolean isApproved();
|
||||
|
||||
/** Column name MID_Requisition_ID */
|
||||
public static final String COLUMNNAME_MID_Requisition_ID = "MID_Requisition_ID";
|
||||
|
||||
/** Set Midsuit Requisition for Sales Order */
|
||||
public void setMID_Requisition_ID (int MID_Requisition_ID);
|
||||
|
||||
/** Get Midsuit Requisition for Sales Order */
|
||||
public int getMID_Requisition_ID();
|
||||
|
||||
/** Column name MID_Requisition_UU */
|
||||
public static final String COLUMNNAME_MID_Requisition_UU = "MID_Requisition_UU";
|
||||
|
||||
/** Set MID_Requisition_UU */
|
||||
public void setMID_Requisition_UU (String MID_Requisition_UU);
|
||||
|
||||
/** Get MID_Requisition_UU */
|
||||
public String getMID_Requisition_UU();
|
||||
|
||||
/** Column name M_PriceList_ID */
|
||||
public static final String COLUMNNAME_M_PriceList_ID = "M_PriceList_ID";
|
||||
|
||||
/** Set Price List.
|
||||
* Unique identifier of a Price List
|
||||
*/
|
||||
public void setM_PriceList_ID (int M_PriceList_ID);
|
||||
|
||||
/** Get Price List.
|
||||
* Unique identifier of a Price List
|
||||
*/
|
||||
public int getM_PriceList_ID();
|
||||
|
||||
public org.compiere.model.I_M_PriceList getM_PriceList() throws RuntimeException;
|
||||
|
||||
/** Column name M_Warehouse_ID */
|
||||
public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID";
|
||||
|
||||
/** Set Warehouse.
|
||||
* Storage Warehouse and Service Point
|
||||
*/
|
||||
public void setM_Warehouse_ID (int M_Warehouse_ID);
|
||||
|
||||
/** Get Warehouse.
|
||||
* Storage Warehouse and Service Point
|
||||
*/
|
||||
public int getM_Warehouse_ID();
|
||||
|
||||
public org.compiere.model.I_M_Warehouse getM_Warehouse() throws RuntimeException;
|
||||
|
||||
/** Column name Posted */
|
||||
public static final String COLUMNNAME_Posted = "Posted";
|
||||
|
||||
/** Set Posted.
|
||||
* Posting status
|
||||
*/
|
||||
public void setPosted (boolean Posted);
|
||||
|
||||
/** Get Posted.
|
||||
* Posting status
|
||||
*/
|
||||
public boolean isPosted();
|
||||
|
||||
/** Column name PriorityRule */
|
||||
public static final String COLUMNNAME_PriorityRule = "PriorityRule";
|
||||
|
||||
/** Set Priority.
|
||||
* Priority of a document
|
||||
*/
|
||||
public void setPriorityRule (String PriorityRule);
|
||||
|
||||
/** Get Priority.
|
||||
* Priority of a document
|
||||
*/
|
||||
public String getPriorityRule();
|
||||
|
||||
/** Column name Processed */
|
||||
public static final String COLUMNNAME_Processed = "Processed";
|
||||
|
||||
/** Set Processed.
|
||||
* The document has been processed
|
||||
*/
|
||||
public void setProcessed (boolean Processed);
|
||||
|
||||
/** Get Processed.
|
||||
* The document has been processed
|
||||
*/
|
||||
public boolean isProcessed();
|
||||
|
||||
/** Column name ProcessedOn */
|
||||
public static final String COLUMNNAME_ProcessedOn = "ProcessedOn";
|
||||
|
||||
/** Set Processed On.
|
||||
* The date+time (expressed in decimal format) when the document has been processed
|
||||
*/
|
||||
public void setProcessedOn (BigDecimal ProcessedOn);
|
||||
|
||||
/** Get Processed On.
|
||||
* The date+time (expressed in decimal format) when the document has been processed
|
||||
*/
|
||||
public BigDecimal getProcessedOn();
|
||||
|
||||
/** Column name Processing */
|
||||
public static final String COLUMNNAME_Processing = "Processing";
|
||||
|
||||
/** Set Process Now */
|
||||
public void setProcessing (boolean Processing);
|
||||
|
||||
/** Get Process Now */
|
||||
public boolean isProcessing();
|
||||
|
||||
/** Column name SalesRep_ID */
|
||||
public static final String COLUMNNAME_SalesRep_ID = "SalesRep_ID";
|
||||
|
||||
/** Set Sales Representative.
|
||||
* Sales Representative or Company Agent
|
||||
*/
|
||||
public void setSalesRep_ID (int SalesRep_ID);
|
||||
|
||||
/** Get Sales Representative.
|
||||
* Sales Representative or Company Agent
|
||||
*/
|
||||
public int getSalesRep_ID();
|
||||
|
||||
public org.compiere.model.I_AD_User getSalesRep() throws RuntimeException;
|
||||
|
||||
/** Column name TotalLines */
|
||||
public static final String COLUMNNAME_TotalLines = "TotalLines";
|
||||
|
||||
/** Set Total Lines.
|
||||
* Total of all document lines
|
||||
*/
|
||||
public void setTotalLines (BigDecimal TotalLines);
|
||||
|
||||
/** Get Total Lines.
|
||||
* Total of all document lines
|
||||
*/
|
||||
public BigDecimal getTotalLines();
|
||||
|
||||
/** Column name Updated */
|
||||
public static final String COLUMNNAME_Updated = "Updated";
|
||||
|
||||
/** Get Updated.
|
||||
* Date this record was updated
|
||||
*/
|
||||
public Timestamp getUpdated();
|
||||
|
||||
/** Column name UpdatedBy */
|
||||
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
|
||||
|
||||
/** Get Updated By.
|
||||
* User who updated this records
|
||||
*/
|
||||
public int getUpdatedBy();
|
||||
}
|
||||
|
|
@ -0,0 +1,295 @@
|
|||
/******************************************************************************
|
||||
* Product: iDempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software, you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. 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., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package andromedia.midsuit.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Timestamp;
|
||||
import org.compiere.model.*;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
|
||||
/** Generated Interface for MID_RequisitionLine
|
||||
* @author iDempiere (generated)
|
||||
* @version Release 5.1
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public interface I_MID_RequisitionLine
|
||||
{
|
||||
|
||||
/** TableName=MID_RequisitionLine */
|
||||
public static final String Table_Name = "MID_RequisitionLine";
|
||||
|
||||
/** AD_Table_ID=300001 */
|
||||
public static final int Table_ID = 300001;
|
||||
|
||||
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||
|
||||
/** AccessLevel = 3 - Client - Org
|
||||
*/
|
||||
BigDecimal accessLevel = BigDecimal.valueOf(3);
|
||||
|
||||
/** Load Meta Data */
|
||||
|
||||
/** Column name AD_Client_ID */
|
||||
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
|
||||
|
||||
/** Get Client.
|
||||
* Client/Tenant for this installation.
|
||||
*/
|
||||
public int getAD_Client_ID();
|
||||
|
||||
/** Column name AD_Org_ID */
|
||||
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
|
||||
|
||||
/** Set Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public void setAD_Org_ID (int AD_Org_ID);
|
||||
|
||||
/** Get Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public int getAD_Org_ID();
|
||||
|
||||
/** Column name C_BPartner_ID */
|
||||
public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID";
|
||||
|
||||
/** Set Business Partner .
|
||||
* Identifies a Business Partner
|
||||
*/
|
||||
public void setC_BPartner_ID (int C_BPartner_ID);
|
||||
|
||||
/** Get Business Partner .
|
||||
* Identifies a Business Partner
|
||||
*/
|
||||
public int getC_BPartner_ID();
|
||||
|
||||
public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException;
|
||||
|
||||
/** Column name C_Charge_ID */
|
||||
public static final String COLUMNNAME_C_Charge_ID = "C_Charge_ID";
|
||||
|
||||
/** Set Charge.
|
||||
* Additional document charges
|
||||
*/
|
||||
public void setC_Charge_ID (int C_Charge_ID);
|
||||
|
||||
/** Get Charge.
|
||||
* Additional document charges
|
||||
*/
|
||||
public int getC_Charge_ID();
|
||||
|
||||
public org.compiere.model.I_C_Charge getC_Charge() throws RuntimeException;
|
||||
|
||||
/** Column name C_OrderLine_ID */
|
||||
public static final String COLUMNNAME_C_OrderLine_ID = "C_OrderLine_ID";
|
||||
|
||||
/** Set Sales Order Line.
|
||||
* Sales Order Line
|
||||
*/
|
||||
public void setC_OrderLine_ID (int C_OrderLine_ID);
|
||||
|
||||
/** Get Sales Order Line.
|
||||
* Sales Order Line
|
||||
*/
|
||||
public int getC_OrderLine_ID();
|
||||
|
||||
public org.compiere.model.I_C_OrderLine getC_OrderLine() throws RuntimeException;
|
||||
|
||||
/** Column name C_UOM_ID */
|
||||
public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID";
|
||||
|
||||
/** Set UOM.
|
||||
* Unit of Measure
|
||||
*/
|
||||
public void setC_UOM_ID (int C_UOM_ID);
|
||||
|
||||
/** Get UOM.
|
||||
* Unit of Measure
|
||||
*/
|
||||
public int getC_UOM_ID();
|
||||
|
||||
public org.compiere.model.I_C_UOM getC_UOM() throws RuntimeException;
|
||||
|
||||
/** Column name Created */
|
||||
public static final String COLUMNNAME_Created = "Created";
|
||||
|
||||
/** Get Created.
|
||||
* Date this record was created
|
||||
*/
|
||||
public Timestamp getCreated();
|
||||
|
||||
/** Column name CreatedBy */
|
||||
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
|
||||
|
||||
/** Get Created By.
|
||||
* User who created this records
|
||||
*/
|
||||
public int getCreatedBy();
|
||||
|
||||
/** Column name Description */
|
||||
public static final String COLUMNNAME_Description = "Description";
|
||||
|
||||
/** Set Description.
|
||||
* Optional short description of the record
|
||||
*/
|
||||
public void setDescription (String Description);
|
||||
|
||||
/** Get Description.
|
||||
* Optional short description of the record
|
||||
*/
|
||||
public String getDescription();
|
||||
|
||||
/** Column name IsActive */
|
||||
public static final String COLUMNNAME_IsActive = "IsActive";
|
||||
|
||||
/** Set Active.
|
||||
* The record is active in the system
|
||||
*/
|
||||
public void setIsActive (boolean IsActive);
|
||||
|
||||
/** Get Active.
|
||||
* The record is active in the system
|
||||
*/
|
||||
public boolean isActive();
|
||||
|
||||
/** Column name Line */
|
||||
public static final String COLUMNNAME_Line = "Line";
|
||||
|
||||
/** Set Line No.
|
||||
* Unique line for this document
|
||||
*/
|
||||
public void setLine (int Line);
|
||||
|
||||
/** Get Line No.
|
||||
* Unique line for this document
|
||||
*/
|
||||
public int getLine();
|
||||
|
||||
/** Column name LineNetAmt */
|
||||
public static final String COLUMNNAME_LineNetAmt = "LineNetAmt";
|
||||
|
||||
/** Set Line Amount.
|
||||
* Line Extended Amount (Quantity * Actual Price) without Freight and Charges
|
||||
*/
|
||||
public void setLineNetAmt (BigDecimal LineNetAmt);
|
||||
|
||||
/** Get Line Amount.
|
||||
* Line Extended Amount (Quantity * Actual Price) without Freight and Charges
|
||||
*/
|
||||
public BigDecimal getLineNetAmt();
|
||||
|
||||
/** Column name MID_RequisitionLine_ID */
|
||||
public static final String COLUMNNAME_MID_RequisitionLine_ID = "MID_RequisitionLine_ID";
|
||||
|
||||
/** Set Midsuit Requisition Line for Sales Order */
|
||||
public void setMID_RequisitionLine_ID (int MID_RequisitionLine_ID);
|
||||
|
||||
/** Get Midsuit Requisition Line for Sales Order */
|
||||
public int getMID_RequisitionLine_ID();
|
||||
|
||||
/** Column name MID_RequisitionLine_UU */
|
||||
public static final String COLUMNNAME_MID_RequisitionLine_UU = "MID_RequisitionLine_UU";
|
||||
|
||||
/** Set MID_RequisitionLine_UU */
|
||||
public void setMID_RequisitionLine_UU (String MID_RequisitionLine_UU);
|
||||
|
||||
/** Get MID_RequisitionLine_UU */
|
||||
public String getMID_RequisitionLine_UU();
|
||||
|
||||
/** Column name MID_Requisition_ID */
|
||||
public static final String COLUMNNAME_MID_Requisition_ID = "MID_Requisition_ID";
|
||||
|
||||
/** Set Midsuit Requisition for Sales Order */
|
||||
public void setMID_Requisition_ID (int MID_Requisition_ID);
|
||||
|
||||
/** Get Midsuit Requisition for Sales Order */
|
||||
public int getMID_Requisition_ID();
|
||||
|
||||
public I_MID_Requisition getMID_Requisition() throws RuntimeException;
|
||||
|
||||
/** Column name M_AttributeSetInstance_ID */
|
||||
public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID";
|
||||
|
||||
/** Set Attribute Set Instance.
|
||||
* Product Attribute Set Instance
|
||||
*/
|
||||
public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID);
|
||||
|
||||
/** Get Attribute Set Instance.
|
||||
* Product Attribute Set Instance
|
||||
*/
|
||||
public int getM_AttributeSetInstance_ID();
|
||||
|
||||
public I_M_AttributeSetInstance getM_AttributeSetInstance() throws RuntimeException;
|
||||
|
||||
/** Column name M_Product_ID */
|
||||
public static final String COLUMNNAME_M_Product_ID = "M_Product_ID";
|
||||
|
||||
/** Set Product.
|
||||
* Product, Service, Item
|
||||
*/
|
||||
public void setM_Product_ID (int M_Product_ID);
|
||||
|
||||
/** Get Product.
|
||||
* Product, Service, Item
|
||||
*/
|
||||
public int getM_Product_ID();
|
||||
|
||||
public org.compiere.model.I_M_Product getM_Product() throws RuntimeException;
|
||||
|
||||
/** Column name PriceActual */
|
||||
public static final String COLUMNNAME_PriceActual = "PriceActual";
|
||||
|
||||
/** Set Unit Price.
|
||||
* Actual Price
|
||||
*/
|
||||
public void setPriceActual (BigDecimal PriceActual);
|
||||
|
||||
/** Get Unit Price.
|
||||
* Actual Price
|
||||
*/
|
||||
public BigDecimal getPriceActual();
|
||||
|
||||
/** Column name Qty */
|
||||
public static final String COLUMNNAME_Qty = "Qty";
|
||||
|
||||
/** Set Quantity.
|
||||
* Quantity
|
||||
*/
|
||||
public void setQty (BigDecimal Qty);
|
||||
|
||||
/** Get Quantity.
|
||||
* Quantity
|
||||
*/
|
||||
public BigDecimal getQty();
|
||||
|
||||
/** Column name Updated */
|
||||
public static final String COLUMNNAME_Updated = "Updated";
|
||||
|
||||
/** Get Updated.
|
||||
* Date this record was updated
|
||||
*/
|
||||
public Timestamp getUpdated();
|
||||
|
||||
/** Column name UpdatedBy */
|
||||
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
|
||||
|
||||
/** Get Updated By.
|
||||
* User who updated this records
|
||||
*/
|
||||
public int getUpdatedBy();
|
||||
}
|
||||
|
|
@ -0,0 +1,588 @@
|
|||
/******************************************************************************
|
||||
* Product: iDempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software, you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. 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., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package andromedia.midsuit.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Timestamp;
|
||||
import org.compiere.model.*;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
|
||||
/** Generated Interface for T_Aging
|
||||
* @author iDempiere (generated)
|
||||
* @version Release 5.1
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public interface I_T_Aging
|
||||
{
|
||||
|
||||
/** TableName=T_Aging */
|
||||
public static final String Table_Name = "T_Aging";
|
||||
|
||||
/** AD_Table_ID=631 */
|
||||
public static final int Table_ID = 631;
|
||||
|
||||
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||
|
||||
/** AccessLevel = 3 - Client - Org
|
||||
*/
|
||||
BigDecimal accessLevel = BigDecimal.valueOf(3);
|
||||
|
||||
/** Load Meta Data */
|
||||
|
||||
/** Column name AD_Client_ID */
|
||||
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
|
||||
|
||||
/** Get Client.
|
||||
* Client/Tenant for this installation.
|
||||
*/
|
||||
public int getAD_Client_ID();
|
||||
|
||||
/** Column name AD_Org_ID */
|
||||
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
|
||||
|
||||
/** Set Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public void setAD_Org_ID (int AD_Org_ID);
|
||||
|
||||
/** Get Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public int getAD_Org_ID();
|
||||
|
||||
/** Column name AD_PInstance_ID */
|
||||
public static final String COLUMNNAME_AD_PInstance_ID = "AD_PInstance_ID";
|
||||
|
||||
/** Set Process Instance.
|
||||
* Instance of the process
|
||||
*/
|
||||
public void setAD_PInstance_ID (int AD_PInstance_ID);
|
||||
|
||||
/** Get Process Instance.
|
||||
* Instance of the process
|
||||
*/
|
||||
public int getAD_PInstance_ID();
|
||||
|
||||
public org.compiere.model.I_AD_PInstance getAD_PInstance() throws RuntimeException;
|
||||
|
||||
/** Column name C_Activity_ID */
|
||||
public static final String COLUMNNAME_C_Activity_ID = "C_Activity_ID";
|
||||
|
||||
/** Set Activity.
|
||||
* Business Activity
|
||||
*/
|
||||
public void setC_Activity_ID (int C_Activity_ID);
|
||||
|
||||
/** Get Activity.
|
||||
* Business Activity
|
||||
*/
|
||||
public int getC_Activity_ID();
|
||||
|
||||
public org.compiere.model.I_C_Activity getC_Activity() throws RuntimeException;
|
||||
|
||||
/** Column name C_BPartner_ID */
|
||||
public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID";
|
||||
|
||||
/** Set Business Partner .
|
||||
* Identifies a Business Partner
|
||||
*/
|
||||
public void setC_BPartner_ID (int C_BPartner_ID);
|
||||
|
||||
/** Get Business Partner .
|
||||
* Identifies a Business Partner
|
||||
*/
|
||||
public int getC_BPartner_ID();
|
||||
|
||||
public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException;
|
||||
|
||||
/** Column name C_BP_Group_ID */
|
||||
public static final String COLUMNNAME_C_BP_Group_ID = "C_BP_Group_ID";
|
||||
|
||||
/** Set Business Partner Group.
|
||||
* Business Partner Group
|
||||
*/
|
||||
public void setC_BP_Group_ID (int C_BP_Group_ID);
|
||||
|
||||
/** Get Business Partner Group.
|
||||
* Business Partner Group
|
||||
*/
|
||||
public int getC_BP_Group_ID();
|
||||
|
||||
public org.compiere.model.I_C_BP_Group getC_BP_Group() throws RuntimeException;
|
||||
|
||||
/** Column name C_Campaign_ID */
|
||||
public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID";
|
||||
|
||||
/** Set Campaign.
|
||||
* Marketing Campaign
|
||||
*/
|
||||
public void setC_Campaign_ID (int C_Campaign_ID);
|
||||
|
||||
/** Get Campaign.
|
||||
* Marketing Campaign
|
||||
*/
|
||||
public int getC_Campaign_ID();
|
||||
|
||||
public org.compiere.model.I_C_Campaign getC_Campaign() throws RuntimeException;
|
||||
|
||||
/** Column name C_Currency_ID */
|
||||
public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID";
|
||||
|
||||
/** Set Currency.
|
||||
* The Currency for this record
|
||||
*/
|
||||
public void setC_Currency_ID (int C_Currency_ID);
|
||||
|
||||
/** Get Currency.
|
||||
* The Currency for this record
|
||||
*/
|
||||
public int getC_Currency_ID();
|
||||
|
||||
public org.compiere.model.I_C_Currency getC_Currency() throws RuntimeException;
|
||||
|
||||
/** Column name C_Invoice_ID */
|
||||
public static final String COLUMNNAME_C_Invoice_ID = "C_Invoice_ID";
|
||||
|
||||
/** Set Invoice.
|
||||
* Invoice Identifier
|
||||
*/
|
||||
public void setC_Invoice_ID (int C_Invoice_ID);
|
||||
|
||||
/** Get Invoice.
|
||||
* Invoice Identifier
|
||||
*/
|
||||
public int getC_Invoice_ID();
|
||||
|
||||
public org.compiere.model.I_C_Invoice getC_Invoice() throws RuntimeException;
|
||||
|
||||
/** Column name C_InvoicePaySchedule_ID */
|
||||
public static final String COLUMNNAME_C_InvoicePaySchedule_ID = "C_InvoicePaySchedule_ID";
|
||||
|
||||
/** Set Invoice Payment Schedule.
|
||||
* Invoice Payment Schedule
|
||||
*/
|
||||
public void setC_InvoicePaySchedule_ID (int C_InvoicePaySchedule_ID);
|
||||
|
||||
/** Get Invoice Payment Schedule.
|
||||
* Invoice Payment Schedule
|
||||
*/
|
||||
public int getC_InvoicePaySchedule_ID();
|
||||
|
||||
public org.compiere.model.I_C_InvoicePaySchedule getC_InvoicePaySchedule() throws RuntimeException;
|
||||
|
||||
/** Column name C_Project_ID */
|
||||
public static final String COLUMNNAME_C_Project_ID = "C_Project_ID";
|
||||
|
||||
/** Set Project.
|
||||
* Financial Project
|
||||
*/
|
||||
public void setC_Project_ID (int C_Project_ID);
|
||||
|
||||
/** Get Project.
|
||||
* Financial Project
|
||||
*/
|
||||
public int getC_Project_ID();
|
||||
|
||||
public org.compiere.model.I_C_Project getC_Project() throws RuntimeException;
|
||||
|
||||
/** Column name Created */
|
||||
public static final String COLUMNNAME_Created = "Created";
|
||||
|
||||
/** Get Created.
|
||||
* Date this record was created
|
||||
*/
|
||||
public Timestamp getCreated();
|
||||
|
||||
/** Column name CreatedBy */
|
||||
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
|
||||
|
||||
/** Get Created By.
|
||||
* User who created this records
|
||||
*/
|
||||
public int getCreatedBy();
|
||||
|
||||
/** Column name DateAcct */
|
||||
public static final String COLUMNNAME_DateAcct = "DateAcct";
|
||||
|
||||
/** Set Account Date.
|
||||
* Accounting Date
|
||||
*/
|
||||
public void setDateAcct (boolean DateAcct);
|
||||
|
||||
/** Get Account Date.
|
||||
* Accounting Date
|
||||
*/
|
||||
public boolean isDateAcct();
|
||||
|
||||
/** Column name DaysDue */
|
||||
public static final String COLUMNNAME_DaysDue = "DaysDue";
|
||||
|
||||
/** Set Days due.
|
||||
* Number of days due (negative: due in number of days)
|
||||
*/
|
||||
public void setDaysDue (int DaysDue);
|
||||
|
||||
/** Get Days due.
|
||||
* Number of days due (negative: due in number of days)
|
||||
*/
|
||||
public int getDaysDue();
|
||||
|
||||
/** Column name Due0 */
|
||||
public static final String COLUMNNAME_Due0 = "Due0";
|
||||
|
||||
/** Set Due Today */
|
||||
public void setDue0 (BigDecimal Due0);
|
||||
|
||||
/** Get Due Today */
|
||||
public BigDecimal getDue0();
|
||||
|
||||
/** Column name Due0_30 */
|
||||
public static final String COLUMNNAME_Due0_30 = "Due0_30";
|
||||
|
||||
/** Set Due Today-30 */
|
||||
public void setDue0_30 (BigDecimal Due0_30);
|
||||
|
||||
/** Get Due Today-30 */
|
||||
public BigDecimal getDue0_30();
|
||||
|
||||
/** Column name Due0_7 */
|
||||
public static final String COLUMNNAME_Due0_7 = "Due0_7";
|
||||
|
||||
/** Set Due Today-7 */
|
||||
public void setDue0_7 (BigDecimal Due0_7);
|
||||
|
||||
/** Get Due Today-7 */
|
||||
public BigDecimal getDue0_7();
|
||||
|
||||
/** Column name Due121_Plus */
|
||||
public static final String COLUMNNAME_Due121_Plus = "Due121_Plus";
|
||||
|
||||
/** Set Due > 121 */
|
||||
public void setDue121_Plus (BigDecimal Due121_Plus);
|
||||
|
||||
/** Get Due > 121 */
|
||||
public BigDecimal getDue121_Plus();
|
||||
|
||||
/** Column name Due1_7 */
|
||||
public static final String COLUMNNAME_Due1_7 = "Due1_7";
|
||||
|
||||
/** Set Due 1-7 */
|
||||
public void setDue1_7 (BigDecimal Due1_7);
|
||||
|
||||
/** Get Due 1-7 */
|
||||
public BigDecimal getDue1_7();
|
||||
|
||||
/** Column name Due31_60 */
|
||||
public static final String COLUMNNAME_Due31_60 = "Due31_60";
|
||||
|
||||
/** Set Due 31-60 */
|
||||
public void setDue31_60 (BigDecimal Due31_60);
|
||||
|
||||
/** Get Due 31-60 */
|
||||
public BigDecimal getDue31_60();
|
||||
|
||||
/** Column name Due31_Plus */
|
||||
public static final String COLUMNNAME_Due31_Plus = "Due31_Plus";
|
||||
|
||||
/** Set Due > 31 */
|
||||
public void setDue31_Plus (BigDecimal Due31_Plus);
|
||||
|
||||
/** Get Due > 31 */
|
||||
public BigDecimal getDue31_Plus();
|
||||
|
||||
/** Column name Due61_90 */
|
||||
public static final String COLUMNNAME_Due61_90 = "Due61_90";
|
||||
|
||||
/** Set Due 61-90 */
|
||||
public void setDue61_90 (BigDecimal Due61_90);
|
||||
|
||||
/** Get Due 61-90 */
|
||||
public BigDecimal getDue61_90();
|
||||
|
||||
/** Column name Due61_Plus */
|
||||
public static final String COLUMNNAME_Due61_Plus = "Due61_Plus";
|
||||
|
||||
/** Set Due > 61 */
|
||||
public void setDue61_Plus (BigDecimal Due61_Plus);
|
||||
|
||||
/** Get Due > 61 */
|
||||
public BigDecimal getDue61_Plus();
|
||||
|
||||
/** Column name Due8_30 */
|
||||
public static final String COLUMNNAME_Due8_30 = "Due8_30";
|
||||
|
||||
/** Set Due 8-30 */
|
||||
public void setDue8_30 (BigDecimal Due8_30);
|
||||
|
||||
/** Get Due 8-30 */
|
||||
public BigDecimal getDue8_30();
|
||||
|
||||
/** Column name Due91_120 */
|
||||
public static final String COLUMNNAME_Due91_120 = "Due91_120";
|
||||
|
||||
/** Set Due 91-120 */
|
||||
public void setDue91_120 (BigDecimal Due91_120);
|
||||
|
||||
/** Get Due 91-120 */
|
||||
public BigDecimal getDue91_120();
|
||||
|
||||
/** Column name Due91_Plus */
|
||||
public static final String COLUMNNAME_Due91_Plus = "Due91_Plus";
|
||||
|
||||
/** Set Due > 91 */
|
||||
public void setDue91_Plus (BigDecimal Due91_Plus);
|
||||
|
||||
/** Get Due > 91 */
|
||||
public BigDecimal getDue91_Plus();
|
||||
|
||||
/** Column name DueAmt */
|
||||
public static final String COLUMNNAME_DueAmt = "DueAmt";
|
||||
|
||||
/** Set Amount due.
|
||||
* Amount of the payment due
|
||||
*/
|
||||
public void setDueAmt (BigDecimal DueAmt);
|
||||
|
||||
/** Get Amount due.
|
||||
* Amount of the payment due
|
||||
*/
|
||||
public BigDecimal getDueAmt();
|
||||
|
||||
/** Column name DueDate */
|
||||
public static final String COLUMNNAME_DueDate = "DueDate";
|
||||
|
||||
/** Set Due Date.
|
||||
* Date when the payment is due
|
||||
*/
|
||||
public void setDueDate (Timestamp DueDate);
|
||||
|
||||
/** Get Due Date.
|
||||
* Date when the payment is due
|
||||
*/
|
||||
public Timestamp getDueDate();
|
||||
|
||||
/** Column name InvoicedAmt */
|
||||
public static final String COLUMNNAME_InvoicedAmt = "InvoicedAmt";
|
||||
|
||||
/** Set Invoiced Amount.
|
||||
* The amount invoiced
|
||||
*/
|
||||
public void setInvoicedAmt (BigDecimal InvoicedAmt);
|
||||
|
||||
/** Get Invoiced Amount.
|
||||
* The amount invoiced
|
||||
*/
|
||||
public BigDecimal getInvoicedAmt();
|
||||
|
||||
/** Column name IsActive */
|
||||
public static final String COLUMNNAME_IsActive = "IsActive";
|
||||
|
||||
/** Set Active.
|
||||
* The record is active in the system
|
||||
*/
|
||||
public void setIsActive (boolean IsActive);
|
||||
|
||||
/** Get Active.
|
||||
* The record is active in the system
|
||||
*/
|
||||
public boolean isActive();
|
||||
|
||||
/** Column name IsListInvoices */
|
||||
public static final String COLUMNNAME_IsListInvoices = "IsListInvoices";
|
||||
|
||||
/** Set List Invoices.
|
||||
* Include List of Invoices
|
||||
*/
|
||||
public void setIsListInvoices (boolean IsListInvoices);
|
||||
|
||||
/** Get List Invoices.
|
||||
* Include List of Invoices
|
||||
*/
|
||||
public boolean isListInvoices();
|
||||
|
||||
/** Column name IsSOTrx */
|
||||
public static final String COLUMNNAME_IsSOTrx = "IsSOTrx";
|
||||
|
||||
/** Set Sales Transaction.
|
||||
* This is a Sales Transaction
|
||||
*/
|
||||
public void setIsSOTrx (boolean IsSOTrx);
|
||||
|
||||
/** Get Sales Transaction.
|
||||
* This is a Sales Transaction
|
||||
*/
|
||||
public boolean isSOTrx();
|
||||
|
||||
/** Column name OpenAmt */
|
||||
public static final String COLUMNNAME_OpenAmt = "OpenAmt";
|
||||
|
||||
/** Set Open Amount.
|
||||
* Open item amount
|
||||
*/
|
||||
public void setOpenAmt (BigDecimal OpenAmt);
|
||||
|
||||
/** Get Open Amount.
|
||||
* Open item amount
|
||||
*/
|
||||
public BigDecimal getOpenAmt();
|
||||
|
||||
/** Column name PastDue121_Plus */
|
||||
public static final String COLUMNNAME_PastDue121_Plus = "PastDue121_Plus";
|
||||
|
||||
/** Set Past Due > 121 */
|
||||
public void setPastDue121_Plus (BigDecimal PastDue121_Plus);
|
||||
|
||||
/** Get Past Due > 121 */
|
||||
public BigDecimal getPastDue121_Plus();
|
||||
|
||||
/** Column name PastDue1_30 */
|
||||
public static final String COLUMNNAME_PastDue1_30 = "PastDue1_30";
|
||||
|
||||
/** Set Past Due 1-30 */
|
||||
public void setPastDue1_30 (BigDecimal PastDue1_30);
|
||||
|
||||
/** Get Past Due 1-30 */
|
||||
public BigDecimal getPastDue1_30();
|
||||
|
||||
/** Column name PastDue1_7 */
|
||||
public static final String COLUMNNAME_PastDue1_7 = "PastDue1_7";
|
||||
|
||||
/** Set Past Due 1-7 */
|
||||
public void setPastDue1_7 (BigDecimal PastDue1_7);
|
||||
|
||||
/** Get Past Due 1-7 */
|
||||
public BigDecimal getPastDue1_7();
|
||||
|
||||
/** Column name PastDue31_60 */
|
||||
public static final String COLUMNNAME_PastDue31_60 = "PastDue31_60";
|
||||
|
||||
/** Set Past Due 31-60 */
|
||||
public void setPastDue31_60 (BigDecimal PastDue31_60);
|
||||
|
||||
/** Get Past Due 31-60 */
|
||||
public BigDecimal getPastDue31_60();
|
||||
|
||||
/** Column name PastDue31_Plus */
|
||||
public static final String COLUMNNAME_PastDue31_Plus = "PastDue31_Plus";
|
||||
|
||||
/** Set Past Due > 31 */
|
||||
public void setPastDue31_Plus (BigDecimal PastDue31_Plus);
|
||||
|
||||
/** Get Past Due > 31 */
|
||||
public BigDecimal getPastDue31_Plus();
|
||||
|
||||
/** Column name PastDue61_90 */
|
||||
public static final String COLUMNNAME_PastDue61_90 = "PastDue61_90";
|
||||
|
||||
/** Set Past Due 61-90 */
|
||||
public void setPastDue61_90 (BigDecimal PastDue61_90);
|
||||
|
||||
/** Get Past Due 61-90 */
|
||||
public BigDecimal getPastDue61_90();
|
||||
|
||||
/** Column name PastDue61_Plus */
|
||||
public static final String COLUMNNAME_PastDue61_Plus = "PastDue61_Plus";
|
||||
|
||||
/** Set Past Due > 61 */
|
||||
public void setPastDue61_Plus (BigDecimal PastDue61_Plus);
|
||||
|
||||
/** Get Past Due > 61 */
|
||||
public BigDecimal getPastDue61_Plus();
|
||||
|
||||
/** Column name PastDue8_30 */
|
||||
public static final String COLUMNNAME_PastDue8_30 = "PastDue8_30";
|
||||
|
||||
/** Set Past Due 8-30 */
|
||||
public void setPastDue8_30 (BigDecimal PastDue8_30);
|
||||
|
||||
/** Get Past Due 8-30 */
|
||||
public BigDecimal getPastDue8_30();
|
||||
|
||||
/** Column name PastDue91_120 */
|
||||
public static final String COLUMNNAME_PastDue91_120 = "PastDue91_120";
|
||||
|
||||
/** Set Past Due 91-120 */
|
||||
public void setPastDue91_120 (BigDecimal PastDue91_120);
|
||||
|
||||
/** Get Past Due 91-120 */
|
||||
public BigDecimal getPastDue91_120();
|
||||
|
||||
/** Column name PastDue91_Plus */
|
||||
public static final String COLUMNNAME_PastDue91_Plus = "PastDue91_Plus";
|
||||
|
||||
/** Set Past Due > 91 */
|
||||
public void setPastDue91_Plus (BigDecimal PastDue91_Plus);
|
||||
|
||||
/** Get Past Due > 91 */
|
||||
public BigDecimal getPastDue91_Plus();
|
||||
|
||||
/** Column name PastDueAmt */
|
||||
public static final String COLUMNNAME_PastDueAmt = "PastDueAmt";
|
||||
|
||||
/** Set Past Due */
|
||||
public void setPastDueAmt (BigDecimal PastDueAmt);
|
||||
|
||||
/** Get Past Due */
|
||||
public BigDecimal getPastDueAmt();
|
||||
|
||||
/** Column name StatementDate */
|
||||
public static final String COLUMNNAME_StatementDate = "StatementDate";
|
||||
|
||||
/** Set Statement date.
|
||||
* Date of the statement
|
||||
*/
|
||||
public void setStatementDate (Timestamp StatementDate);
|
||||
|
||||
/** Get Statement date.
|
||||
* Date of the statement
|
||||
*/
|
||||
public Timestamp getStatementDate();
|
||||
|
||||
/** Column name T_Aging_UU */
|
||||
public static final String COLUMNNAME_T_Aging_UU = "T_Aging_UU";
|
||||
|
||||
/** Set T_Aging_UU */
|
||||
public void setT_Aging_UU (String T_Aging_UU);
|
||||
|
||||
/** Get T_Aging_UU */
|
||||
public String getT_Aging_UU();
|
||||
|
||||
/** Column name UnallocatedPayment */
|
||||
public static final String COLUMNNAME_UnallocatedPayment = "UnallocatedPayment";
|
||||
|
||||
/** Set Unallocated Payment */
|
||||
public void setUnallocatedPayment (BigDecimal UnallocatedPayment);
|
||||
|
||||
/** Get Unallocated Payment */
|
||||
public BigDecimal getUnallocatedPayment();
|
||||
|
||||
/** Column name Updated */
|
||||
public static final String COLUMNNAME_Updated = "Updated";
|
||||
|
||||
/** Get Updated.
|
||||
* Date this record was updated
|
||||
*/
|
||||
public Timestamp getUpdated();
|
||||
|
||||
/** Column name UpdatedBy */
|
||||
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
|
||||
|
||||
/** Get Updated By.
|
||||
* User who updated this records
|
||||
*/
|
||||
public int getUpdatedBy();
|
||||
}
|
||||
|
|
@ -0,0 +1,302 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. 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., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package andromedia.midsuit.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.compiere.util.Env;
|
||||
|
||||
/**
|
||||
* Aging Model
|
||||
*
|
||||
* @author Jorg Janke
|
||||
* @version $Id: MAging.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $
|
||||
*/
|
||||
public class MID_Aging extends X_T_Aging
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 3067400117623770188L;
|
||||
|
||||
/**
|
||||
* Standard Constructor
|
||||
* @param ctx context
|
||||
* @param T_Aging_ID id
|
||||
* @param trxName transaction
|
||||
*/
|
||||
public MID_Aging (Properties ctx, int T_Aging_ID, String trxName)
|
||||
{
|
||||
super (ctx, T_Aging_ID, trxName);
|
||||
if (T_Aging_ID == 0)
|
||||
{
|
||||
// setAD_PInstance_ID (0);
|
||||
// setC_BP_Group_ID (0);
|
||||
// setC_BPartner_ID (0);
|
||||
// setC_Currency_ID (0);
|
||||
//
|
||||
setDueAmt (Env.ZERO);
|
||||
setDue0 (Env.ZERO);
|
||||
setDue0_7 (Env.ZERO);
|
||||
setDue0_30 (Env.ZERO);
|
||||
setDue1_7 (Env.ZERO);
|
||||
setDue31_60 (Env.ZERO);
|
||||
setDue31_Plus (Env.ZERO);
|
||||
setDue61_90 (Env.ZERO);
|
||||
setDue61_Plus (Env.ZERO);
|
||||
setDue8_30 (Env.ZERO);
|
||||
setDue91_Plus (Env.ZERO);
|
||||
setDue91_120 (Env.ZERO);
|
||||
setDue121_Plus (Env.ZERO);
|
||||
//
|
||||
setPastDueAmt (Env.ZERO);
|
||||
setPastDue1_7 (Env.ZERO);
|
||||
setPastDue1_30 (Env.ZERO);
|
||||
setPastDue31_60 (Env.ZERO);
|
||||
setPastDue31_Plus (Env.ZERO);
|
||||
setPastDue61_90 (Env.ZERO);
|
||||
setPastDue61_Plus (Env.ZERO);
|
||||
setPastDue8_30 (Env.ZERO);
|
||||
setPastDue91_Plus (Env.ZERO);
|
||||
setPastDue91_120 (Env.ZERO);
|
||||
setPastDue121_Plus (Env.ZERO);
|
||||
//
|
||||
setOpenAmt(Env.ZERO);
|
||||
setInvoicedAmt(Env.ZERO);
|
||||
//
|
||||
setIsListInvoices (false);
|
||||
setIsSOTrx (false);
|
||||
// setDueDate (new Timestamp(System.currentTimeMillis()));
|
||||
// setStatementDate (new Timestamp(System.currentTimeMillis()));
|
||||
}
|
||||
} // T_Aging
|
||||
|
||||
/**
|
||||
* Full Constructor
|
||||
* @param ctx context
|
||||
* @param AD_PInstance_ID instance
|
||||
* @param StatementDate statement date
|
||||
* @param C_BPartner_ID bpartner
|
||||
* @param C_Currency_ID currency
|
||||
* @param C_Invoice_ID invoice
|
||||
* @param C_InvoicePaySchedule_ID invoice schedule
|
||||
* @param C_BP_Group_ID group
|
||||
* @param AD_Org_ID organization
|
||||
* @param DueDate due date
|
||||
* @param IsSOTrx SO Trx
|
||||
* @param trxName transaction
|
||||
*/
|
||||
public MID_Aging (Properties ctx, int AD_PInstance_ID, Timestamp StatementDate,
|
||||
int C_BPartner_ID, int C_Currency_ID,
|
||||
int C_Invoice_ID, int C_InvoicePaySchedule_ID,
|
||||
int C_BP_Group_ID, int AD_Org_ID, Timestamp DueDate, boolean IsSOTrx, String trxName)
|
||||
{
|
||||
this (ctx, 0, trxName);
|
||||
setAD_PInstance_ID (AD_PInstance_ID);
|
||||
setStatementDate(StatementDate);
|
||||
//
|
||||
setC_BPartner_ID (C_BPartner_ID);
|
||||
setC_Currency_ID (C_Currency_ID);
|
||||
setC_BP_Group_ID (C_BP_Group_ID);
|
||||
setAD_Org_ID(AD_Org_ID);
|
||||
setIsSOTrx (IsSOTrx);
|
||||
|
||||
// Optional
|
||||
// setC_Invoice_ID (C_Invoice_ID); // may be zero
|
||||
set_ValueNoCheck ("C_Invoice_ID", new Integer(C_Invoice_ID));
|
||||
// setC_InvoicePaySchedule_ID(C_InvoicePaySchedule_ID); // may be zero
|
||||
set_Value ("C_InvoicePaySchedule_ID", new Integer(C_InvoicePaySchedule_ID));
|
||||
setIsListInvoices(C_Invoice_ID != 0);
|
||||
//
|
||||
setDueDate(DueDate); // only sensible if List invoices
|
||||
} // MAging
|
||||
|
||||
/**
|
||||
* Partial Constructor - backward compatibility
|
||||
* @param ctx context
|
||||
* @param AD_PInstance_ID instance
|
||||
* @param StatementDate statement date
|
||||
* @param C_BPartner_ID bpartner
|
||||
* @param C_Currency_ID currency
|
||||
* @param C_Invoice_ID invoice
|
||||
* @param C_InvoicePaySchedule_ID invoice schedule
|
||||
* @param C_BP_Group_ID group
|
||||
* @param DueDate due date
|
||||
* @param IsSOTrx SO Trx
|
||||
* @param trxName transaction
|
||||
*
|
||||
* @deprecated - better use the new constructor with organization included
|
||||
*/
|
||||
public MID_Aging (Properties ctx, int AD_PInstance_ID, Timestamp StatementDate,
|
||||
int C_BPartner_ID, int C_Currency_ID,
|
||||
int C_Invoice_ID, int C_InvoicePaySchedule_ID,
|
||||
int C_BP_Group_ID, Timestamp DueDate, boolean IsSOTrx, String trxName)
|
||||
{
|
||||
this (ctx, 0, trxName);
|
||||
setAD_PInstance_ID (AD_PInstance_ID);
|
||||
setStatementDate(StatementDate);
|
||||
//
|
||||
setC_BPartner_ID (C_BPartner_ID);
|
||||
setC_Currency_ID (C_Currency_ID);
|
||||
setC_BP_Group_ID (C_BP_Group_ID);
|
||||
setIsSOTrx (IsSOTrx);
|
||||
|
||||
// Optional
|
||||
// setC_Invoice_ID (C_Invoice_ID); // may be zero
|
||||
set_ValueNoCheck ("C_Invoice_ID", new Integer(C_Invoice_ID));
|
||||
// setC_InvoicePaySchedule_ID(C_InvoicePaySchedule_ID); // may be zero
|
||||
set_Value ("C_InvoicePaySchedule_ID", new Integer(C_InvoicePaySchedule_ID));
|
||||
setIsListInvoices(C_Invoice_ID != 0);
|
||||
//
|
||||
setDueDate(DueDate); // only sensible if List invoices
|
||||
} // MAging
|
||||
|
||||
/**
|
||||
* Load Constructor
|
||||
* @param ctx context
|
||||
* @param rs result set
|
||||
* @param trxName transaction
|
||||
*/
|
||||
public MID_Aging (Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super(ctx, rs, trxName);
|
||||
} // MAging
|
||||
|
||||
/** Number of items */
|
||||
private int m_noItems = 0;
|
||||
/** Sum of Due Days */
|
||||
private int m_daysDueSum = 0;
|
||||
|
||||
/**
|
||||
* Add Amount to Buckets
|
||||
* @param DueDate due date
|
||||
* @param daysDue positive due - negative not due
|
||||
* @param invoicedAmt invoiced amount
|
||||
* @param openAmt open amount
|
||||
*/
|
||||
public void add (Timestamp DueDate, int daysDue, BigDecimal invoicedAmt, BigDecimal openAmt, BigDecimal unallocatedPayment)
|
||||
{
|
||||
if (invoicedAmt == null)
|
||||
invoicedAmt = Env.ZERO;
|
||||
setInvoicedAmt(getInvoicedAmt().add(invoicedAmt));
|
||||
if (openAmt == null)
|
||||
openAmt = Env.ZERO;
|
||||
setOpenAmt(getOpenAmt().add(openAmt));
|
||||
// Days Due
|
||||
m_noItems++;
|
||||
m_daysDueSum += daysDue;
|
||||
setDaysDue(m_daysDueSum/m_noItems);
|
||||
// Due Date
|
||||
if (getDueDate().after(DueDate))
|
||||
setDueDate(DueDate); // earliest
|
||||
//
|
||||
BigDecimal amt = openAmt;
|
||||
setUnallocatedPayment(unallocatedPayment);
|
||||
// Not due - negative
|
||||
if (daysDue <= 0)
|
||||
{
|
||||
setDueAmt (getDueAmt().add(amt));
|
||||
if (daysDue == 0)
|
||||
setDue0 (getDue0().add(amt));
|
||||
|
||||
if (daysDue >= -7)
|
||||
setDue0_7 (getDue0_7().add(amt));
|
||||
|
||||
if (daysDue >= -30)
|
||||
setDue0_30 (getDue0_30().add(amt));
|
||||
|
||||
if (daysDue <= -1 && daysDue >= -7)
|
||||
setDue1_7 (getDue1_7().add(amt));
|
||||
|
||||
if (daysDue <= -8 && daysDue >= -30)
|
||||
setDue8_30 (getDue8_30().add(amt));
|
||||
|
||||
if (daysDue <= -31 && daysDue >= -60)
|
||||
setDue31_60 (getDue31_60().add(amt));
|
||||
|
||||
if (daysDue <= -31)
|
||||
setDue31_Plus (getDue31_Plus().add(amt));
|
||||
|
||||
if (daysDue <= -61 && daysDue >= -90)
|
||||
setDue61_90 (getDue61_90().add(amt));
|
||||
|
||||
if (daysDue <= -61)
|
||||
setDue61_Plus (getDue61_Plus().add(amt));
|
||||
|
||||
if (daysDue <= -91)
|
||||
setDue91_Plus (getDue91_Plus().add(amt));
|
||||
|
||||
if (daysDue <= -91 && daysDue >= -120)
|
||||
setDue91_120 (getDue91_120().add(amt));
|
||||
|
||||
if (daysDue <= -121)
|
||||
setDue121_Plus (getDue121_Plus().add(amt));
|
||||
}
|
||||
else // Due = positive (> 1)
|
||||
{
|
||||
setPastDueAmt (getPastDueAmt().add(amt));
|
||||
if (daysDue <= 7)
|
||||
setPastDue1_7 (getPastDue1_7().add(amt));
|
||||
|
||||
if (daysDue <= 30)
|
||||
setPastDue1_30 (getPastDue1_30().add(amt));
|
||||
|
||||
if (daysDue >= 8 && daysDue <= 30)
|
||||
setPastDue8_30 (getPastDue8_30().add(amt));
|
||||
|
||||
if (daysDue >= 31 && daysDue <= 60)
|
||||
setPastDue31_60 (getPastDue31_60().add(amt));
|
||||
|
||||
if (daysDue >= 31)
|
||||
setPastDue31_Plus (getPastDue31_Plus().add(amt));
|
||||
|
||||
if (daysDue >= 61 && daysDue <= 90)
|
||||
setPastDue61_90 (getPastDue61_90().add(amt));
|
||||
|
||||
if (daysDue >= 61)
|
||||
setPastDue61_Plus (getPastDue61_Plus().add(amt));
|
||||
|
||||
if (daysDue >= 91)
|
||||
setPastDue91_Plus (getPastDue91_Plus().add(amt));
|
||||
|
||||
if (daysDue >= 91 && daysDue <= 120)
|
||||
setPastDue91_120 (getPastDue91_120().add(amt));
|
||||
|
||||
if (daysDue >= 121)
|
||||
setPastDue121_Plus (getPastDue121_Plus().add(amt));
|
||||
}
|
||||
} // add
|
||||
|
||||
/**
|
||||
* String Representation
|
||||
* @return info
|
||||
*/
|
||||
public String toString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder("MAging[");
|
||||
sb.append("AD_PInstance_ID=").append(getAD_PInstance_ID())
|
||||
.append(",C_BPartner_ID=").append(getC_BPartner_ID())
|
||||
.append(",C_Currency_ID=").append(getC_Currency_ID())
|
||||
.append(",C_Invoice_ID=").append(getC_Invoice_ID());
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
} // toString
|
||||
|
||||
} // MAging
|
||||
|
|
@ -0,0 +1,140 @@
|
|||
package andromedia.midsuit.model;
|
||||
|
||||
import java.io.File;
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.compiere.model.MProcess;
|
||||
import org.compiere.process.DocAction;
|
||||
import org.compiere.process.DocOptions;
|
||||
import org.compiere.process.DocumentEngine;
|
||||
import org.compiere.util.Env;
|
||||
|
||||
public class MID_MRequisitionTrx extends X_MID_Requisition implements DocAction{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 2193895537897396480L;
|
||||
String m_processMsg;
|
||||
public MID_MRequisitionTrx(Properties ctx, int MID_Requisition_ID, String trxName) {
|
||||
super(ctx, MID_Requisition_ID, trxName);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public MID_MRequisitionTrx(Properties ctx, ResultSet rs, String trxName) {
|
||||
super(ctx, rs, trxName);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean processIt(String action) throws Exception {
|
||||
m_processMsg = null;
|
||||
DocumentEngine engine = new DocumentEngine (this, getDocStatus());
|
||||
return engine.processIt (action, getDocAction());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean unlockIt() {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean invalidateIt() {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String prepareIt() {
|
||||
return DocAction.STATUS_InProgress;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean approveIt() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean rejectIt() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String completeIt() {
|
||||
setProcessed(true);
|
||||
return DocAction.STATUS_Completed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean voidIt() {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean closeIt() {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean reverseCorrectIt() {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean reverseAccrualIt() {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean reActivateIt() {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSummary() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDocumentInfo() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public File createPDF() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getProcessMsg() {
|
||||
return m_processMsg;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDoc_User_ID() {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getC_Currency_ID() {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getApprovalAmt() {
|
||||
return Env.ONE;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package andromedia.midsuit.model;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.util.Properties;
|
||||
|
||||
public class MID_MRequisitionTrxLine extends X_MID_RequisitionLine {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -2408405870754126257L;
|
||||
|
||||
public MID_MRequisitionTrxLine(Properties ctx, int MID_RequisitionLine_ID, String trxName) {
|
||||
super(ctx, MID_RequisitionLine_ID, trxName);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public MID_MRequisitionTrxLine(Properties ctx, ResultSet rs, String trxName) {
|
||||
super(ctx, rs, trxName);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,616 @@
|
|||
/******************************************************************************
|
||||
* Product: iDempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software, you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. 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., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
/** Generated Model - DO NOT CHANGE */
|
||||
package andromedia.midsuit.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Properties;
|
||||
import org.compiere.model.*;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
|
||||
/** Generated Model for MID_Requisition
|
||||
* @author iDempiere (generated)
|
||||
* @version Release 5.1 - $Id$ */
|
||||
public class X_MID_Requisition extends PO implements I_MID_Requisition, I_Persistent
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20180221L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_MID_Requisition (Properties ctx, int MID_Requisition_ID, String trxName)
|
||||
{
|
||||
super (ctx, MID_Requisition_ID, trxName);
|
||||
/** if (MID_Requisition_ID == 0)
|
||||
{
|
||||
setAD_User_ID (0);
|
||||
setC_DocType_ID (0);
|
||||
setDateDoc (new Timestamp( System.currentTimeMillis() ));
|
||||
// @#Date@
|
||||
setDateRequired (new Timestamp( System.currentTimeMillis() ));
|
||||
setDocAction (null);
|
||||
// CO
|
||||
setDocStatus (null);
|
||||
// DR
|
||||
setDocumentNo (null);
|
||||
setIsApproved (false);
|
||||
setMID_Requisition_ID (0);
|
||||
setM_PriceList_ID (0);
|
||||
setM_Warehouse_ID (0);
|
||||
setPosted (false);
|
||||
setPriorityRule (null);
|
||||
// 5
|
||||
setProcessed (false);
|
||||
setTotalLines (Env.ZERO);
|
||||
} */
|
||||
}
|
||||
|
||||
/** Load Constructor */
|
||||
public X_MID_Requisition (Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super (ctx, rs, trxName);
|
||||
}
|
||||
|
||||
/** AccessLevel
|
||||
* @return 3 - Client - Org
|
||||
*/
|
||||
protected int get_AccessLevel()
|
||||
{
|
||||
return accessLevel.intValue();
|
||||
}
|
||||
|
||||
/** Load Meta Data */
|
||||
protected POInfo initPO (Properties ctx)
|
||||
{
|
||||
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
|
||||
return poi;
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
StringBuffer sb = new StringBuffer ("X_MID_Requisition[")
|
||||
.append(get_ID()).append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_AD_User getAD_User() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_AD_User)MTable.get(getCtx(), org.compiere.model.I_AD_User.Table_Name)
|
||||
.getPO(getAD_User_ID(), get_TrxName()); }
|
||||
|
||||
/** Set User/Contact.
|
||||
@param AD_User_ID
|
||||
User within the system - Internal or Business Partner Contact
|
||||
*/
|
||||
public void setAD_User_ID (int AD_User_ID)
|
||||
{
|
||||
if (AD_User_ID < 1)
|
||||
set_Value (COLUMNNAME_AD_User_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID));
|
||||
}
|
||||
|
||||
/** Get User/Contact.
|
||||
@return User within the system - Internal or Business Partner Contact
|
||||
*/
|
||||
public int getAD_User_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_C_DocType getC_DocType() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_C_DocType)MTable.get(getCtx(), org.compiere.model.I_C_DocType.Table_Name)
|
||||
.getPO(getC_DocType_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Document Type.
|
||||
@param C_DocType_ID
|
||||
Document type or rules
|
||||
*/
|
||||
public void setC_DocType_ID (int C_DocType_ID)
|
||||
{
|
||||
if (C_DocType_ID < 0)
|
||||
set_Value (COLUMNNAME_C_DocType_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID));
|
||||
}
|
||||
|
||||
/** Get Document Type.
|
||||
@return Document type or rules
|
||||
*/
|
||||
public int getC_DocType_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Document Date.
|
||||
@param DateDoc
|
||||
Date of the Document
|
||||
*/
|
||||
public void setDateDoc (Timestamp DateDoc)
|
||||
{
|
||||
set_Value (COLUMNNAME_DateDoc, DateDoc);
|
||||
}
|
||||
|
||||
/** Get Document Date.
|
||||
@return Date of the Document
|
||||
*/
|
||||
public Timestamp getDateDoc ()
|
||||
{
|
||||
return (Timestamp)get_Value(COLUMNNAME_DateDoc);
|
||||
}
|
||||
|
||||
/** Set Date Required.
|
||||
@param DateRequired
|
||||
Date when required
|
||||
*/
|
||||
public void setDateRequired (Timestamp DateRequired)
|
||||
{
|
||||
set_Value (COLUMNNAME_DateRequired, DateRequired);
|
||||
}
|
||||
|
||||
/** Get Date Required.
|
||||
@return Date when required
|
||||
*/
|
||||
public Timestamp getDateRequired ()
|
||||
{
|
||||
return (Timestamp)get_Value(COLUMNNAME_DateRequired);
|
||||
}
|
||||
|
||||
/** Set Description.
|
||||
@param Description
|
||||
Optional short description of the record
|
||||
*/
|
||||
public void setDescription (String Description)
|
||||
{
|
||||
set_Value (COLUMNNAME_Description, Description);
|
||||
}
|
||||
|
||||
/** Get Description.
|
||||
@return Optional short description of the record
|
||||
*/
|
||||
public String getDescription ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_Description);
|
||||
}
|
||||
|
||||
/** DocAction AD_Reference_ID=135 */
|
||||
public static final int DOCACTION_AD_Reference_ID=135;
|
||||
/** Complete = CO */
|
||||
public static final String DOCACTION_Complete = "CO";
|
||||
/** Approve = AP */
|
||||
public static final String DOCACTION_Approve = "AP";
|
||||
/** Reject = RJ */
|
||||
public static final String DOCACTION_Reject = "RJ";
|
||||
/** Post = PO */
|
||||
public static final String DOCACTION_Post = "PO";
|
||||
/** Void = VO */
|
||||
public static final String DOCACTION_Void = "VO";
|
||||
/** Close = CL */
|
||||
public static final String DOCACTION_Close = "CL";
|
||||
/** Reverse - Correct = RC */
|
||||
public static final String DOCACTION_Reverse_Correct = "RC";
|
||||
/** Reverse - Accrual = RA */
|
||||
public static final String DOCACTION_Reverse_Accrual = "RA";
|
||||
/** Invalidate = IN */
|
||||
public static final String DOCACTION_Invalidate = "IN";
|
||||
/** Re-activate = RE */
|
||||
public static final String DOCACTION_Re_Activate = "RE";
|
||||
/** <None> = -- */
|
||||
public static final String DOCACTION_None = "--";
|
||||
/** Prepare = PR */
|
||||
public static final String DOCACTION_Prepare = "PR";
|
||||
/** Unlock = XL */
|
||||
public static final String DOCACTION_Unlock = "XL";
|
||||
/** Wait Complete = WC */
|
||||
public static final String DOCACTION_WaitComplete = "WC";
|
||||
/** Set Document Action.
|
||||
@param DocAction
|
||||
The targeted status of the document
|
||||
*/
|
||||
public void setDocAction (String DocAction)
|
||||
{
|
||||
|
||||
set_Value (COLUMNNAME_DocAction, DocAction);
|
||||
}
|
||||
|
||||
/** Get Document Action.
|
||||
@return The targeted status of the document
|
||||
*/
|
||||
public String getDocAction ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_DocAction);
|
||||
}
|
||||
|
||||
/** DocStatus AD_Reference_ID=131 */
|
||||
public static final int DOCSTATUS_AD_Reference_ID=131;
|
||||
/** Drafted = DR */
|
||||
public static final String DOCSTATUS_Drafted = "DR";
|
||||
/** Completed = CO */
|
||||
public static final String DOCSTATUS_Completed = "CO";
|
||||
/** Approved = AP */
|
||||
public static final String DOCSTATUS_Approved = "AP";
|
||||
/** Not Approved = NA */
|
||||
public static final String DOCSTATUS_NotApproved = "NA";
|
||||
/** Voided = VO */
|
||||
public static final String DOCSTATUS_Voided = "VO";
|
||||
/** Invalid = IN */
|
||||
public static final String DOCSTATUS_Invalid = "IN";
|
||||
/** Reversed = RE */
|
||||
public static final String DOCSTATUS_Reversed = "RE";
|
||||
/** Closed = CL */
|
||||
public static final String DOCSTATUS_Closed = "CL";
|
||||
/** Unknown = ?? */
|
||||
public static final String DOCSTATUS_Unknown = "??";
|
||||
/** In Progress = IP */
|
||||
public static final String DOCSTATUS_InProgress = "IP";
|
||||
/** Waiting Payment = WP */
|
||||
public static final String DOCSTATUS_WaitingPayment = "WP";
|
||||
/** Waiting Confirmation = WC */
|
||||
public static final String DOCSTATUS_WaitingConfirmation = "WC";
|
||||
/** Set Document Status.
|
||||
@param DocStatus
|
||||
The current status of the document
|
||||
*/
|
||||
public void setDocStatus (String DocStatus)
|
||||
{
|
||||
|
||||
set_Value (COLUMNNAME_DocStatus, DocStatus);
|
||||
}
|
||||
|
||||
/** Get Document Status.
|
||||
@return The current status of the document
|
||||
*/
|
||||
public String getDocStatus ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_DocStatus);
|
||||
}
|
||||
|
||||
/** Set Document No.
|
||||
@param DocumentNo
|
||||
Document sequence number of the document
|
||||
*/
|
||||
public void setDocumentNo (String DocumentNo)
|
||||
{
|
||||
set_ValueNoCheck (COLUMNNAME_DocumentNo, DocumentNo);
|
||||
}
|
||||
|
||||
/** Get Document No.
|
||||
@return Document sequence number of the document
|
||||
*/
|
||||
public String getDocumentNo ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_DocumentNo);
|
||||
}
|
||||
|
||||
/** Get Record ID/ColumnName
|
||||
@return ID/ColumnName pair
|
||||
*/
|
||||
public KeyNamePair getKeyNamePair()
|
||||
{
|
||||
return new KeyNamePair(get_ID(), getDocumentNo());
|
||||
}
|
||||
|
||||
/** Set Comment/Help.
|
||||
@param Help
|
||||
Comment or Hint
|
||||
*/
|
||||
public void setHelp (String Help)
|
||||
{
|
||||
set_Value (COLUMNNAME_Help, Help);
|
||||
}
|
||||
|
||||
/** Get Comment/Help.
|
||||
@return Comment or Hint
|
||||
*/
|
||||
public String getHelp ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_Help);
|
||||
}
|
||||
|
||||
/** Set Approved.
|
||||
@param IsApproved
|
||||
Indicates if this document requires approval
|
||||
*/
|
||||
public void setIsApproved (boolean IsApproved)
|
||||
{
|
||||
set_Value (COLUMNNAME_IsApproved, Boolean.valueOf(IsApproved));
|
||||
}
|
||||
|
||||
/** Get Approved.
|
||||
@return Indicates if this document requires approval
|
||||
*/
|
||||
public boolean isApproved ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_IsApproved);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Set Midsuit Requisition for Sales Order.
|
||||
@param MID_Requisition_ID Midsuit Requisition for Sales Order */
|
||||
public void setMID_Requisition_ID (int MID_Requisition_ID)
|
||||
{
|
||||
if (MID_Requisition_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_MID_Requisition_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_MID_Requisition_ID, Integer.valueOf(MID_Requisition_ID));
|
||||
}
|
||||
|
||||
/** Get Midsuit Requisition for Sales Order.
|
||||
@return Midsuit Requisition for Sales Order */
|
||||
public int getMID_Requisition_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_MID_Requisition_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set MID_Requisition_UU.
|
||||
@param MID_Requisition_UU MID_Requisition_UU */
|
||||
public void setMID_Requisition_UU (String MID_Requisition_UU)
|
||||
{
|
||||
set_Value (COLUMNNAME_MID_Requisition_UU, MID_Requisition_UU);
|
||||
}
|
||||
|
||||
/** Get MID_Requisition_UU.
|
||||
@return MID_Requisition_UU */
|
||||
public String getMID_Requisition_UU ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_MID_Requisition_UU);
|
||||
}
|
||||
|
||||
public org.compiere.model.I_M_PriceList getM_PriceList() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_M_PriceList)MTable.get(getCtx(), org.compiere.model.I_M_PriceList.Table_Name)
|
||||
.getPO(getM_PriceList_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Price List.
|
||||
@param M_PriceList_ID
|
||||
Unique identifier of a Price List
|
||||
*/
|
||||
public void setM_PriceList_ID (int M_PriceList_ID)
|
||||
{
|
||||
if (M_PriceList_ID < 1)
|
||||
set_Value (COLUMNNAME_M_PriceList_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_M_PriceList_ID, Integer.valueOf(M_PriceList_ID));
|
||||
}
|
||||
|
||||
/** Get Price List.
|
||||
@return Unique identifier of a Price List
|
||||
*/
|
||||
public int getM_PriceList_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_M_PriceList_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_M_Warehouse getM_Warehouse() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_M_Warehouse)MTable.get(getCtx(), org.compiere.model.I_M_Warehouse.Table_Name)
|
||||
.getPO(getM_Warehouse_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Warehouse.
|
||||
@param M_Warehouse_ID
|
||||
Storage Warehouse and Service Point
|
||||
*/
|
||||
public void setM_Warehouse_ID (int M_Warehouse_ID)
|
||||
{
|
||||
if (M_Warehouse_ID < 1)
|
||||
set_Value (COLUMNNAME_M_Warehouse_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID));
|
||||
}
|
||||
|
||||
/** Get Warehouse.
|
||||
@return Storage Warehouse and Service Point
|
||||
*/
|
||||
public int getM_Warehouse_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_M_Warehouse_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Posted.
|
||||
@param Posted
|
||||
Posting status
|
||||
*/
|
||||
public void setPosted (boolean Posted)
|
||||
{
|
||||
set_Value (COLUMNNAME_Posted, Boolean.valueOf(Posted));
|
||||
}
|
||||
|
||||
/** Get Posted.
|
||||
@return Posting status
|
||||
*/
|
||||
public boolean isPosted ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_Posted);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** PriorityRule AD_Reference_ID=154 */
|
||||
public static final int PRIORITYRULE_AD_Reference_ID=154;
|
||||
/** High = 3 */
|
||||
public static final String PRIORITYRULE_High = "3";
|
||||
/** Medium = 5 */
|
||||
public static final String PRIORITYRULE_Medium = "5";
|
||||
/** Low = 7 */
|
||||
public static final String PRIORITYRULE_Low = "7";
|
||||
/** Urgent = 1 */
|
||||
public static final String PRIORITYRULE_Urgent = "1";
|
||||
/** Minor = 9 */
|
||||
public static final String PRIORITYRULE_Minor = "9";
|
||||
/** Set Priority.
|
||||
@param PriorityRule
|
||||
Priority of a document
|
||||
*/
|
||||
public void setPriorityRule (String PriorityRule)
|
||||
{
|
||||
|
||||
set_Value (COLUMNNAME_PriorityRule, PriorityRule);
|
||||
}
|
||||
|
||||
/** Get Priority.
|
||||
@return Priority of a document
|
||||
*/
|
||||
public String getPriorityRule ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_PriorityRule);
|
||||
}
|
||||
|
||||
/** Set Processed.
|
||||
@param Processed
|
||||
The document has been processed
|
||||
*/
|
||||
public void setProcessed (boolean Processed)
|
||||
{
|
||||
set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
|
||||
}
|
||||
|
||||
/** Get Processed.
|
||||
@return The document has been processed
|
||||
*/
|
||||
public boolean isProcessed ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_Processed);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Set Processed On.
|
||||
@param ProcessedOn
|
||||
The date+time (expressed in decimal format) when the document has been processed
|
||||
*/
|
||||
public void setProcessedOn (BigDecimal ProcessedOn)
|
||||
{
|
||||
set_Value (COLUMNNAME_ProcessedOn, ProcessedOn);
|
||||
}
|
||||
|
||||
/** Get Processed On.
|
||||
@return The date+time (expressed in decimal format) when the document has been processed
|
||||
*/
|
||||
public BigDecimal getProcessedOn ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Process Now.
|
||||
@param Processing Process Now */
|
||||
public void setProcessing (boolean Processing)
|
||||
{
|
||||
set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing));
|
||||
}
|
||||
|
||||
/** Get Process Now.
|
||||
@return Process Now */
|
||||
public boolean isProcessing ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_Processing);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public org.compiere.model.I_AD_User getSalesRep() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_AD_User)MTable.get(getCtx(), org.compiere.model.I_AD_User.Table_Name)
|
||||
.getPO(getSalesRep_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Sales Representative.
|
||||
@param SalesRep_ID
|
||||
Sales Representative or Company Agent
|
||||
*/
|
||||
public void setSalesRep_ID (int SalesRep_ID)
|
||||
{
|
||||
if (SalesRep_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_SalesRep_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_SalesRep_ID, Integer.valueOf(SalesRep_ID));
|
||||
}
|
||||
|
||||
/** Get Sales Representative.
|
||||
@return Sales Representative or Company Agent
|
||||
*/
|
||||
public int getSalesRep_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_SalesRep_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Total Lines.
|
||||
@param TotalLines
|
||||
Total of all document lines
|
||||
*/
|
||||
public void setTotalLines (BigDecimal TotalLines)
|
||||
{
|
||||
set_Value (COLUMNNAME_TotalLines, TotalLines);
|
||||
}
|
||||
|
||||
/** Get Total Lines.
|
||||
@return Total of all document lines
|
||||
*/
|
||||
public BigDecimal getTotalLines ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TotalLines);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,413 @@
|
|||
/******************************************************************************
|
||||
* Product: iDempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software, you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. 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., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
/** Generated Model - DO NOT CHANGE */
|
||||
package andromedia.midsuit.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.Properties;
|
||||
import org.compiere.model.*;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
|
||||
/** Generated Model for MID_RequisitionLine
|
||||
* @author iDempiere (generated)
|
||||
* @version Release 5.1 - $Id$ */
|
||||
public class X_MID_RequisitionLine extends PO implements I_MID_RequisitionLine, I_Persistent
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20180221L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_MID_RequisitionLine (Properties ctx, int MID_RequisitionLine_ID, String trxName)
|
||||
{
|
||||
super (ctx, MID_RequisitionLine_ID, trxName);
|
||||
/** if (MID_RequisitionLine_ID == 0)
|
||||
{
|
||||
setLine (0);
|
||||
// @SQL=SELECT COALESCE(MAX(Line),0)+10 AS DefaultValue FROM M_RequisitionLine WHERE M_Requisition_ID=@M_Requisition_ID@
|
||||
setLineNetAmt (Env.ZERO);
|
||||
setMID_RequisitionLine_ID (0);
|
||||
setPriceActual (Env.ZERO);
|
||||
setQty (Env.ZERO);
|
||||
// 1
|
||||
} */
|
||||
}
|
||||
|
||||
/** Load Constructor */
|
||||
public X_MID_RequisitionLine (Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super (ctx, rs, trxName);
|
||||
}
|
||||
|
||||
/** AccessLevel
|
||||
* @return 3 - Client - Org
|
||||
*/
|
||||
protected int get_AccessLevel()
|
||||
{
|
||||
return accessLevel.intValue();
|
||||
}
|
||||
|
||||
/** Load Meta Data */
|
||||
protected POInfo initPO (Properties ctx)
|
||||
{
|
||||
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
|
||||
return poi;
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
StringBuffer sb = new StringBuffer ("X_MID_RequisitionLine[")
|
||||
.append(get_ID()).append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
|
||||
.getPO(getC_BPartner_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Business Partner .
|
||||
@param C_BPartner_ID
|
||||
Identifies a Business Partner
|
||||
*/
|
||||
public void setC_BPartner_ID (int C_BPartner_ID)
|
||||
{
|
||||
if (C_BPartner_ID < 1)
|
||||
set_Value (COLUMNNAME_C_BPartner_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID));
|
||||
}
|
||||
|
||||
/** Get Business Partner .
|
||||
@return Identifies a Business Partner
|
||||
*/
|
||||
public int getC_BPartner_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_C_Charge getC_Charge() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_C_Charge)MTable.get(getCtx(), org.compiere.model.I_C_Charge.Table_Name)
|
||||
.getPO(getC_Charge_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Charge.
|
||||
@param C_Charge_ID
|
||||
Additional document charges
|
||||
*/
|
||||
public void setC_Charge_ID (int C_Charge_ID)
|
||||
{
|
||||
if (C_Charge_ID < 1)
|
||||
set_Value (COLUMNNAME_C_Charge_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_Charge_ID, Integer.valueOf(C_Charge_ID));
|
||||
}
|
||||
|
||||
/** Get Charge.
|
||||
@return Additional document charges
|
||||
*/
|
||||
public int getC_Charge_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_Charge_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_C_OrderLine getC_OrderLine() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_C_OrderLine)MTable.get(getCtx(), org.compiere.model.I_C_OrderLine.Table_Name)
|
||||
.getPO(getC_OrderLine_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Sales Order Line.
|
||||
@param C_OrderLine_ID
|
||||
Sales Order Line
|
||||
*/
|
||||
public void setC_OrderLine_ID (int C_OrderLine_ID)
|
||||
{
|
||||
if (C_OrderLine_ID < 1)
|
||||
set_Value (COLUMNNAME_C_OrderLine_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_OrderLine_ID, Integer.valueOf(C_OrderLine_ID));
|
||||
}
|
||||
|
||||
/** Get Sales Order Line.
|
||||
@return Sales Order Line
|
||||
*/
|
||||
public int getC_OrderLine_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_OrderLine_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_C_UOM getC_UOM() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_C_UOM)MTable.get(getCtx(), org.compiere.model.I_C_UOM.Table_Name)
|
||||
.getPO(getC_UOM_ID(), get_TrxName()); }
|
||||
|
||||
/** Set UOM.
|
||||
@param C_UOM_ID
|
||||
Unit of Measure
|
||||
*/
|
||||
public void setC_UOM_ID (int C_UOM_ID)
|
||||
{
|
||||
if (C_UOM_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_C_UOM_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_C_UOM_ID, Integer.valueOf(C_UOM_ID));
|
||||
}
|
||||
|
||||
/** Get UOM.
|
||||
@return Unit of Measure
|
||||
*/
|
||||
public int getC_UOM_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_UOM_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Description.
|
||||
@param Description
|
||||
Optional short description of the record
|
||||
*/
|
||||
public void setDescription (String Description)
|
||||
{
|
||||
set_Value (COLUMNNAME_Description, Description);
|
||||
}
|
||||
|
||||
/** Get Description.
|
||||
@return Optional short description of the record
|
||||
*/
|
||||
public String getDescription ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_Description);
|
||||
}
|
||||
|
||||
/** Set Line No.
|
||||
@param Line
|
||||
Unique line for this document
|
||||
*/
|
||||
public void setLine (int Line)
|
||||
{
|
||||
set_Value (COLUMNNAME_Line, Integer.valueOf(Line));
|
||||
}
|
||||
|
||||
/** Get Line No.
|
||||
@return Unique line for this document
|
||||
*/
|
||||
public int getLine ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_Line);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Get Record ID/ColumnName
|
||||
@return ID/ColumnName pair
|
||||
*/
|
||||
public KeyNamePair getKeyNamePair()
|
||||
{
|
||||
return new KeyNamePair(get_ID(), String.valueOf(getLine()));
|
||||
}
|
||||
|
||||
/** Set Line Amount.
|
||||
@param LineNetAmt
|
||||
Line Extended Amount (Quantity * Actual Price) without Freight and Charges
|
||||
*/
|
||||
public void setLineNetAmt (BigDecimal LineNetAmt)
|
||||
{
|
||||
set_Value (COLUMNNAME_LineNetAmt, LineNetAmt);
|
||||
}
|
||||
|
||||
/** Get Line Amount.
|
||||
@return Line Extended Amount (Quantity * Actual Price) without Freight and Charges
|
||||
*/
|
||||
public BigDecimal getLineNetAmt ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_LineNetAmt);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Midsuit Requisition Line for Sales Order.
|
||||
@param MID_RequisitionLine_ID Midsuit Requisition Line for Sales Order */
|
||||
public void setMID_RequisitionLine_ID (int MID_RequisitionLine_ID)
|
||||
{
|
||||
if (MID_RequisitionLine_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_MID_RequisitionLine_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_MID_RequisitionLine_ID, Integer.valueOf(MID_RequisitionLine_ID));
|
||||
}
|
||||
|
||||
/** Get Midsuit Requisition Line for Sales Order.
|
||||
@return Midsuit Requisition Line for Sales Order */
|
||||
public int getMID_RequisitionLine_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_MID_RequisitionLine_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set MID_RequisitionLine_UU.
|
||||
@param MID_RequisitionLine_UU MID_RequisitionLine_UU */
|
||||
public void setMID_RequisitionLine_UU (String MID_RequisitionLine_UU)
|
||||
{
|
||||
set_Value (COLUMNNAME_MID_RequisitionLine_UU, MID_RequisitionLine_UU);
|
||||
}
|
||||
|
||||
/** Get MID_RequisitionLine_UU.
|
||||
@return MID_RequisitionLine_UU */
|
||||
public String getMID_RequisitionLine_UU ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_MID_RequisitionLine_UU);
|
||||
}
|
||||
|
||||
public I_MID_Requisition getMID_Requisition() throws RuntimeException
|
||||
{
|
||||
return (I_MID_Requisition)MTable.get(getCtx(), I_MID_Requisition.Table_Name)
|
||||
.getPO(getMID_Requisition_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Midsuit Requisition for Sales Order.
|
||||
@param MID_Requisition_ID Midsuit Requisition for Sales Order */
|
||||
public void setMID_Requisition_ID (int MID_Requisition_ID)
|
||||
{
|
||||
if (MID_Requisition_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_MID_Requisition_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_MID_Requisition_ID, Integer.valueOf(MID_Requisition_ID));
|
||||
}
|
||||
|
||||
/** Get Midsuit Requisition for Sales Order.
|
||||
@return Midsuit Requisition for Sales Order */
|
||||
public int getMID_Requisition_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_MID_Requisition_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_M_AttributeSetInstance getM_AttributeSetInstance() throws RuntimeException
|
||||
{
|
||||
return (I_M_AttributeSetInstance)MTable.get(getCtx(), I_M_AttributeSetInstance.Table_Name)
|
||||
.getPO(getM_AttributeSetInstance_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Attribute Set Instance.
|
||||
@param M_AttributeSetInstance_ID
|
||||
Product Attribute Set Instance
|
||||
*/
|
||||
public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID)
|
||||
{
|
||||
if (M_AttributeSetInstance_ID < 0)
|
||||
set_Value (COLUMNNAME_M_AttributeSetInstance_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_M_AttributeSetInstance_ID, Integer.valueOf(M_AttributeSetInstance_ID));
|
||||
}
|
||||
|
||||
/** Get Attribute Set Instance.
|
||||
@return Product Attribute Set Instance
|
||||
*/
|
||||
public int getM_AttributeSetInstance_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstance_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_M_Product getM_Product() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_M_Product)MTable.get(getCtx(), org.compiere.model.I_M_Product.Table_Name)
|
||||
.getPO(getM_Product_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Product.
|
||||
@param M_Product_ID
|
||||
Product, Service, Item
|
||||
*/
|
||||
public void setM_Product_ID (int M_Product_ID)
|
||||
{
|
||||
if (M_Product_ID < 1)
|
||||
set_Value (COLUMNNAME_M_Product_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID));
|
||||
}
|
||||
|
||||
/** Get Product.
|
||||
@return Product, Service, Item
|
||||
*/
|
||||
public int getM_Product_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Unit Price.
|
||||
@param PriceActual
|
||||
Actual Price
|
||||
*/
|
||||
public void setPriceActual (BigDecimal PriceActual)
|
||||
{
|
||||
set_Value (COLUMNNAME_PriceActual, PriceActual);
|
||||
}
|
||||
|
||||
/** Get Unit Price.
|
||||
@return Actual Price
|
||||
*/
|
||||
public BigDecimal getPriceActual ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PriceActual);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Quantity.
|
||||
@param Qty
|
||||
Quantity
|
||||
*/
|
||||
public void setQty (BigDecimal Qty)
|
||||
{
|
||||
set_Value (COLUMNNAME_Qty, Qty);
|
||||
}
|
||||
|
||||
/** Get Quantity.
|
||||
@return Quantity
|
||||
*/
|
||||
public BigDecimal getQty ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,964 @@
|
|||
/******************************************************************************
|
||||
* Product: iDempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software, you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. 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., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
/** Generated Model - DO NOT CHANGE */
|
||||
package andromedia.midsuit.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Properties;
|
||||
import org.compiere.model.*;
|
||||
import org.compiere.util.Env;
|
||||
|
||||
/** Generated Model for T_Aging
|
||||
* @author iDempiere (generated)
|
||||
* @version Release 5.1 - $Id$ */
|
||||
public class X_T_Aging extends PO implements I_T_Aging, I_Persistent
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20180305L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_T_Aging (Properties ctx, int T_Aging_ID, String trxName)
|
||||
{
|
||||
super (ctx, T_Aging_ID, trxName);
|
||||
/** if (T_Aging_ID == 0)
|
||||
{
|
||||
setAD_PInstance_ID (0);
|
||||
setC_BPartner_ID (0);
|
||||
setC_BP_Group_ID (0);
|
||||
setC_Currency_ID (0);
|
||||
setDue0 (Env.ZERO);
|
||||
setDue0_30 (Env.ZERO);
|
||||
setDue0_7 (Env.ZERO);
|
||||
setDue1_7 (Env.ZERO);
|
||||
setDue31_60 (Env.ZERO);
|
||||
setDue31_Plus (Env.ZERO);
|
||||
setDue61_90 (Env.ZERO);
|
||||
setDue61_Plus (Env.ZERO);
|
||||
setDue8_30 (Env.ZERO);
|
||||
setDue91_Plus (Env.ZERO);
|
||||
setDueAmt (Env.ZERO);
|
||||
setDueDate (new Timestamp( System.currentTimeMillis() ));
|
||||
setInvoicedAmt (Env.ZERO);
|
||||
setIsListInvoices (false);
|
||||
setIsSOTrx (false);
|
||||
setOpenAmt (Env.ZERO);
|
||||
setPastDue1_30 (Env.ZERO);
|
||||
setPastDue1_7 (Env.ZERO);
|
||||
setPastDue31_60 (Env.ZERO);
|
||||
setPastDue31_Plus (Env.ZERO);
|
||||
setPastDue61_90 (Env.ZERO);
|
||||
setPastDue61_Plus (Env.ZERO);
|
||||
setPastDue8_30 (Env.ZERO);
|
||||
setPastDue91_Plus (Env.ZERO);
|
||||
setPastDueAmt (Env.ZERO);
|
||||
setStatementDate (new Timestamp( System.currentTimeMillis() ));
|
||||
} */
|
||||
}
|
||||
|
||||
/** Load Constructor */
|
||||
public X_T_Aging (Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super (ctx, rs, trxName);
|
||||
}
|
||||
|
||||
/** AccessLevel
|
||||
* @return 3 - Client - Org
|
||||
*/
|
||||
protected int get_AccessLevel()
|
||||
{
|
||||
return accessLevel.intValue();
|
||||
}
|
||||
|
||||
/** Load Meta Data */
|
||||
protected POInfo initPO (Properties ctx)
|
||||
{
|
||||
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
|
||||
return poi;
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
StringBuffer sb = new StringBuffer ("X_T_Aging[")
|
||||
.append(get_ID()).append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_AD_PInstance getAD_PInstance() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_AD_PInstance)MTable.get(getCtx(), org.compiere.model.I_AD_PInstance.Table_Name)
|
||||
.getPO(getAD_PInstance_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Process Instance.
|
||||
@param AD_PInstance_ID
|
||||
Instance of the process
|
||||
*/
|
||||
public void setAD_PInstance_ID (int AD_PInstance_ID)
|
||||
{
|
||||
if (AD_PInstance_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_AD_PInstance_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_AD_PInstance_ID, Integer.valueOf(AD_PInstance_ID));
|
||||
}
|
||||
|
||||
/** Get Process Instance.
|
||||
@return Instance of the process
|
||||
*/
|
||||
public int getAD_PInstance_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_PInstance_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_C_Activity getC_Activity() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_C_Activity)MTable.get(getCtx(), org.compiere.model.I_C_Activity.Table_Name)
|
||||
.getPO(getC_Activity_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Activity.
|
||||
@param C_Activity_ID
|
||||
Business Activity
|
||||
*/
|
||||
public void setC_Activity_ID (int C_Activity_ID)
|
||||
{
|
||||
if (C_Activity_ID < 1)
|
||||
set_Value (COLUMNNAME_C_Activity_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_Activity_ID, Integer.valueOf(C_Activity_ID));
|
||||
}
|
||||
|
||||
/** Get Activity.
|
||||
@return Business Activity
|
||||
*/
|
||||
public int getC_Activity_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_Activity_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
|
||||
.getPO(getC_BPartner_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Business Partner .
|
||||
@param C_BPartner_ID
|
||||
Identifies a Business Partner
|
||||
*/
|
||||
public void setC_BPartner_ID (int C_BPartner_ID)
|
||||
{
|
||||
if (C_BPartner_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_C_BPartner_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID));
|
||||
}
|
||||
|
||||
/** Get Business Partner .
|
||||
@return Identifies a Business Partner
|
||||
*/
|
||||
public int getC_BPartner_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_C_BP_Group getC_BP_Group() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_C_BP_Group)MTable.get(getCtx(), org.compiere.model.I_C_BP_Group.Table_Name)
|
||||
.getPO(getC_BP_Group_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Business Partner Group.
|
||||
@param C_BP_Group_ID
|
||||
Business Partner Group
|
||||
*/
|
||||
public void setC_BP_Group_ID (int C_BP_Group_ID)
|
||||
{
|
||||
if (C_BP_Group_ID < 1)
|
||||
set_Value (COLUMNNAME_C_BP_Group_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_BP_Group_ID, Integer.valueOf(C_BP_Group_ID));
|
||||
}
|
||||
|
||||
/** Get Business Partner Group.
|
||||
@return Business Partner Group
|
||||
*/
|
||||
public int getC_BP_Group_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_BP_Group_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_C_Campaign getC_Campaign() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_C_Campaign)MTable.get(getCtx(), org.compiere.model.I_C_Campaign.Table_Name)
|
||||
.getPO(getC_Campaign_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Campaign.
|
||||
@param C_Campaign_ID
|
||||
Marketing Campaign
|
||||
*/
|
||||
public void setC_Campaign_ID (int C_Campaign_ID)
|
||||
{
|
||||
if (C_Campaign_ID < 1)
|
||||
set_Value (COLUMNNAME_C_Campaign_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_Campaign_ID, Integer.valueOf(C_Campaign_ID));
|
||||
}
|
||||
|
||||
/** Get Campaign.
|
||||
@return Marketing Campaign
|
||||
*/
|
||||
public int getC_Campaign_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_Campaign_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_C_Currency getC_Currency() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_C_Currency)MTable.get(getCtx(), org.compiere.model.I_C_Currency.Table_Name)
|
||||
.getPO(getC_Currency_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Currency.
|
||||
@param C_Currency_ID
|
||||
The Currency for this record
|
||||
*/
|
||||
public void setC_Currency_ID (int C_Currency_ID)
|
||||
{
|
||||
if (C_Currency_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_C_Currency_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID));
|
||||
}
|
||||
|
||||
/** Get Currency.
|
||||
@return The Currency for this record
|
||||
*/
|
||||
public int getC_Currency_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_Currency_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_C_Invoice getC_Invoice() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_C_Invoice)MTable.get(getCtx(), org.compiere.model.I_C_Invoice.Table_Name)
|
||||
.getPO(getC_Invoice_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Invoice.
|
||||
@param C_Invoice_ID
|
||||
Invoice Identifier
|
||||
*/
|
||||
public void setC_Invoice_ID (int C_Invoice_ID)
|
||||
{
|
||||
if (C_Invoice_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_C_Invoice_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_C_Invoice_ID, Integer.valueOf(C_Invoice_ID));
|
||||
}
|
||||
|
||||
/** Get Invoice.
|
||||
@return Invoice Identifier
|
||||
*/
|
||||
public int getC_Invoice_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_Invoice_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_C_InvoicePaySchedule getC_InvoicePaySchedule() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_C_InvoicePaySchedule)MTable.get(getCtx(), org.compiere.model.I_C_InvoicePaySchedule.Table_Name)
|
||||
.getPO(getC_InvoicePaySchedule_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Invoice Payment Schedule.
|
||||
@param C_InvoicePaySchedule_ID
|
||||
Invoice Payment Schedule
|
||||
*/
|
||||
public void setC_InvoicePaySchedule_ID (int C_InvoicePaySchedule_ID)
|
||||
{
|
||||
if (C_InvoicePaySchedule_ID < 1)
|
||||
set_Value (COLUMNNAME_C_InvoicePaySchedule_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_InvoicePaySchedule_ID, Integer.valueOf(C_InvoicePaySchedule_ID));
|
||||
}
|
||||
|
||||
/** Get Invoice Payment Schedule.
|
||||
@return Invoice Payment Schedule
|
||||
*/
|
||||
public int getC_InvoicePaySchedule_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_InvoicePaySchedule_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_C_Project getC_Project() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_C_Project)MTable.get(getCtx(), org.compiere.model.I_C_Project.Table_Name)
|
||||
.getPO(getC_Project_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Project.
|
||||
@param C_Project_ID
|
||||
Financial Project
|
||||
*/
|
||||
public void setC_Project_ID (int C_Project_ID)
|
||||
{
|
||||
if (C_Project_ID < 1)
|
||||
set_Value (COLUMNNAME_C_Project_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID));
|
||||
}
|
||||
|
||||
/** Get Project.
|
||||
@return Financial Project
|
||||
*/
|
||||
public int getC_Project_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Account Date.
|
||||
@param DateAcct
|
||||
Accounting Date
|
||||
*/
|
||||
public void setDateAcct (boolean DateAcct)
|
||||
{
|
||||
set_Value (COLUMNNAME_DateAcct, Boolean.valueOf(DateAcct));
|
||||
}
|
||||
|
||||
/** Get Account Date.
|
||||
@return Accounting Date
|
||||
*/
|
||||
public boolean isDateAcct ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_DateAcct);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Set Days due.
|
||||
@param DaysDue
|
||||
Number of days due (negative: due in number of days)
|
||||
*/
|
||||
public void setDaysDue (int DaysDue)
|
||||
{
|
||||
set_Value (COLUMNNAME_DaysDue, Integer.valueOf(DaysDue));
|
||||
}
|
||||
|
||||
/** Get Days due.
|
||||
@return Number of days due (negative: due in number of days)
|
||||
*/
|
||||
public int getDaysDue ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_DaysDue);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Due Today.
|
||||
@param Due0 Due Today */
|
||||
public void setDue0 (BigDecimal Due0)
|
||||
{
|
||||
set_Value (COLUMNNAME_Due0, Due0);
|
||||
}
|
||||
|
||||
/** Get Due Today.
|
||||
@return Due Today */
|
||||
public BigDecimal getDue0 ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due0);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Due Today-30.
|
||||
@param Due0_30 Due Today-30 */
|
||||
public void setDue0_30 (BigDecimal Due0_30)
|
||||
{
|
||||
set_Value (COLUMNNAME_Due0_30, Due0_30);
|
||||
}
|
||||
|
||||
/** Get Due Today-30.
|
||||
@return Due Today-30 */
|
||||
public BigDecimal getDue0_30 ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due0_30);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Due Today-7.
|
||||
@param Due0_7 Due Today-7 */
|
||||
public void setDue0_7 (BigDecimal Due0_7)
|
||||
{
|
||||
set_Value (COLUMNNAME_Due0_7, Due0_7);
|
||||
}
|
||||
|
||||
/** Get Due Today-7.
|
||||
@return Due Today-7 */
|
||||
public BigDecimal getDue0_7 ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due0_7);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Due > 121.
|
||||
@param Due121_Plus Due > 121 */
|
||||
public void setDue121_Plus (BigDecimal Due121_Plus)
|
||||
{
|
||||
set_Value (COLUMNNAME_Due121_Plus, Due121_Plus);
|
||||
}
|
||||
|
||||
/** Get Due > 121.
|
||||
@return Due > 121 */
|
||||
public BigDecimal getDue121_Plus ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due121_Plus);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Due 1-7.
|
||||
@param Due1_7 Due 1-7 */
|
||||
public void setDue1_7 (BigDecimal Due1_7)
|
||||
{
|
||||
set_Value (COLUMNNAME_Due1_7, Due1_7);
|
||||
}
|
||||
|
||||
/** Get Due 1-7.
|
||||
@return Due 1-7 */
|
||||
public BigDecimal getDue1_7 ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due1_7);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Due 31-60.
|
||||
@param Due31_60 Due 31-60 */
|
||||
public void setDue31_60 (BigDecimal Due31_60)
|
||||
{
|
||||
set_Value (COLUMNNAME_Due31_60, Due31_60);
|
||||
}
|
||||
|
||||
/** Get Due 31-60.
|
||||
@return Due 31-60 */
|
||||
public BigDecimal getDue31_60 ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due31_60);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Due > 31.
|
||||
@param Due31_Plus Due > 31 */
|
||||
public void setDue31_Plus (BigDecimal Due31_Plus)
|
||||
{
|
||||
set_Value (COLUMNNAME_Due31_Plus, Due31_Plus);
|
||||
}
|
||||
|
||||
/** Get Due > 31.
|
||||
@return Due > 31 */
|
||||
public BigDecimal getDue31_Plus ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due31_Plus);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Due 61-90.
|
||||
@param Due61_90 Due 61-90 */
|
||||
public void setDue61_90 (BigDecimal Due61_90)
|
||||
{
|
||||
set_Value (COLUMNNAME_Due61_90, Due61_90);
|
||||
}
|
||||
|
||||
/** Get Due 61-90.
|
||||
@return Due 61-90 */
|
||||
public BigDecimal getDue61_90 ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due61_90);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Due > 61.
|
||||
@param Due61_Plus Due > 61 */
|
||||
public void setDue61_Plus (BigDecimal Due61_Plus)
|
||||
{
|
||||
set_Value (COLUMNNAME_Due61_Plus, Due61_Plus);
|
||||
}
|
||||
|
||||
/** Get Due > 61.
|
||||
@return Due > 61 */
|
||||
public BigDecimal getDue61_Plus ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due61_Plus);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Due 8-30.
|
||||
@param Due8_30 Due 8-30 */
|
||||
public void setDue8_30 (BigDecimal Due8_30)
|
||||
{
|
||||
set_Value (COLUMNNAME_Due8_30, Due8_30);
|
||||
}
|
||||
|
||||
/** Get Due 8-30.
|
||||
@return Due 8-30 */
|
||||
public BigDecimal getDue8_30 ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due8_30);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Due 91-120.
|
||||
@param Due91_120 Due 91-120 */
|
||||
public void setDue91_120 (BigDecimal Due91_120)
|
||||
{
|
||||
set_Value (COLUMNNAME_Due91_120, Due91_120);
|
||||
}
|
||||
|
||||
/** Get Due 91-120.
|
||||
@return Due 91-120 */
|
||||
public BigDecimal getDue91_120 ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due91_120);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Due > 91.
|
||||
@param Due91_Plus Due > 91 */
|
||||
public void setDue91_Plus (BigDecimal Due91_Plus)
|
||||
{
|
||||
set_Value (COLUMNNAME_Due91_Plus, Due91_Plus);
|
||||
}
|
||||
|
||||
/** Get Due > 91.
|
||||
@return Due > 91 */
|
||||
public BigDecimal getDue91_Plus ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due91_Plus);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Amount due.
|
||||
@param DueAmt
|
||||
Amount of the payment due
|
||||
*/
|
||||
public void setDueAmt (BigDecimal DueAmt)
|
||||
{
|
||||
set_Value (COLUMNNAME_DueAmt, DueAmt);
|
||||
}
|
||||
|
||||
/** Get Amount due.
|
||||
@return Amount of the payment due
|
||||
*/
|
||||
public BigDecimal getDueAmt ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_DueAmt);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Due Date.
|
||||
@param DueDate
|
||||
Date when the payment is due
|
||||
*/
|
||||
public void setDueDate (Timestamp DueDate)
|
||||
{
|
||||
set_Value (COLUMNNAME_DueDate, DueDate);
|
||||
}
|
||||
|
||||
/** Get Due Date.
|
||||
@return Date when the payment is due
|
||||
*/
|
||||
public Timestamp getDueDate ()
|
||||
{
|
||||
return (Timestamp)get_Value(COLUMNNAME_DueDate);
|
||||
}
|
||||
|
||||
/** Set Invoiced Amount.
|
||||
@param InvoicedAmt
|
||||
The amount invoiced
|
||||
*/
|
||||
public void setInvoicedAmt (BigDecimal InvoicedAmt)
|
||||
{
|
||||
set_Value (COLUMNNAME_InvoicedAmt, InvoicedAmt);
|
||||
}
|
||||
|
||||
/** Get Invoiced Amount.
|
||||
@return The amount invoiced
|
||||
*/
|
||||
public BigDecimal getInvoicedAmt ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_InvoicedAmt);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set List Invoices.
|
||||
@param IsListInvoices
|
||||
Include List of Invoices
|
||||
*/
|
||||
public void setIsListInvoices (boolean IsListInvoices)
|
||||
{
|
||||
set_Value (COLUMNNAME_IsListInvoices, Boolean.valueOf(IsListInvoices));
|
||||
}
|
||||
|
||||
/** Get List Invoices.
|
||||
@return Include List of Invoices
|
||||
*/
|
||||
public boolean isListInvoices ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_IsListInvoices);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Set Sales Transaction.
|
||||
@param IsSOTrx
|
||||
This is a Sales Transaction
|
||||
*/
|
||||
public void setIsSOTrx (boolean IsSOTrx)
|
||||
{
|
||||
set_Value (COLUMNNAME_IsSOTrx, Boolean.valueOf(IsSOTrx));
|
||||
}
|
||||
|
||||
/** Get Sales Transaction.
|
||||
@return This is a Sales Transaction
|
||||
*/
|
||||
public boolean isSOTrx ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_IsSOTrx);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Set Open Amount.
|
||||
@param OpenAmt
|
||||
Open item amount
|
||||
*/
|
||||
public void setOpenAmt (BigDecimal OpenAmt)
|
||||
{
|
||||
set_Value (COLUMNNAME_OpenAmt, OpenAmt);
|
||||
}
|
||||
|
||||
/** Get Open Amount.
|
||||
@return Open item amount
|
||||
*/
|
||||
public BigDecimal getOpenAmt ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_OpenAmt);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Past Due > 121.
|
||||
@param PastDue121_Plus Past Due > 121 */
|
||||
public void setPastDue121_Plus (BigDecimal PastDue121_Plus)
|
||||
{
|
||||
set_Value (COLUMNNAME_PastDue121_Plus, PastDue121_Plus);
|
||||
}
|
||||
|
||||
/** Get Past Due > 121.
|
||||
@return Past Due > 121 */
|
||||
public BigDecimal getPastDue121_Plus ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PastDue121_Plus);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Past Due 1-30.
|
||||
@param PastDue1_30 Past Due 1-30 */
|
||||
public void setPastDue1_30 (BigDecimal PastDue1_30)
|
||||
{
|
||||
set_Value (COLUMNNAME_PastDue1_30, PastDue1_30);
|
||||
}
|
||||
|
||||
/** Get Past Due 1-30.
|
||||
@return Past Due 1-30 */
|
||||
public BigDecimal getPastDue1_30 ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PastDue1_30);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Past Due 1-7.
|
||||
@param PastDue1_7 Past Due 1-7 */
|
||||
public void setPastDue1_7 (BigDecimal PastDue1_7)
|
||||
{
|
||||
set_Value (COLUMNNAME_PastDue1_7, PastDue1_7);
|
||||
}
|
||||
|
||||
/** Get Past Due 1-7.
|
||||
@return Past Due 1-7 */
|
||||
public BigDecimal getPastDue1_7 ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PastDue1_7);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Past Due 31-60.
|
||||
@param PastDue31_60 Past Due 31-60 */
|
||||
public void setPastDue31_60 (BigDecimal PastDue31_60)
|
||||
{
|
||||
set_Value (COLUMNNAME_PastDue31_60, PastDue31_60);
|
||||
}
|
||||
|
||||
/** Get Past Due 31-60.
|
||||
@return Past Due 31-60 */
|
||||
public BigDecimal getPastDue31_60 ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PastDue31_60);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Past Due > 31.
|
||||
@param PastDue31_Plus Past Due > 31 */
|
||||
public void setPastDue31_Plus (BigDecimal PastDue31_Plus)
|
||||
{
|
||||
set_Value (COLUMNNAME_PastDue31_Plus, PastDue31_Plus);
|
||||
}
|
||||
|
||||
/** Get Past Due > 31.
|
||||
@return Past Due > 31 */
|
||||
public BigDecimal getPastDue31_Plus ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PastDue31_Plus);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Past Due 61-90.
|
||||
@param PastDue61_90 Past Due 61-90 */
|
||||
public void setPastDue61_90 (BigDecimal PastDue61_90)
|
||||
{
|
||||
set_Value (COLUMNNAME_PastDue61_90, PastDue61_90);
|
||||
}
|
||||
|
||||
/** Get Past Due 61-90.
|
||||
@return Past Due 61-90 */
|
||||
public BigDecimal getPastDue61_90 ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PastDue61_90);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Past Due > 61.
|
||||
@param PastDue61_Plus Past Due > 61 */
|
||||
public void setPastDue61_Plus (BigDecimal PastDue61_Plus)
|
||||
{
|
||||
set_Value (COLUMNNAME_PastDue61_Plus, PastDue61_Plus);
|
||||
}
|
||||
|
||||
/** Get Past Due > 61.
|
||||
@return Past Due > 61 */
|
||||
public BigDecimal getPastDue61_Plus ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PastDue61_Plus);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Past Due 8-30.
|
||||
@param PastDue8_30 Past Due 8-30 */
|
||||
public void setPastDue8_30 (BigDecimal PastDue8_30)
|
||||
{
|
||||
set_Value (COLUMNNAME_PastDue8_30, PastDue8_30);
|
||||
}
|
||||
|
||||
/** Get Past Due 8-30.
|
||||
@return Past Due 8-30 */
|
||||
public BigDecimal getPastDue8_30 ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PastDue8_30);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Past Due 91-120.
|
||||
@param PastDue91_120 Past Due 91-120 */
|
||||
public void setPastDue91_120 (BigDecimal PastDue91_120)
|
||||
{
|
||||
set_Value (COLUMNNAME_PastDue91_120, PastDue91_120);
|
||||
}
|
||||
|
||||
/** Get Past Due 91-120.
|
||||
@return Past Due 91-120 */
|
||||
public BigDecimal getPastDue91_120 ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PastDue91_120);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Past Due > 91.
|
||||
@param PastDue91_Plus Past Due > 91 */
|
||||
public void setPastDue91_Plus (BigDecimal PastDue91_Plus)
|
||||
{
|
||||
set_Value (COLUMNNAME_PastDue91_Plus, PastDue91_Plus);
|
||||
}
|
||||
|
||||
/** Get Past Due > 91.
|
||||
@return Past Due > 91 */
|
||||
public BigDecimal getPastDue91_Plus ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PastDue91_Plus);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Past Due.
|
||||
@param PastDueAmt Past Due */
|
||||
public void setPastDueAmt (BigDecimal PastDueAmt)
|
||||
{
|
||||
set_Value (COLUMNNAME_PastDueAmt, PastDueAmt);
|
||||
}
|
||||
|
||||
/** Get Past Due.
|
||||
@return Past Due */
|
||||
public BigDecimal getPastDueAmt ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PastDueAmt);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Statement date.
|
||||
@param StatementDate
|
||||
Date of the statement
|
||||
*/
|
||||
public void setStatementDate (Timestamp StatementDate)
|
||||
{
|
||||
set_Value (COLUMNNAME_StatementDate, StatementDate);
|
||||
}
|
||||
|
||||
/** Get Statement date.
|
||||
@return Date of the statement
|
||||
*/
|
||||
public Timestamp getStatementDate ()
|
||||
{
|
||||
return (Timestamp)get_Value(COLUMNNAME_StatementDate);
|
||||
}
|
||||
|
||||
/** Set T_Aging_UU.
|
||||
@param T_Aging_UU T_Aging_UU */
|
||||
public void setT_Aging_UU (String T_Aging_UU)
|
||||
{
|
||||
set_Value (COLUMNNAME_T_Aging_UU, T_Aging_UU);
|
||||
}
|
||||
|
||||
/** Get T_Aging_UU.
|
||||
@return T_Aging_UU */
|
||||
public String getT_Aging_UU ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_T_Aging_UU);
|
||||
}
|
||||
|
||||
/** Set Unallocated Payment.
|
||||
@param UnallocatedPayment Unallocated Payment */
|
||||
public void setUnallocatedPayment (BigDecimal UnallocatedPayment)
|
||||
{
|
||||
set_Value (COLUMNNAME_UnallocatedPayment, UnallocatedPayment);
|
||||
}
|
||||
|
||||
/** Get Unallocated Payment.
|
||||
@return Unallocated Payment */
|
||||
public BigDecimal getUnallocatedPayment ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_UnallocatedPayment);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,315 @@
|
|||
package andromedia.midsuit.process;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import javax.management.MalformedObjectNameException;
|
||||
import javax.swing.JComboBox.KeySelectionManager;
|
||||
|
||||
import org.adempiere.base.DefaultModelFactory;
|
||||
import org.compiere.model.MEntityType;
|
||||
import org.compiere.model.MTable;
|
||||
import org.compiere.model.PO;
|
||||
import org.compiere.process.ProcessInfoParameter;
|
||||
import org.compiere.process.SvrProcess;
|
||||
import org.compiere.util.CCache;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Util;
|
||||
import org.zkoss.json.JSONArray;
|
||||
import org.zkoss.json.JSONObject;
|
||||
import org.zkoss.json.parser.JSONParser;
|
||||
|
||||
public class MID_InsertIntoAllTable extends SvrProcess{
|
||||
Class modelClass = null;
|
||||
PO po = null;
|
||||
String p_tableName = "";
|
||||
String column = "";
|
||||
private static CCache<String,Class<?>> s_classCache = new CCache<String,Class<?>>(null, "PO_Class", 20, false);
|
||||
private final static CLogger s_log = CLogger.getCLogger(DefaultModelFactory.class);
|
||||
@Override
|
||||
protected void prepare() {
|
||||
ProcessInfoParameter[] para = getParameter();
|
||||
for (int i = 0; i < para.length; i++) {
|
||||
String name = para[i].getParameterName();
|
||||
if (para[i].getParameter() == null)
|
||||
;
|
||||
else if (name.equals("AD_TableName"))
|
||||
p_tableName = para[i].getParameterAsString();
|
||||
else
|
||||
log.log(Level.SEVERE, "Unknown Parameter: " + name);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String doIt() throws Exception {
|
||||
String json = "{\"TableName\" : \"C_Order\","
|
||||
+ " \"field1\":"
|
||||
+ " [{\"abc\" : \"aab\" }],\"field2\":\"abc\"}\n" +
|
||||
"\n" ;
|
||||
|
||||
JSONParser parser = new JSONParser();
|
||||
|
||||
|
||||
|
||||
JSONObject o = (JSONObject) parser.parse(json);
|
||||
if(o!=null) {
|
||||
|
||||
String orr = o.get("TableName").toString();
|
||||
JSONArray arr = (JSONArray) o.get("field1");
|
||||
Set<Object> s= o.keySet();
|
||||
Iterator keys = s.iterator();
|
||||
String keylist = "";
|
||||
while(keys.hasNext()) {
|
||||
keylist = keylist + keys.next().toString();
|
||||
}
|
||||
return orr.toString() + " " + arr.toString()+ " "+keylist;
|
||||
}
|
||||
|
||||
po = getPO("C_Order", 0, get_TrxName());
|
||||
po.set_ValueNoCheck("DocumentNo", "12345");
|
||||
|
||||
if(po.get_TableName().equals("C_Order")) {
|
||||
String buang = po.get_ValueAsString("DocumentNo")+" "+po.get_TableName()+" ";
|
||||
return buang;
|
||||
}
|
||||
po.saveEx();
|
||||
return null;
|
||||
}
|
||||
|
||||
private static final String[] s_packages = new String[] {
|
||||
|
||||
"org.compiere.model", "org.compiere.wf",
|
||||
"org.compiere.print", "org.compiere.impexp",
|
||||
"compiere.model", // globalqss allow compatibility with other plugins
|
||||
"adempiere.model", // Extensions
|
||||
"org.adempiere.model"
|
||||
};
|
||||
|
||||
public Class<?> getClass(String tableName) {
|
||||
// Not supported
|
||||
if (tableName == null || tableName.endsWith("_Trl"))
|
||||
return null;
|
||||
|
||||
//check cache
|
||||
Class<?> cache = s_classCache.get(tableName);
|
||||
if (cache != null)
|
||||
{
|
||||
//Object.class indicate no generated PO class for tableName
|
||||
if (cache.equals(Object.class))
|
||||
return null;
|
||||
else
|
||||
return cache;
|
||||
}
|
||||
|
||||
MTable table = MTable.get(Env.getCtx(), tableName);
|
||||
String entityType = table.getEntityType();
|
||||
|
||||
if (!MEntityType.ENTITYTYPE_Dictionary.equals(entityType))
|
||||
{
|
||||
MEntityType et = MEntityType.get(Env.getCtx(), entityType);
|
||||
String etmodelpackage = et.getModelPackage();
|
||||
if (etmodelpackage != null)
|
||||
{
|
||||
Class<?> clazz = null;
|
||||
clazz = getPOclass(etmodelpackage + ".M" + Util.replace(tableName, "_", ""), tableName);
|
||||
if (clazz != null) {
|
||||
s_classCache.put(tableName, clazz);
|
||||
return clazz;
|
||||
}
|
||||
clazz = getPOclass(etmodelpackage + ".X_" + tableName, tableName);
|
||||
if (clazz != null) {
|
||||
s_classCache.put(tableName, clazz);
|
||||
return clazz;
|
||||
}
|
||||
s_log.warning("No class for table with it entity: " + tableName);
|
||||
}
|
||||
}
|
||||
//end [ 1784588 ]
|
||||
|
||||
// Strip table name prefix (e.g. AD_) Customizations are 3/4
|
||||
String className = tableName;
|
||||
int index = className.indexOf('_');
|
||||
if (index > 0)
|
||||
{
|
||||
if (index < 3) // AD_, A_
|
||||
className = className.substring(index+1);
|
||||
/* DELETEME: this part is useless - teo_sarca, [ 1648850 ]
|
||||
else
|
||||
{
|
||||
String prefix = className.substring(0,index);
|
||||
if (prefix.equals("Fact")) // keep custom prefix
|
||||
className = className.substring(index+1);
|
||||
}
|
||||
*/
|
||||
}
|
||||
// Remove underlines
|
||||
className = Util.replace(className, "_", "");
|
||||
|
||||
// Search packages
|
||||
for (int i = 0; i < s_packages.length; i++)
|
||||
{
|
||||
StringBuffer name = new StringBuffer(s_packages[i]).append(".M").append(className);
|
||||
Class<?> clazz = getPOclass(name.toString(), tableName);
|
||||
if (clazz != null)
|
||||
{
|
||||
s_classCache.put(tableName, clazz);
|
||||
return clazz;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Adempiere Extension
|
||||
Class<?> clazz = getPOclass("adempiere.model.X_" + tableName, tableName);
|
||||
if (clazz != null)
|
||||
{
|
||||
s_classCache.put(tableName, clazz);
|
||||
return clazz;
|
||||
}
|
||||
|
||||
//hengsin - allow compatibility with compiere plugins
|
||||
//Compiere Extension
|
||||
clazz = getPOclass("compiere.model.X_" + tableName, tableName);
|
||||
if (clazz != null)
|
||||
{
|
||||
s_classCache.put(tableName, clazz);
|
||||
return clazz;
|
||||
}
|
||||
|
||||
// Default
|
||||
clazz = getPOclass("org.compiere.model.X_" + tableName, tableName);
|
||||
if (clazz != null)
|
||||
{
|
||||
s_classCache.put(tableName, clazz);
|
||||
return clazz;
|
||||
}
|
||||
|
||||
//Object.class to indicate no PO class for tableName
|
||||
s_classCache.put(tableName, Object.class);
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get PO class
|
||||
* @param className fully qualified class name
|
||||
* @param tableName Optional. If specified, the loaded class will be validated for that table name
|
||||
* @return class or null
|
||||
*/
|
||||
private Class<?> getPOclass (String className, String tableName)
|
||||
{
|
||||
try
|
||||
{
|
||||
Class<?> clazz = Class.forName(className);
|
||||
// Validate if the class is for specified tableName
|
||||
if (tableName != null)
|
||||
{
|
||||
String classTableName = clazz.getField("Table_Name").get(null).toString();
|
||||
if (!tableName.equals(classTableName))
|
||||
{
|
||||
if (s_log.isLoggable(Level.FINEST)) s_log.finest("Invalid class for table: " + className+" (tableName="+tableName+", classTableName="+classTableName+")");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
// Make sure that it is a PO class
|
||||
Class<?> superClazz = clazz.getSuperclass();
|
||||
while (superClazz != null)
|
||||
{
|
||||
if (superClazz == PO.class)
|
||||
{
|
||||
if (s_log.isLoggable(Level.FINE)) s_log.fine("Use: " + className);
|
||||
return clazz;
|
||||
}
|
||||
superClazz = superClazz.getSuperclass();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
}
|
||||
if (s_log.isLoggable(Level.FINEST)) s_log.finest("Not found: " + className);
|
||||
return null;
|
||||
} // getPOclass
|
||||
|
||||
public PO getPO(String tableName, int Record_ID, String trxName) {
|
||||
Class<?> clazz = getClass(tableName);
|
||||
if (clazz == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
boolean errorLogged = false;
|
||||
try
|
||||
{
|
||||
Constructor<?> constructor = null;
|
||||
try
|
||||
{
|
||||
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
String msg = e.getMessage();
|
||||
if (msg == null)
|
||||
msg = e.toString();
|
||||
s_log.warning("No transaction Constructor for " + clazz + " (" + msg + ")");
|
||||
}
|
||||
|
||||
PO po = constructor!=null ? (PO)constructor.newInstance(new Object[] {Env.getCtx(), new Integer(Record_ID), trxName}) : null;
|
||||
return po;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
if (e.getCause() != null)
|
||||
{
|
||||
Throwable t = e.getCause();
|
||||
s_log.log(Level.SEVERE, "(id) - Table=" + tableName + ",Class=" + clazz, t);
|
||||
errorLogged = true;
|
||||
if (t instanceof Exception)
|
||||
s_log.saveError("Error", (Exception)e.getCause());
|
||||
else
|
||||
s_log.saveError("Error", "Table=" + tableName + ",Class=" + clazz);
|
||||
}
|
||||
else
|
||||
{
|
||||
s_log.log(Level.SEVERE, "(id) - Table=" + tableName + ",Class=" + clazz, e);
|
||||
errorLogged = true;
|
||||
s_log.saveError("Error", "Table=" + tableName + ",Class=" + clazz);
|
||||
}
|
||||
}
|
||||
if (!errorLogged)
|
||||
s_log.log(Level.SEVERE, "(id) - Not found - Table=" + tableName
|
||||
+ ", Record_ID=" + Record_ID);
|
||||
return null;
|
||||
}
|
||||
|
||||
public PO getPO(String tableName, ResultSet rs, String trxName) {
|
||||
Class<?> clazz = getClass(tableName);
|
||||
if (clazz == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
boolean errorLogged = false;
|
||||
try
|
||||
{
|
||||
Constructor<?> constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, ResultSet.class, String.class});
|
||||
PO po = (PO)constructor.newInstance(new Object[] {Env.getCtx(), rs, trxName});
|
||||
return po;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
s_log.log(Level.SEVERE, "(rs) - Table=" + tableName + ",Class=" + clazz, e);
|
||||
errorLogged = true;
|
||||
s_log.saveError("Error", "Table=" + tableName + ",Class=" + clazz);
|
||||
}
|
||||
if (!errorLogged)
|
||||
s_log.log(Level.SEVERE, "(rs) - Not found - Table=" + tableName);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,324 @@
|
|||
package andromedia.midsuit.process;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.ArrayList;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.exceptions.DBException;
|
||||
import org.adempiere.util.ProcessUtil;
|
||||
import org.compiere.model.MPInstance;
|
||||
import org.compiere.model.MProcess;
|
||||
import org.compiere.model.MRole;
|
||||
import org.compiere.print.ReportCtl;
|
||||
import org.compiere.process.ProcessInfo;
|
||||
import org.compiere.process.ProcessInfoParameter;
|
||||
import org.compiere.process.SvrProcess;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.TimeUtil;
|
||||
import org.compiere.util.Trx;
|
||||
|
||||
import andromedia.midsuit.model.MID_Aging;
|
||||
|
||||
public class MID_ProcessAging extends SvrProcess {
|
||||
|
||||
/** The date to calculate the days due from */
|
||||
private Timestamp p_StatementDate = null;
|
||||
//FR 1933937
|
||||
private boolean p_DateAcct = false;
|
||||
private boolean p_IsSOTrx = false;
|
||||
private int p_C_Currency_ID = 0;
|
||||
private int p_AD_Org_ID = 0;
|
||||
private int p_C_BP_Group_ID = 0;
|
||||
private int p_C_BPartner_ID = 0;
|
||||
private boolean p_IsListInvoices = false;
|
||||
/** Number of days between today and statement date */
|
||||
private int m_statementOffset = 0;
|
||||
private boolean p_IsPrintJasper = false;
|
||||
private String m_DocBaseType = null;
|
||||
|
||||
@Override
|
||||
protected void prepare() {
|
||||
// TODO Auto-generated method stub
|
||||
ProcessInfoParameter[] para = getParameter();
|
||||
for (int i = 0; i < para.length; i++)
|
||||
{
|
||||
String name = para[i].getParameterName();
|
||||
if (para[i].getParameter() == null)
|
||||
;
|
||||
else if (name.equals("StatementDate"))
|
||||
p_StatementDate = (Timestamp)para[i].getParameter();
|
||||
else if (name.equals("DateAcct"))
|
||||
p_DateAcct = "Y".equals(para[i].getParameter());
|
||||
else if (name.equals("IsSOTrx"))
|
||||
p_IsSOTrx = "Y".equals(para[i].getParameter());
|
||||
else if (name.equals("C_Currency_ID"))
|
||||
p_C_Currency_ID = ((BigDecimal)para[i].getParameter()).intValue();
|
||||
else if (name.equals("AD_Org_ID"))
|
||||
p_AD_Org_ID = ((BigDecimal)para[i].getParameter()).intValue();
|
||||
else if (name.equals("C_BP_Group_ID"))
|
||||
p_C_BP_Group_ID = ((BigDecimal)para[i].getParameter()).intValue();
|
||||
else if (name.equals("C_BPartner_ID"))
|
||||
p_C_BPartner_ID = ((BigDecimal)para[i].getParameter()).intValue();
|
||||
else if (name.equals("IsListInvoices"))
|
||||
p_IsListInvoices = "Y".equals(para[i].getParameter());
|
||||
else if (name.equals("IsPrintJasper"))
|
||||
p_IsPrintJasper = "Y".equals(para[i].getParameter());
|
||||
else if (name.equals("DocBaseType"))
|
||||
m_DocBaseType = (String)para[i].getParameterAsString();
|
||||
else
|
||||
log.log(Level.SEVERE, "Unknown Parameter: " + name);
|
||||
}
|
||||
if (p_StatementDate == null)
|
||||
p_StatementDate = new Timestamp (System.currentTimeMillis());
|
||||
else
|
||||
m_statementOffset = TimeUtil.getDaysBetween(
|
||||
new Timestamp(System.currentTimeMillis()), p_StatementDate);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String doIt() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
if (!p_IsPrintJasper) {
|
||||
printRV();
|
||||
return "Failed to Print";
|
||||
}
|
||||
if (log.isLoggable(Level.INFO)) log.info("StatementDate=" + p_StatementDate + ", IsSOTrx=" + p_IsSOTrx
|
||||
+ ", C_Currency_ID=" + p_C_Currency_ID + ", AD_Org_ID=" + p_AD_Org_ID
|
||||
+ ", C_BP_Group_ID=" + p_C_BP_Group_ID + ", C_BPartner_ID=" + p_C_BPartner_ID
|
||||
+ ", IsListInvoices=" + p_IsListInvoices);
|
||||
//FR 1933937
|
||||
String dateacct = DB.TO_DATE(p_StatementDate);
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("SELECT bp.C_BP_Group_ID, oi.C_BPartner_ID,oi.C_Invoice_ID,oi.C_InvoicePaySchedule_ID, " // 1..4
|
||||
+ "oi.C_Currency_ID, oi.IsSOTrx, " // 5..6
|
||||
+ "oi.DateInvoiced, oi.NetDays,oi.DueDate,oi.DaysDue, "); // 7..10
|
||||
if (p_C_Currency_ID == 0)
|
||||
{
|
||||
if (!p_DateAcct)//FR 1933937
|
||||
{
|
||||
sql.append(" oi.GrandTotal, oi.PaidAmt, oi.OpenAmt "); // 11..13
|
||||
}
|
||||
else
|
||||
{
|
||||
sql.append(" oi.GrandTotal, invoicePaidToDate(oi.C_Invoice_ID, oi.C_Currency_ID, 1,"+dateacct+") AS PaidAmt, invoiceOpenToDate(oi.C_Invoice_ID,oi.C_InvoicePaySchedule_ID,"+dateacct+") AS OpenAmt "); // 11..13
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
String s = ",oi.C_Currency_ID," + p_C_Currency_ID + ",oi.DateAcct,oi.C_ConversionType_ID,oi.AD_Client_ID,oi.AD_Org_ID)";
|
||||
sql.append("currencyConvert(oi.GrandTotal").append(s); // 11
|
||||
if (!p_DateAcct)
|
||||
{
|
||||
sql.append(", currencyConvert(oi.PaidAmt").append(s) // 12
|
||||
.append(", currencyConvert(oi.OpenAmt").append(s); // 13
|
||||
}
|
||||
else
|
||||
{
|
||||
sql.append(", currencyConvert(invoicePaidToDate(oi.C_Invoice_ID, oi.C_Currency_ID, 1,"+dateacct+")").append(s) // 12
|
||||
.append(", currencyConvert(invoiceOpenToDate(oi.C_Invoice_ID,oi.C_InvoicePaySchedule_ID,"+dateacct+")").append(s); // 13
|
||||
}
|
||||
}
|
||||
sql.append(",oi.C_Activity_ID,oi.C_Campaign_ID,oi.C_Project_ID,oi.AD_Org_ID "); // 14..17
|
||||
sql.append(",alo.UnallocatedPayment ");
|
||||
if (!p_DateAcct)//FR 1933937
|
||||
{
|
||||
sql.append(" FROM RV_OpenItem oi");
|
||||
}
|
||||
else
|
||||
{
|
||||
sql.append(" FROM RV_OpenItemToDate oi");
|
||||
}
|
||||
|
||||
sql.append(" INNER JOIN C_BPartner bp ON (oi.C_BPartner_ID=bp.C_BPartner_ID) "
|
||||
+ "LEFT JOIN C_DocType dt ON (dt.C_DocType_ID=oi.C_DocType_ID) "
|
||||
+ "LEFT JOIN (select c_bpartner_id, " +
|
||||
"sum(payment) as UnallocatedPayment " +
|
||||
"FROM " +
|
||||
"(SELECT p.c_bpartner_id, " +
|
||||
"p.payamt + (coalesce(sum(al.amount),0)) as payment " +
|
||||
"FROM C_Payment p " +
|
||||
"left join c_allocationline al on al.c_payment_id = p.c_payment_id " +
|
||||
"group by p.c_bpartner_id, payamt) allo " +
|
||||
"group by c_bpartner_id) alo ON alo.C_BPartner_ID = oi.C_BPartner_ID "
|
||||
+ "WHERE oi.ISSoTrx=").append(p_IsSOTrx ? "'Y'" : "'N'");
|
||||
if (p_C_BPartner_ID > 0)
|
||||
{
|
||||
sql.append(" AND oi.C_BPartner_ID=").append(p_C_BPartner_ID);
|
||||
}
|
||||
else if (p_C_BP_Group_ID > 0)
|
||||
{
|
||||
sql.append(" AND bp.C_BP_Group_ID=").append(p_C_BP_Group_ID);
|
||||
}
|
||||
if (p_AD_Org_ID > 0) // BF 2655587
|
||||
{
|
||||
sql.append(" AND oi.AD_Org_ID=").append(p_AD_Org_ID);
|
||||
}
|
||||
|
||||
if (p_DateAcct)//FR 1933937
|
||||
{
|
||||
sql.append(" AND invoiceOpenToDate(oi.C_Invoice_ID,oi.C_InvoicePaySchedule_ID,"+dateacct+") <> 0 ");
|
||||
}
|
||||
if (m_DocBaseType!=null) {
|
||||
sql.append(" AND dt.DocBaseType='").append(m_DocBaseType).append("'");
|
||||
}
|
||||
|
||||
sql.append(" ORDER BY oi.C_BPartner_ID, oi.C_Currency_ID, oi.C_Invoice_ID");
|
||||
|
||||
if (log.isLoggable(Level.FINEST)) log.finest(sql.toString());
|
||||
String finalSql = MRole.getDefault(getCtx(), false).addAccessSQL(
|
||||
sql.toString(), "oi", MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO);
|
||||
log.finer(finalSql);
|
||||
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
//
|
||||
MID_Aging aging = null;
|
||||
int counter = 0;
|
||||
int rows = 0;
|
||||
int AD_PInstance_ID = getAD_PInstance_ID();
|
||||
//
|
||||
try
|
||||
{
|
||||
pstmt = DB.prepareStatement(finalSql, get_TrxName());
|
||||
rs = pstmt.executeQuery();
|
||||
while (rs.next())
|
||||
{
|
||||
int C_BP_Group_ID = rs.getInt(1);
|
||||
int C_BPartner_ID = rs.getInt(2);
|
||||
int C_Invoice_ID = p_IsListInvoices ? rs.getInt(3) : 0;
|
||||
int C_InvoicePaySchedule_ID = p_IsListInvoices ? rs.getInt(4) : 0;
|
||||
int C_Currency_ID = rs.getInt(5);
|
||||
boolean IsSOTrx = "Y".equals(rs.getString(6));
|
||||
//
|
||||
//Timestamp DateInvoiced = rs.getTimestamp(7);
|
||||
//int NetDays = rs.getInt(8);
|
||||
Timestamp DueDate = rs.getTimestamp(9);
|
||||
// Days Due
|
||||
int DaysDue = rs.getInt(10) // based on today
|
||||
+ m_statementOffset;
|
||||
//
|
||||
BigDecimal GrandTotal = rs.getBigDecimal(11);
|
||||
//BigDecimal PaidAmt = rs.getBigDecimal(12);
|
||||
BigDecimal OpenAmt = rs.getBigDecimal(13);
|
||||
//
|
||||
int C_Activity_ID = p_IsListInvoices ? rs.getInt(14) : 0;
|
||||
int C_Campaign_ID = p_IsListInvoices ? rs.getInt(15) : 0;
|
||||
int C_Project_ID = p_IsListInvoices ? rs.getInt(16) : 0;
|
||||
int AD_Org_ID = rs.getInt(17);
|
||||
BigDecimal UnallocatedPayment = rs.getBigDecimal(18);
|
||||
|
||||
rows++;
|
||||
// New Aging Row
|
||||
if (aging == null // Key
|
||||
|| AD_PInstance_ID != aging.getAD_PInstance_ID()
|
||||
|| C_BPartner_ID != aging.getC_BPartner_ID()
|
||||
|| C_Currency_ID != aging.getC_Currency_ID()
|
||||
|| C_Invoice_ID != aging.getC_Invoice_ID()
|
||||
|| C_InvoicePaySchedule_ID != aging.getC_InvoicePaySchedule_ID())
|
||||
{
|
||||
if (aging != null)
|
||||
{
|
||||
aging.saveEx();
|
||||
if (log.isLoggable(Level.FINE)) log.fine("#" + ++counter + " - " + aging);
|
||||
}
|
||||
aging = new MID_Aging (getCtx(), AD_PInstance_ID, p_StatementDate,
|
||||
C_BPartner_ID, C_Currency_ID,
|
||||
C_Invoice_ID, C_InvoicePaySchedule_ID,
|
||||
C_BP_Group_ID, AD_Org_ID, DueDate, IsSOTrx, get_TrxName());
|
||||
aging.setC_Activity_ID(C_Activity_ID);
|
||||
aging.setC_Campaign_ID(C_Campaign_ID);
|
||||
aging.setC_Project_ID(C_Project_ID);
|
||||
aging.setDateAcct(p_DateAcct);
|
||||
}
|
||||
// Fill Buckets
|
||||
aging.add (DueDate, DaysDue, GrandTotal, OpenAmt, UnallocatedPayment);
|
||||
}
|
||||
if (aging != null)
|
||||
{
|
||||
aging.saveEx();
|
||||
counter++;
|
||||
if (log.isLoggable(Level.FINE)) log.fine("#" + counter + " - " + aging);
|
||||
}
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
throw new DBException(e, finalSql);
|
||||
}
|
||||
finally
|
||||
{
|
||||
DB.close(rs, pstmt);
|
||||
rs = null; pstmt = null;
|
||||
}
|
||||
//
|
||||
if (log.isLoggable(Level.INFO)) log.info("#" + counter + " - rows=" + rows);
|
||||
Trx.get(get_TrxName(), false).commit();
|
||||
if (p_IsPrintJasper) {
|
||||
printReport();
|
||||
} else {
|
||||
printRV();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
protected void printReport() {
|
||||
String trxName = Trx.createTrxName();
|
||||
String sql = "SELECT AD_Process_ID FROM AD_Process WHERE name='Laporan Aging Standard'";
|
||||
int report_id = DB.getSQLValue(trxName, sql);
|
||||
|
||||
MProcess proc = new MProcess(getCtx(), report_id, trxName);
|
||||
MPInstance instance = new MPInstance(proc, proc.getAD_Process_ID());
|
||||
|
||||
ProcessInfo pi = new ProcessInfo("Laporan Aging", report_id);
|
||||
pi.setAD_PInstance_ID(instance.getAD_PInstance_ID());
|
||||
ArrayList<ProcessInfoParameter> list = new ArrayList<ProcessInfoParameter>();
|
||||
|
||||
list.add(new ProcessInfoParameter("AD_PInstance_ID", getAD_PInstance_ID(), null, null, null));
|
||||
list.add(new ProcessInfoParameter("C_BPartner_ID", p_C_BPartner_ID > 0 ? new BigDecimal(p_C_BPartner_ID) : null, null, null, null));
|
||||
list.add(new ProcessInfoParameter("StatementDate", p_StatementDate, null, null, null));
|
||||
list.add(new ProcessInfoParameter("IsSOTrx", p_IsSOTrx ? "Y" : "N", null, null, null));
|
||||
list.add(new ProcessInfoParameter("AD_Org_ID", p_AD_Org_ID > 0 ? new Integer(p_AD_Org_ID) : null, null, null, null));
|
||||
list.add(new ProcessInfoParameter("C_Currency_ID", p_C_Currency_ID > 0 ? new Integer(p_C_Currency_ID) : null, null, null, null));
|
||||
list.add(new ProcessInfoParameter("IsListInvoices", p_IsListInvoices ? "Y" : "N", null, null, null));
|
||||
ProcessInfoParameter[] pars = new ProcessInfoParameter[list.size()];
|
||||
list.toArray(pars);
|
||||
pi.setParameter(pars);
|
||||
ProcessUtil.startJavaProcess(getCtx(), pi, Trx.get(trxName, true));
|
||||
}
|
||||
|
||||
protected void printRV() {
|
||||
String trxName = Trx.createTrxName();
|
||||
String sql = "SELECT AD_Process_ID FROM AD_Process WHERE value='RV_T_Aging'";
|
||||
int report_id = DB.getSQLValue(trxName, sql);
|
||||
|
||||
MProcess proc = new MProcess(getCtx(), report_id, trxName);
|
||||
MPInstance instance = new MPInstance(proc, proc.getAD_Process_ID());
|
||||
|
||||
ProcessInfo pi = new ProcessInfo("Aging", report_id);
|
||||
pi.setAD_Process_ID(report_id);
|
||||
pi.setClassName(proc.getClassname());
|
||||
pi.setAD_PInstance_ID(instance.getAD_PInstance_ID());
|
||||
ArrayList<ProcessInfoParameter> list = new ArrayList<ProcessInfoParameter>();
|
||||
list.add(new ProcessInfoParameter("C_BPartner_ID", new BigDecimal(p_C_BPartner_ID), null, null, null));
|
||||
list.add(new ProcessInfoParameter("C_BP_Group_ID", new BigDecimal(p_C_BP_Group_ID), null, null, null));
|
||||
list.add(new ProcessInfoParameter("StatementDate", p_StatementDate, null, null, null));
|
||||
list.add(new ProcessInfoParameter("DateAcct", p_DateAcct ? "Y" : "N", null, null, null));
|
||||
list.add(new ProcessInfoParameter("IsSOTrx", p_IsSOTrx ? "Y" : "N", null, null, null));
|
||||
list.add(new ProcessInfoParameter("AD_Org_ID", new BigDecimal(p_AD_Org_ID), null, null, null));
|
||||
list.add(new ProcessInfoParameter("C_Currency_ID", new BigDecimal(p_C_Currency_ID), null, null, null));
|
||||
list.add(new ProcessInfoParameter("IsListInvoices", p_IsListInvoices ? "Y" : "N", null, null, null));
|
||||
list.add(new ProcessInfoParameter("DocBaseType", m_DocBaseType, null, null, null));
|
||||
ProcessInfoParameter[] pars = new ProcessInfoParameter[list.size()];
|
||||
list.toArray(pars);
|
||||
pi.setParameter(pars);
|
||||
pi.setReportingProcess(true);
|
||||
pi.setAD_Client_ID(getAD_Client_ID());
|
||||
ProcessUtil.startJavaProcess(getCtx(), pi, Trx.get(trxName, true));
|
||||
ReportCtl.start(pi, false);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,282 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. 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., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package andromedia.midsuit.process;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.exceptions.DBException;
|
||||
import org.compiere.model.MRole;
|
||||
import org.compiere.process.ProcessInfoParameter;
|
||||
import org.compiere.process.SvrProcess;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.TimeUtil;
|
||||
|
||||
import andromedia.midsuit.model.MID_Aging;
|
||||
|
||||
/**
|
||||
* Invoice Aging Report.
|
||||
* Based on RV_Aging.
|
||||
* @author Jorg Janke
|
||||
* @author victor.perez@e-evolution.com FR 1933937 Is necessary a new Aging to Date
|
||||
* @see http://sourceforge.net/tracker/index.php?func=detail&aid=1933937&group_id=176962&atid=879335
|
||||
* @author Carlos Ruiz - globalqss BF 2655587 Multi-org not supported in Aging
|
||||
* @see https://sourceforge.net/tracker2/?func=detail&aid=2655587&group_id=176962&atid=879332
|
||||
* @version $Id: Aging.java,v 1.5 2006/10/07 00:58:44 jjanke Exp $
|
||||
*/
|
||||
public class MID_ProcessRVAging extends SvrProcess
|
||||
{
|
||||
/** The date to calculate the days due from */
|
||||
private Timestamp p_StatementDate = null;
|
||||
//FR 1933937
|
||||
private boolean p_DateAcct = false;
|
||||
private boolean p_IsSOTrx = false;
|
||||
private int p_C_Currency_ID = 0;
|
||||
private int p_AD_Org_ID = 0;
|
||||
private int p_C_BP_Group_ID = 0;
|
||||
private int p_C_BPartner_ID = 0;
|
||||
private boolean p_IsListInvoices = false;
|
||||
/** Number of days between today and statement date */
|
||||
private int m_statementOffset = 0;
|
||||
private String m_DocBaseType = null;
|
||||
|
||||
/**
|
||||
* Prepare - e.g., get Parameters.
|
||||
*/
|
||||
protected void prepare()
|
||||
{
|
||||
ProcessInfoParameter[] para = getParameter();
|
||||
for (int i = 0; i < para.length; i++)
|
||||
{
|
||||
String name = para[i].getParameterName();
|
||||
if (para[i].getParameter() == null)
|
||||
;
|
||||
else if (name.equals("StatementDate"))
|
||||
p_StatementDate = (Timestamp)para[i].getParameter();
|
||||
else if (name.equals("DateAcct"))
|
||||
p_DateAcct = "Y".equals(para[i].getParameter());
|
||||
else if (name.equals("IsSOTrx"))
|
||||
p_IsSOTrx = "Y".equals(para[i].getParameter());
|
||||
else if (name.equals("C_Currency_ID"))
|
||||
p_C_Currency_ID = ((BigDecimal)para[i].getParameter()).intValue();
|
||||
else if (name.equals("AD_Org_ID"))
|
||||
p_AD_Org_ID = ((BigDecimal)para[i].getParameter()).intValue();
|
||||
else if (name.equals("C_BP_Group_ID"))
|
||||
p_C_BP_Group_ID = ((BigDecimal)para[i].getParameter()).intValue();
|
||||
else if (name.equals("C_BPartner_ID"))
|
||||
p_C_BPartner_ID = ((BigDecimal)para[i].getParameter()).intValue();
|
||||
else if (name.equals("IsListInvoices"))
|
||||
p_IsListInvoices = "Y".equals(para[i].getParameter());
|
||||
else if (name.equals("DocBaseType"))
|
||||
m_DocBaseType = (String)para[i].getParameterAsString();
|
||||
else
|
||||
log.log(Level.SEVERE, "Unknown Parameter: " + name);
|
||||
}
|
||||
if (p_StatementDate == null)
|
||||
p_StatementDate = new Timestamp (System.currentTimeMillis());
|
||||
else
|
||||
m_statementOffset = TimeUtil.getDaysBetween(
|
||||
new Timestamp(System.currentTimeMillis()), p_StatementDate);
|
||||
} // prepare
|
||||
|
||||
/**
|
||||
* DoIt
|
||||
* @return Message
|
||||
* @throws Exception
|
||||
*/
|
||||
protected String doIt() throws Exception
|
||||
{
|
||||
if (log.isLoggable(Level.INFO)) log.info("StatementDate=" + p_StatementDate + ", IsSOTrx=" + p_IsSOTrx
|
||||
+ ", C_Currency_ID=" + p_C_Currency_ID + ", AD_Org_ID=" + p_AD_Org_ID
|
||||
+ ", C_BP_Group_ID=" + p_C_BP_Group_ID + ", C_BPartner_ID=" + p_C_BPartner_ID
|
||||
+ ", IsListInvoices=" + p_IsListInvoices);
|
||||
//FR 1933937
|
||||
String dateacct = DB.TO_DATE(p_StatementDate);
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("SELECT bp.C_BP_Group_ID, oi.C_BPartner_ID,oi.C_Invoice_ID,oi.C_InvoicePaySchedule_ID, " // 1..4
|
||||
+ "oi.C_Currency_ID, oi.IsSOTrx, " // 5..6
|
||||
+ "oi.DateInvoiced, oi.NetDays,oi.DueDate,oi.DaysDue, "); // 7..10
|
||||
if (p_C_Currency_ID == 0)
|
||||
{
|
||||
if (!p_DateAcct)//FR 1933937
|
||||
{
|
||||
sql.append(" oi.GrandTotal, oi.PaidAmt, oi.OpenAmt "); // 11..13
|
||||
}
|
||||
else
|
||||
{
|
||||
sql.append(" oi.GrandTotal, invoicePaidToDate(oi.C_Invoice_ID, oi.C_Currency_ID, 1,"+dateacct+") AS PaidAmt, invoiceOpenToDate(oi.C_Invoice_ID,oi.C_InvoicePaySchedule_ID,"+dateacct+") AS OpenAmt "); // 11..13
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
String s = ",oi.C_Currency_ID," + p_C_Currency_ID + ",oi.DateAcct,oi.C_ConversionType_ID,oi.AD_Client_ID,oi.AD_Org_ID)";
|
||||
sql.append("currencyConvert(oi.GrandTotal").append(s); // 11
|
||||
if (!p_DateAcct)
|
||||
{
|
||||
sql.append(", currencyConvert(oi.PaidAmt").append(s) // 12
|
||||
.append(", currencyConvert(oi.OpenAmt").append(s); // 13
|
||||
}
|
||||
else
|
||||
{
|
||||
sql.append(", currencyConvert(invoicePaidToDate(oi.C_Invoice_ID, oi.C_Currency_ID, 1,"+dateacct+")").append(s) // 12
|
||||
.append(", currencyConvert(invoiceOpenToDate(oi.C_Invoice_ID,oi.C_InvoicePaySchedule_ID,"+dateacct+")").append(s); // 13
|
||||
}
|
||||
}
|
||||
sql.append(",oi.C_Activity_ID,oi.C_Campaign_ID,oi.C_Project_ID,oi.AD_Org_ID "); // 14..17
|
||||
sql.append(",alo.UnallocatedPayment ");
|
||||
if (!p_DateAcct)//FR 1933937
|
||||
{
|
||||
sql.append(" FROM RV_OpenItem oi");
|
||||
}
|
||||
else
|
||||
{
|
||||
sql.append(" FROM RV_OpenItemToDate oi");
|
||||
}
|
||||
|
||||
sql.append(" INNER JOIN C_BPartner bp ON (oi.C_BPartner_ID=bp.C_BPartner_ID) "
|
||||
+ "LEFT JOIN C_DocType dt ON (dt.C_DocType_ID=oi.C_DocType_ID) "
|
||||
+ "LEFT JOIN (select c_bpartner_id, " +
|
||||
"sum(payment) as UnallocatedPayment " +
|
||||
"FROM " +
|
||||
"(SELECT p.c_bpartner_id, " +
|
||||
"p.payamt + (coalesce(sum(al.amount),0)) as payment " +
|
||||
"FROM C_Payment p " +
|
||||
"left join c_allocationline al on al.c_payment_id = p.c_payment_id " +
|
||||
"group by p.c_bpartner_id, payamt) allo " +
|
||||
"group by c_bpartner_id) alo ON alo.C_BPartner_ID = oi.C_BPartner_ID "
|
||||
+ "WHERE oi.ISSoTrx=").append(p_IsSOTrx ? "'Y'" : "'N'");
|
||||
if (p_C_BPartner_ID > 0)
|
||||
{
|
||||
sql.append(" AND oi.C_BPartner_ID=").append(p_C_BPartner_ID);
|
||||
}
|
||||
else if (p_C_BP_Group_ID > 0)
|
||||
{
|
||||
sql.append(" AND bp.C_BP_Group_ID=").append(p_C_BP_Group_ID);
|
||||
}
|
||||
if (p_AD_Org_ID > 0) // BF 2655587
|
||||
{
|
||||
sql.append(" AND oi.AD_Org_ID=").append(p_AD_Org_ID);
|
||||
}
|
||||
|
||||
if (p_DateAcct)//FR 1933937
|
||||
{
|
||||
sql.append(" AND invoiceOpenToDate(oi.C_Invoice_ID,oi.C_InvoicePaySchedule_ID,"+dateacct+") <> 0 ");
|
||||
}
|
||||
if (m_DocBaseType!=null) {
|
||||
sql.append(" AND dt.DocBaseType='").append(m_DocBaseType).append("'");
|
||||
}
|
||||
|
||||
sql.append(" ORDER BY oi.C_BPartner_ID, oi.C_Currency_ID, oi.C_Invoice_ID");
|
||||
|
||||
if (log.isLoggable(Level.FINEST)) log.finest(sql.toString());
|
||||
String finalSql = MRole.getDefault(getCtx(), false).addAccessSQL(
|
||||
sql.toString(), "oi", MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO);
|
||||
log.finer(finalSql);
|
||||
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
//
|
||||
MID_Aging aging = null;
|
||||
int counter = 0;
|
||||
int rows = 0;
|
||||
int AD_PInstance_ID = getAD_PInstance_ID();
|
||||
//
|
||||
try
|
||||
{
|
||||
pstmt = DB.prepareStatement(finalSql, get_TrxName());
|
||||
rs = pstmt.executeQuery();
|
||||
while (rs.next())
|
||||
{
|
||||
int C_BP_Group_ID = rs.getInt(1);
|
||||
int C_BPartner_ID = rs.getInt(2);
|
||||
int C_Invoice_ID = p_IsListInvoices ? rs.getInt(3) : 0;
|
||||
int C_InvoicePaySchedule_ID = p_IsListInvoices ? rs.getInt(4) : 0;
|
||||
int C_Currency_ID = rs.getInt(5);
|
||||
boolean IsSOTrx = "Y".equals(rs.getString(6));
|
||||
//
|
||||
//Timestamp DateInvoiced = rs.getTimestamp(7);
|
||||
//int NetDays = rs.getInt(8);
|
||||
Timestamp DueDate = rs.getTimestamp(9);
|
||||
// Days Due
|
||||
int DaysDue = rs.getInt(10) // based on today
|
||||
+ m_statementOffset;
|
||||
//
|
||||
BigDecimal GrandTotal = rs.getBigDecimal(11);
|
||||
//BigDecimal PaidAmt = rs.getBigDecimal(12);
|
||||
BigDecimal OpenAmt = rs.getBigDecimal(13);
|
||||
//
|
||||
int C_Activity_ID = p_IsListInvoices ? rs.getInt(14) : 0;
|
||||
int C_Campaign_ID = p_IsListInvoices ? rs.getInt(15) : 0;
|
||||
int C_Project_ID = p_IsListInvoices ? rs.getInt(16) : 0;
|
||||
int AD_Org_ID = rs.getInt(17);
|
||||
BigDecimal UnallocatedPayment = rs.getBigDecimal(18);
|
||||
|
||||
rows++;
|
||||
|
||||
aging.add (DueDate, DaysDue, GrandTotal, OpenAmt, UnallocatedPayment);
|
||||
// New Aging Row
|
||||
if (aging == null // Key
|
||||
|| AD_PInstance_ID != aging.getAD_PInstance_ID()
|
||||
|| C_BPartner_ID != aging.getC_BPartner_ID()
|
||||
|| C_Currency_ID != aging.getC_Currency_ID()
|
||||
|| C_Invoice_ID != aging.getC_Invoice_ID()
|
||||
|| C_InvoicePaySchedule_ID != aging.getC_InvoicePaySchedule_ID())
|
||||
{
|
||||
if (aging != null)
|
||||
{
|
||||
aging.saveEx();
|
||||
if (log.isLoggable(Level.FINE)) log.fine("#" + ++counter + " - " + aging);
|
||||
}
|
||||
aging = new MID_Aging (getCtx(), AD_PInstance_ID, p_StatementDate,
|
||||
C_BPartner_ID, C_Currency_ID,
|
||||
C_Invoice_ID, C_InvoicePaySchedule_ID,
|
||||
C_BP_Group_ID, AD_Org_ID, DueDate, IsSOTrx, get_TrxName());
|
||||
aging.setC_Activity_ID(C_Activity_ID);
|
||||
aging.setC_Campaign_ID(C_Campaign_ID);
|
||||
aging.setC_Project_ID(C_Project_ID);
|
||||
aging.setDateAcct(p_DateAcct);
|
||||
}
|
||||
// Fill Buckets
|
||||
|
||||
}
|
||||
if (aging != null)
|
||||
{
|
||||
aging.saveEx();
|
||||
counter++;
|
||||
if (log.isLoggable(Level.FINE)) log.fine("#" + counter + " - " + aging);
|
||||
}
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
throw new DBException(e, finalSql);
|
||||
}
|
||||
finally
|
||||
{
|
||||
DB.close(rs, pstmt);
|
||||
rs = null; pstmt = null;
|
||||
}
|
||||
//
|
||||
if (log.isLoggable(Level.INFO)) log.info("#" + counter + " - rows=" + rows);
|
||||
return "";
|
||||
} // doIt
|
||||
|
||||
} // Aging
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
package andromedia.midsuit.validator;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.adempiere.base.event.IEventTopics;
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.compiere.model.MBankAccount;
|
||||
import org.compiere.model.MDocType;
|
||||
import org.compiere.model.MInOut;
|
||||
import org.compiere.model.MInOutLine;
|
||||
import org.compiere.model.MInvoice;
|
||||
import org.compiere.model.MInvoiceLine;
|
||||
import org.compiere.model.MOrder;
|
||||
import org.compiere.model.MOrderLine;
|
||||
import org.compiere.model.MPayment;
|
||||
import org.compiere.model.MStorageOnHand;
|
||||
import org.compiere.model.MWarehouse;
|
||||
import org.compiere.model.PO;
|
||||
import org.compiere.model.Query;
|
||||
import org.compiere.process.DocAction;
|
||||
import org.osgi.service.event.Event;
|
||||
|
||||
public class MID_OrderValidator {
|
||||
public static String executeEvent(Event e, PO po) {
|
||||
MOrder Order = (MOrder) po;
|
||||
if (e.getTopic().equals(IEventTopics.DOC_AFTER_COMPLETE))
|
||||
return afterComplete(Order);
|
||||
return "";
|
||||
}
|
||||
private static String afterComplete(MOrder Order){
|
||||
MDocType docTypeOfOrder = (MDocType) Order.getC_DocType();
|
||||
if(docTypeOfOrder.get_ValueAsBoolean("isPOS")){
|
||||
//Create Shipment
|
||||
MInOut Shipment = new MInOut(Order, docTypeOfOrder.getC_DocTypeShipment_ID(), Order.getDateOrdered());
|
||||
Shipment.saveEx();
|
||||
|
||||
for(MOrderLine OrderLine : Order.getLines()){
|
||||
MInOutLine ShipmentLine = new MInOutLine(Shipment);
|
||||
// Qty = Ordered - Delivered
|
||||
BigDecimal MovementQty = OrderLine.getQtyOrdered().subtract(OrderLine.getQtyDelivered());
|
||||
// Location
|
||||
int M_Locator_ID = MStorageOnHand.getM_Locator_ID (OrderLine.getM_Warehouse_ID(),
|
||||
OrderLine.getM_Product_ID(), OrderLine.getM_AttributeSetInstance_ID(),
|
||||
MovementQty, OrderLine.get_TrxName());
|
||||
if (M_Locator_ID == 0) // Get default Location
|
||||
{
|
||||
MWarehouse wh = MWarehouse.get(OrderLine.getCtx(), OrderLine.getM_Warehouse_ID());
|
||||
M_Locator_ID = wh.getDefaultLocator().getM_Locator_ID();
|
||||
}
|
||||
//
|
||||
ShipmentLine.setOrderLine(OrderLine, M_Locator_ID, MovementQty);
|
||||
ShipmentLine.setQty(MovementQty);
|
||||
if (OrderLine.getQtyEntered().compareTo(OrderLine.getQtyOrdered()) != 0)
|
||||
OrderLine.setQtyEntered(MovementQty
|
||||
.multiply(OrderLine.getQtyEntered())
|
||||
.divide(OrderLine.getQtyOrdered(), 6, BigDecimal.ROUND_HALF_UP));
|
||||
ShipmentLine.saveEx();
|
||||
}
|
||||
|
||||
if (!Shipment.processIt(DocAction.ACTION_Complete))
|
||||
throw new AdempiereException("Failed when processing document - " + Shipment.getProcessMsg());
|
||||
Shipment.saveEx();
|
||||
|
||||
//Create Invoice
|
||||
MInvoice invoice = new MInvoice (Order, docTypeOfOrder.getC_DocTypeInvoice_ID(), Order.getDateOrdered());
|
||||
invoice.setPaymentRule(Order.getPaymentRule());
|
||||
invoice.saveEx();
|
||||
|
||||
// If we have a Shipment - use that as a base
|
||||
if (Shipment != null)
|
||||
{
|
||||
MInOutLine[] sLines = Shipment.getLines(true);
|
||||
for (int i = 0; i < sLines.length; i++)
|
||||
{
|
||||
MInOutLine sLine = sLines[i];
|
||||
//
|
||||
MInvoiceLine iLine = new MInvoiceLine(invoice);
|
||||
iLine.setShipLine(sLine);
|
||||
// Qty = Delivered
|
||||
if (sLine.sameOrderLineUOM())
|
||||
iLine.setQtyEntered(sLine.getQtyEntered());
|
||||
else
|
||||
iLine.setQtyEntered(sLine.getMovementQty());
|
||||
iLine.setQtyInvoiced(sLine.getMovementQty());
|
||||
iLine.saveEx();
|
||||
sLine.setIsInvoiced(true);
|
||||
sLine.saveEx();
|
||||
}
|
||||
}
|
||||
|
||||
if (!invoice.processIt(DocAction.ACTION_Complete))
|
||||
throw new AdempiereException("Failed when processing document - " + invoice.getProcessMsg());
|
||||
invoice.saveEx();
|
||||
|
||||
Order.setC_CashLine_ID(invoice.getC_CashLine_ID());
|
||||
Order.saveEx();
|
||||
|
||||
|
||||
// MPayment payment = new MPayment(Order.getCtx(), 0, Order.get_TrxName());
|
||||
// payment.setAD_Org_ID(Order.getAD_Org_ID());
|
||||
//
|
||||
// payment.setTenderType(MPayment.TENDERTYPE_Cash);
|
||||
// payment.setC_BankAccount_ID(ba.getC_BankAccount_ID());
|
||||
// payment.setIsPrepayment(false);
|
||||
//
|
||||
// payment.setDateAcct(Order.getDateAcct());
|
||||
// payment.setDateTrx(Order.getDateOrdered());
|
||||
// //
|
||||
// payment.setC_BPartner_ID(Order.getC_BPartner_ID());
|
||||
// payment.setC_Invoice_ID(invoice.getC_Invoice_ID());
|
||||
// payment.setC_DocType_ID(119);
|
||||
// payment.setC_Currency_ID(Order.getC_Currency_ID());
|
||||
//
|
||||
// payment.setPayAmt(invoice.getGrandTotal());
|
||||
// // Save payment
|
||||
// payment.saveEx();
|
||||
// payment.processIt(DocAction.ACTION_Complete);
|
||||
// payment.saveEx();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
package andromedia.midsuit.validator;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Timestamp;
|
||||
|
||||
import org.adempiere.base.event.IEventTopics;
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.compiere.model.MDocType;
|
||||
import org.compiere.model.MInOut;
|
||||
import org.compiere.model.MInOutConfirm;
|
||||
import org.compiere.model.MInOutLine;
|
||||
import org.compiere.model.MInvoice;
|
||||
import org.compiere.model.MInvoiceLine;
|
||||
import org.compiere.model.MOrder;
|
||||
import org.compiere.model.MOrderLine;
|
||||
import org.compiere.model.MPayment;
|
||||
import org.compiere.model.MRMA;
|
||||
import org.compiere.model.MRMALine;
|
||||
import org.compiere.model.PO;
|
||||
import org.compiere.model.Query;
|
||||
import org.compiere.model.X_C_DocType;
|
||||
import org.compiere.process.DocAction;
|
||||
import org.osgi.service.event.Event;
|
||||
|
||||
public class MID_RMAValidator {
|
||||
public static String executeEvent(Event e, PO po) {
|
||||
MRMA RMA = (MRMA) po;
|
||||
if (e.getTopic().equals(IEventTopics.PO_AFTER_NEW))
|
||||
return afterSave(RMA);
|
||||
if (e.getTopic().equals(IEventTopics.DOC_AFTER_COMPLETE))
|
||||
return afterComplete(RMA);
|
||||
return "";
|
||||
}
|
||||
|
||||
private static String afterComplete(MRMA RMA) {
|
||||
// Create InOut Return - Customer Return
|
||||
MInOut ioR = new MInOut(RMA.getCtx(), 0, RMA.get_TrxName());
|
||||
ioR.setAD_Org_ID(RMA.getInOut().getAD_Org_ID());
|
||||
ioR.setC_DocType_ID(RMA.getC_DocType().getC_DocTypeShipment_ID());
|
||||
ioR.setM_RMA_ID(RMA.getM_RMA_ID());
|
||||
ioR.setC_BPartner_ID(RMA.getC_BPartner_ID());
|
||||
ioR.setC_BPartner_Location_ID(RMA.getInOut().getC_BPartner_Location_ID());
|
||||
ioR.setMovementType(ioR.MOVEMENTTYPE_CustomerReturns);
|
||||
ioR.setM_Warehouse_ID(RMA.getInOut().getM_Warehouse_ID());
|
||||
ioR.saveEx();
|
||||
|
||||
for (MRMALine line : RMA.getLines(true)) {
|
||||
MInOutLine ioRl = new MInOutLine(ioR);
|
||||
ioRl.setM_Product_ID(line.getM_Product_ID(), true);
|
||||
ioRl.setQty(line.getQty());
|
||||
ioRl.setM_Locator_ID(line.getM_InOutLine().getM_Locator_ID());
|
||||
ioRl.setM_RMALine_ID(line.getM_RMALine_ID());
|
||||
ioRl.saveEx();
|
||||
}
|
||||
|
||||
ioR.processIt("IP");
|
||||
ioR.saveEx();
|
||||
|
||||
MInOutConfirm confirm = new Query(RMA.getCtx(), MInOutConfirm.Table_Name, "M_InOut_ID =?", RMA.get_TrxName())
|
||||
.setParameters(new Object[] { ioR.getM_InOut_ID() }).first();
|
||||
confirm.processIt("CO");
|
||||
confirm.saveEx();
|
||||
|
||||
ioR.processIt("CO");
|
||||
ioR.saveEx();
|
||||
|
||||
// Create Invoice
|
||||
MOrder order = (MOrder) RMA.getInOut().getC_Order();
|
||||
MInvoice invoice = new MInvoice(order, order.getC_DocType().getC_DocTypeInvoice_ID(), order.getDateOrdered());
|
||||
invoice.setPaymentRule(order.getPaymentRule());
|
||||
int ARCreditMemo_ID = new Query(RMA.getCtx(), X_C_DocType.Table_Name, "name =?", RMA.get_TrxName())
|
||||
.setParameters("AR Credit Memo")
|
||||
.setOnlyActiveRecords(true)
|
||||
.firstId();
|
||||
invoice.setC_DocTypeTarget_ID(ARCreditMemo_ID);
|
||||
invoice.setC_PaymentTerm_ID(order.getC_PaymentTerm_ID());
|
||||
invoice.setC_Currency_ID(order.getC_Currency_ID());
|
||||
invoice.setM_PriceList_ID(order.getM_PriceList_ID());
|
||||
invoice.saveEx();
|
||||
|
||||
MOrderLine[] oLines = order.getLines();
|
||||
for (int i = 0; i < oLines.length; i++) {
|
||||
MOrderLine oLine = oLines[i];
|
||||
MInvoiceLine iLine = new MInvoiceLine(invoice);
|
||||
iLine.setOrderLine(oLine);
|
||||
iLine.setQtyEntered(oLine.getQtyOrdered());
|
||||
iLine.setQtyInvoiced(oLine.getQtyOrdered());
|
||||
iLine.saveEx();
|
||||
}
|
||||
|
||||
invoice.processIt(DocAction.ACTION_Complete);
|
||||
invoice.saveEx();
|
||||
|
||||
MPayment payment = new MPayment(RMA.getCtx(), 0, RMA.get_TrxName());
|
||||
payment.setC_Invoice_ID(invoice.get_ID());
|
||||
// payment.setC_Order_ID(invoice.getC_Order_ID());
|
||||
payment.setIsReceipt(invoice.isSOTrx());
|
||||
payment.setAD_Org_ID(order.getAD_Org_ID());
|
||||
payment.setC_DocType_ID(invoice.isSOTrx());
|
||||
payment.setC_BPartner_ID(invoice.getC_BPartner_ID());
|
||||
payment.setAmount(invoice.getC_Currency_ID(), invoice.getGrandTotal().negate());
|
||||
MInvoice invoiceUsed = new MInvoice(RMA.getCtx(), order.getC_Invoice_ID(), RMA.get_TrxName());
|
||||
payment.setC_BankAccount_ID(invoiceUsed.getC_Payment().getC_BankAccount_ID());
|
||||
payment.saveEx();
|
||||
|
||||
payment.processIt(DocAction.ACTION_Complete);
|
||||
payment.saveEx();
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
private static String afterSave(MRMA RMA) {
|
||||
MInOut io = (MInOut) RMA.getInOut();
|
||||
for (MInOutLine iol : io.getLines()) {
|
||||
MRMALine rmaLine = new MRMALine(RMA.getCtx(), 0, RMA.get_TrxName());
|
||||
rmaLine.setM_RMA_ID(RMA.getM_RMA_ID());
|
||||
rmaLine.setM_InOutLine_ID(iol.getM_InOutLine_ID());
|
||||
rmaLine.setQty(iol.getMovementQty());
|
||||
rmaLine.setAD_Org_ID(RMA.getAD_Org_ID());
|
||||
rmaLine.setDescription(iol.getDescription());
|
||||
if (!rmaLine.save())
|
||||
throw new AdempiereException("Fail to Save RMALine");
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -0,0 +1,429 @@
|
|||
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
|
||||
-- Feb 22, 2018 12:36:51 PM UTC
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (300160,0,'Create lines from','Process which will generate a new document lines based on an existing document','The Create From process will create a new document based on information in an existing document selected by the user.',259,'CreateFrom',1,'N','N','N','N','N',0,'N',28,0,0,'Y',TO_TIMESTAMP('2018-02-22 12:36:51','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 12:36:51','YYYY-MM-DD HH24:MI:SS'),100,1490,'Y','N','U','N','N','N','Y','26bf35f2-99df-4fc0-872e-89e4410694c9','Y',0,'B','N')
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:36:53 PM UTC
|
||||
ALTER TABLE C_Order ADD COLUMN CreateFrom CHAR(1) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:16 PM UTC
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (300118,'Create lines from','Process which will generate a new document lines based on an existing document','The Create From process will create a new document based on information in an existing document selected by the user.',186,300160,'Y',1,590,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-22 12:38:16','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 12:38:16','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','1384d0d3-b0be-4637-b9ba-5244c4cb30f1','Y',590,2,2)
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:23 PM UTC
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (300119,'Create lines from','Process which will generate a new document lines based on an existing document','The Create From process will create a new document based on information in an existing document selected by the user.',294,300160,'Y',1,500,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-22 12:38:23','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 12:38:23','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','2af8c854-b4c5-47a3-b5f3-c5e2347a26ca','Y',500,2,2)
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:40 PM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=70, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=5, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300119
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:40 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=80, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3435
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:40 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=90, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3436
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:40 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=100, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3419
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:40 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=110,Updated=TO_TIMESTAMP('2018-02-22 12:38:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6505
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:40 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3458
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:40 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6507
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:40 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=140, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3452
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:40 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=150, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6504
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:40 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=160, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3451
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:40 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=170, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10123
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=180, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=55413
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=190, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=55414
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=200, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=55415
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=210, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3444
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=220, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3447
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=230, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3464
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=240, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3443
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=250, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3448
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=260, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3420
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=270, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3441
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=280, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=8652
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=290, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300116
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=300, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3438
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=310, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3467
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=320, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3456
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=330, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3454
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=340, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3466
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=350, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3439
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=360, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3459
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=370, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3457
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=380, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3446
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=390, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7039
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=400, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7824
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=410, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7823
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=420, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3425
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=430, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3427
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=440, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3449
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=450, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3450
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:41 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=460, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=60923
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:42 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=470, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6506
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:42 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=480, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3426
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:42 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=490, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=60973
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:42 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=500, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3671
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:56 PM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=90, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=5, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300118
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:56 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=100, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1094
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:56 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1573
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6559
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2590
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=140, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6561
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=150, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1572
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=160, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6558
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=170, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2877
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=180, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1110
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=190, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1114
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=200, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10124
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=210, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=55410
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=220, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=55411
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=230, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=55412
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=240, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1108
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=250, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1109
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=260, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2878
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=270, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56446
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=280, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1107
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=290, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201827
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=300, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201613
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=310, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1104
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=320, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1077
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=330, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1103
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=340, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=8653
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=350, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300117
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=360, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1098
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=370, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3272
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:57 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=380, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2112
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:58 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=390, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2109
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:58 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=400, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3113
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:58 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=410, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1099
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:58 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=420, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56906
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:58 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=430, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2593
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:58 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=440, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2589
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:58 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=450, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1324
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:58 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=460, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7038
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:58 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=470, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7826
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:58 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=480, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7825
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:58 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=490, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1112
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:58 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=500, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1113
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:58 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=510, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1082
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:58 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=520, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1084
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:58 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=530, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=60922
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:58 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=540, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6560
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:58 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=550, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1083
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:58 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=560, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58037
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:58 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=570, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3660
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:58 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=580, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=60972
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:38:58 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=590, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 12:38:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200756
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:40:08 PM UTC
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300161,0,'Midsuit Requisition for Sales Order',260,'MID_Requisition_ID',22,'N','N','N','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2018-02-22 12:40:08','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 12:40:08','YYYY-MM-DD HH24:MI:SS'),100,300000,'N','N','U','N','N','N','Y','7811eeb1-936b-47cb-a502-0e3257a8a069','Y',0,'N','N','N')
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:40:10 PM UTC
|
||||
UPDATE AD_Column SET FKConstraintName='MIDRequisition_COrderLine', FKConstraintType='N',Updated=TO_TIMESTAMP('2018-02-22 12:40:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=300161
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:40:10 PM UTC
|
||||
ALTER TABLE C_OrderLine ADD COLUMN MID_Requisition_ID NUMERIC(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:40:10 PM UTC
|
||||
ALTER TABLE C_OrderLine ADD CONSTRAINT MIDRequisition_COrderLine FOREIGN KEY (MID_Requisition_ID) REFERENCES mid_requisition(mid_requisition_id) DEFERRABLE INITIALLY DEFERRED
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:40:18 PM UTC
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300162,0,'Midsuit Requisition Line for Sales Order',260,'MID_RequisitionLine_ID',22,'N','N','N','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2018-02-22 12:40:18','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 12:40:18','YYYY-MM-DD HH24:MI:SS'),100,300002,'N','N','U','N','N','N','Y','e8400f88-93e8-4c76-ae3c-0cc1c2852515','Y',0,'N','N','N')
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:40:20 PM UTC
|
||||
UPDATE AD_Column SET FKConstraintName='MIDRequisitionLine_COrderLine', FKConstraintType='N',Updated=TO_TIMESTAMP('2018-02-22 12:40:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=300162
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:40:20 PM UTC
|
||||
ALTER TABLE C_OrderLine ADD COLUMN MID_RequisitionLine_ID NUMERIC(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 12:40:20 PM UTC
|
||||
ALTER TABLE C_OrderLine ADD CONSTRAINT MIDRequisitionLine_COrderLine FOREIGN KEY (MID_RequisitionLine_ID) REFERENCES mid_requisitionline(mid_requisitionline_id) DEFERRABLE INITIALLY DEFERRED
|
||||
;
|
||||
|
||||
|
|
@ -573,3 +573,183 @@ INSERT INTO AD_Menu (AD_Menu_ID,Name,"action",AD_Window_ID,AD_Client_ID,AD_Org_I
|
|||
INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNodeMM_UU) SELECT t.AD_Client_ID, 0, 'Y', statement_timestamp(), 100, statement_timestamp(), 100,t.AD_Tree_ID, 300000, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=300000)
|
||||
;
|
||||
|
||||
|
||||
-- Feb 21, 2018 4:22:51 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=80, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:22:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300007
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:22:51 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=90, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:22:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300009
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:22:51 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=100, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:22:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300010
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:22:51 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=2, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:22:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300022
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:22:51 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=3, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:22:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300011
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:22:51 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=150, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:22:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300017
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:22:51 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=160, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=5, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:22:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300008
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:22:51 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=170, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:22:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300021
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:22:51 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=180, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=5, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:22:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300016
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:22:51 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=190, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=2, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:22:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300018
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:22:51 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=200, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=3, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:22:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300020
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:22:51 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:22:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300014
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:22:51 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:22:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300013
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:22:51 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, ColumnSpan=3, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:22:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300019
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:25:59 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=30, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:25:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300010
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:25:59 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=40, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:25:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300002
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:25:59 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=50, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:25:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300003
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:25:59 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=60, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:25:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300004
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:25:59 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=70, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:25:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300005
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:25:59 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=80, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:25:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300006
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:25:59 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=90, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:25:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300007
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:25:59 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=100, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:25:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300022
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:25:59 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:25:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300011
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:25:59 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:25:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300012
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:25:59 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:25:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300015
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:25:59 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=140, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:25:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300017
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:25:59 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=150, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:25:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300008
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:25:59 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=160, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:25:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300009
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:26:16 AM UTC
|
||||
UPDATE AD_Field SET IsReadOnly='Y', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:26:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300021
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:29:31 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=150, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:29:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300009
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:29:31 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=160, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=5, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:29:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300008
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:47:49 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=30, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:47:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300030
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:47:49 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=40, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:47:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300033
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:47:49 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=50, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:47:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300026
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:47:49 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=60, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:47:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300025
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:47:49 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=70, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:47:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300037
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:47:49 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=80, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:47:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300029
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:47:49 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=90, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:47:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300036
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:47:49 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=100, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:47:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300027
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:47:49 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:47:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300031
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:47:49 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:47:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300032
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:47:49 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:47:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300038
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:47:49 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=140, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:47:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300028
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:47:49 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:47:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300035
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 4:47:49 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-21 04:47:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300034
|
||||
;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,61 @@
|
|||
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
|
||||
-- Feb 21, 2018 5:31:57 AM UTC
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (300055,0,'Sales Representative','Sales Representative or Company Agent','The Sales Representative indicates the Sales Rep for this Region. Any Sales Rep must be a valid internal user.',300000,'SalesRep_ID',22,'N','N','N','N','N',0,'N',18,190,0,0,'Y',TO_TIMESTAMP('2018-02-21 05:31:57','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-21 05:31:57','YYYY-MM-DD HH24:MI:SS'),100,1063,'N','N','U','N','N','N','Y','161d1164-2d6c-4be5-a400-f6f2473a891b','Y',0,'N','N')
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 5:32:39 AM UTC
|
||||
UPDATE AD_Column SET FKConstraintName='SalesRep_MIDRequisition', FKConstraintType='N',Updated=TO_TIMESTAMP('2018-02-21 05:32:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=300055
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 5:32:39 AM UTC
|
||||
ALTER TABLE MID_Requisition ADD COLUMN SalesRep_ID NUMERIC(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 5:32:39 AM UTC
|
||||
ALTER TABLE MID_Requisition ADD CONSTRAINT SalesRep_MIDRequisition FOREIGN KEY (SalesRep_ID) REFERENCES ad_user(ad_user_id) DEFERRABLE INITIALLY DEFERRED
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 8:28:39 AM UTC
|
||||
INSERT INTO AD_Workflow (Name,AD_Workflow_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AccessLevel,EntityType,Author,Priority,WorkingTime,"limit",Duration,Version,Cost,DurationUnit,WaitingTime,PublishStatus,IsDefault,ValidateWorkflow,AD_Table_ID,Value,WorkflowType,IsValid,SetupTime,MovingTime,DocumentNo,QtyBatchSize,QueuingTime,IsBetaFunctionality,Yield,UnitsCycles,OverlapUnits,AD_Workflow_UU) VALUES ('Process Sales Requisition',300000,0,0,'Y',TO_TIMESTAMP('2018-02-21 08:28:39','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-21 08:28:39','YYYY-MM-DD HH24:MI:SS'),100,'3','U','Midsuit',0,0,0,0,0,0,'D',0,'U','N','N',300000,'Process_MID_Requisition','P','N',0,0,'10000000',1,0,'N',100,0,0,'84d1b007-e5cc-44a3-b7f5-5afbeb668e7e')
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 8:28:57 AM UTC
|
||||
INSERT INTO AD_WF_Node (AD_WF_Node_ID,Name,AD_Workflow_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,"action",IsCentrallyMaintained,YPosition,EntityType,XPosition,"limit",Duration,Cost,WaitingTime,WorkingTime,Priority,JoinElement,SplitElement,WaitTime,DocAction,Value,DynPriorityChange,IsMilestone,IsSubcontracting,UnitsCycles,OverlapUnits,Yield,AD_WF_Node_UU,AD_InfoWindow_ID) VALUES (300000,'(Start)',300000,0,0,'Y',TO_TIMESTAMP('2018-02-21 08:28:57','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-21 08:28:57','YYYY-MM-DD HH24:MI:SS'),100,'Z','Y',0,'U',0,0,0,0,0,0,0,'X','X',0,'CO','(Start)',0,'N','N',0,0,100,'109f650e-c7ab-476b-bf92-b18711a55d08',200000)
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 8:29:12 AM UTC
|
||||
INSERT INTO AD_WF_Node (AD_WF_Node_ID,Name,AD_Workflow_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,"action",IsCentrallyMaintained,YPosition,EntityType,XPosition,"limit",Duration,Cost,WaitingTime,WorkingTime,Priority,JoinElement,SplitElement,WaitTime,DocAction,Value,DynPriorityChange,IsMilestone,IsSubcontracting,UnitsCycles,OverlapUnits,Yield,AD_WF_Node_UU,AD_InfoWindow_ID) VALUES (300001,'(DocPrepare)',300000,0,0,'Y',TO_TIMESTAMP('2018-02-21 08:29:12','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-21 08:29:12','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',0,'U',0,0,0,0,0,0,0,'X','X',0,'PR','(DocPrepare)',0,'N','N',0,0,100,'761af635-83b2-49f9-85de-7669ad09cd4c',200000)
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 8:29:21 AM UTC
|
||||
INSERT INTO AD_WF_Node (AD_WF_Node_ID,Name,AD_Workflow_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,"action",IsCentrallyMaintained,YPosition,EntityType,XPosition,"limit",Duration,Cost,WaitingTime,WorkingTime,Priority,JoinElement,SplitElement,WaitTime,DocAction,Value,DynPriorityChange,IsMilestone,IsSubcontracting,UnitsCycles,OverlapUnits,Yield,AD_WF_Node_UU,AD_InfoWindow_ID) VALUES (300002,'(DocComplete)',300000,0,0,'Y',TO_TIMESTAMP('2018-02-21 08:29:21','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-21 08:29:21','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',0,'U',0,0,0,0,0,0,0,'X','X',0,'CO','(DocComplete)',0,'N','N',0,0,100,'03dce32e-29e2-409b-9091-ca9be7711625',200000)
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 8:30:12 AM UTC
|
||||
INSERT INTO AD_WF_Node (AD_WF_Node_ID,Name,AD_Workflow_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,"action",IsCentrallyMaintained,YPosition,EntityType,XPosition,"limit",Duration,Cost,WaitingTime,WorkingTime,Priority,JoinElement,SplitElement,WaitTime,DocAction,Value,DynPriorityChange,IsMilestone,IsSubcontracting,UnitsCycles,OverlapUnits,Yield,AD_WF_Node_UU,AD_InfoWindow_ID) VALUES (300003,'(DocAuto)',300000,0,0,'Y',TO_TIMESTAMP('2018-02-21 08:30:12','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-21 08:30:12','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',0,'U',0,0,0,0,0,0,0,'X','X',0,'--','(DocAuto)',0,'N','N',0,0,100,'34dbbaf3-2255-40dd-9cbd-3eaa929e0a85',200000)
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 8:30:28 AM UTC
|
||||
INSERT INTO AD_WF_NodeNext (AD_WF_Node_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Client_ID,AD_Org_ID,AD_WF_Next_ID,EntityType,SeqNo,AD_WF_NodeNext_ID,IsStdUserWorkflow,AD_WF_NodeNext_UU) VALUES (300000,'Y',TO_TIMESTAMP('2018-02-21 08:30:28','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-21 08:30:28','YYYY-MM-DD HH24:MI:SS'),100,0,0,300001,'U',10,300000,'Y','54e0cd73-5255-4c14-8113-e6181c077ea4')
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 8:30:33 AM UTC
|
||||
INSERT INTO AD_WF_NodeNext (AD_WF_Node_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Client_ID,AD_Org_ID,AD_WF_Next_ID,EntityType,SeqNo,AD_WF_NodeNext_ID,IsStdUserWorkflow,AD_WF_NodeNext_UU) VALUES (300000,'Y',TO_TIMESTAMP('2018-02-21 08:30:33','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-21 08:30:33','YYYY-MM-DD HH24:MI:SS'),100,0,0,300003,'U',100,300001,'N','50354b6a-ff43-4748-8fe6-b4cc2bc7eeff')
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 8:30:48 AM UTC
|
||||
INSERT INTO AD_WF_NodeNext (AD_WF_Node_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Client_ID,AD_Org_ID,AD_WF_Next_ID,EntityType,SeqNo,AD_WF_NodeNext_ID,IsStdUserWorkflow,AD_WF_NodeNext_UU) VALUES (300001,'Y',TO_TIMESTAMP('2018-02-21 08:30:48','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-21 08:30:48','YYYY-MM-DD HH24:MI:SS'),100,0,0,300002,'U',10,300002,'Y','9651df3f-6ed0-46c1-bd86-ceeddab7384c')
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 8:30:56 AM UTC
|
||||
UPDATE AD_Workflow SET AD_WF_Node_ID=300000, IsValid='Y',Updated=TO_TIMESTAMP('2018-02-21 08:30:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=300000
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 8:32:05 AM UTC
|
||||
INSERT INTO AD_Process (AD_Process_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,IsReport,Value,IsDirectPrint,AccessLevel,EntityType,Statistic_Count,Statistic_Seconds,AD_Workflow_ID,IsBetaFunctionality,IsServerProcess,ShowHelp,CopyFromProcess,AD_Process_UU) VALUES (300004,0,0,'Y',TO_TIMESTAMP('2018-02-21 08:32:05','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-21 08:32:05','YYYY-MM-DD HH24:MI:SS'),100,'Process Sales Requisition','N','Process_MID_Requisition','N','3','U',0,0,300000,'N','N','Y','N','05e067db-9fb9-49ac-8946-3cd679c1e73a')
|
||||
;
|
||||
|
||||
-- Feb 21, 2018 8:32:34 AM UTC
|
||||
UPDATE AD_Column SET AD_Process_ID=300004,Updated=TO_TIMESTAMP('2018-02-21 08:32:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=300009
|
||||
;
|
||||
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
|
||||
-- Feb 20, 2018 1:00:09 PM UTC
|
||||
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (300006,0,0,'Y',TO_TIMESTAMP('2018-02-20 13:00:09','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 13:00:09','YYYY-MM-DD HH24:MI:SS'),100,'isPOS','Used for Custom POS','Used for Custom POS','U','d43a5a31-b44f-4417-8728-3549286438b3')
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:00:23 PM UTC
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (300053,0,'Used for Custom POS',217,'isPOS','N',1,'N','N','N','N','N',0,'N',20,0,0,'Y',TO_TIMESTAMP('2018-02-20 13:00:23','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 13:00:23','YYYY-MM-DD HH24:MI:SS'),100,300006,'Y','N','U','N','N','N','Y','22b155d3-fb4e-4b48-9b78-1028670c02de','Y',0,'N','N')
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:00:26 PM UTC
|
||||
ALTER TABLE C_DocType ADD COLUMN isPOS CHAR(1) DEFAULT 'N' CHECK (isPOS IN ('Y','N'))
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:08:59 PM UTC
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (300040,'Used for Custom POS',167,300053,'Y',1,340,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 13:08:59','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 13:08:59','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','33d5e6b8-6236-4db7-83d0-d0b06a6e5247','Y',330,2,2)
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=2, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300040
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=140, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201886
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=150, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3075
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=160, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3072
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=170, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3071
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=180, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3073
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=190, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=807
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=200, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=808
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=210, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54233
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=220, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54230
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=230, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54232
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=240, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10345
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=250, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10346
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=260, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10481
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=270, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10480
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=280, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58859
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=290, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10371
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=300, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10528
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=310, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10340
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=320, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200004
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=330, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6567
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=340, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3125
|
||||
;
|
||||
|
||||
-- Feb 20, 2018 1:09:15 PM UTC
|
||||
UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-20 13:09:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204719
|
||||
;
|
||||
|
||||
|
|
@ -0,0 +1,337 @@
|
|||
|
||||
-- Feb 22, 2018 3:32:07 AM UTC
|
||||
INSERT INTO AD_Table (AD_Table_ID,Name,TableName,LoadSeq,AccessLevel,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsSecurityEnabled,IsDeleteable,IsHighVolume,IsView,EntityType,ImportTable,IsChangeLog,ReplicationType,CopyColumnsFromTable,IsCentrallyMaintained,AD_Table_UU,Processing,DatabaseViewDrop,CopyComponentsFromView) VALUES (300006,'Cashier Machine','zpos_Cashier',0,'3',0,0,'Y',TO_TIMESTAMP('2018-02-22 03:32:07','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 03:32:07','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','N','N','U','N','Y','L','N','Y','d2d2f78b-a71b-4d62-91ba-0fbe0a80a59e','N','N','N')
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:32:07 AM UTC
|
||||
INSERT INTO AD_Sequence (Name,CurrentNext,IsAudited,StartNewYear,Description,IsActive,IsTableID,AD_Client_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,AD_Sequence_ID,IsAutoSequence,StartNo,IncrementNo,CurrentNextSys,AD_Sequence_UU) VALUES ('zpos_Cashier',1000000,'N','N','Table zpos_Cashier','Y','Y',0,0,TO_TIMESTAMP('2018-02-22 03:32:07','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 03:32:07','YYYY-MM-DD HH24:MI:SS'),100,302066,'Y',1000000,1,200000,'7c899d05-1bb7-467b-8060-021cd532ba99')
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:32:53 AM UTC
|
||||
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (300025,0,0,'Y',TO_TIMESTAMP('2018-02-22 03:32:52','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 03:32:52','YYYY-MM-DD HH24:MI:SS'),100,'zpos_Cashier_ID','Cashier Machine','Cashier Machine','U','2e73c4ec-87bd-4f5c-bd1c-53cef2c23235')
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:33:03 AM UTC
|
||||
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (300026,0,0,'Y',TO_TIMESTAMP('2018-02-22 03:33:03','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 03:33:03','YYYY-MM-DD HH24:MI:SS'),100,'zpos_Cashier_UU','Cashier Machine UU','Cashier Machine UU','U','2c91846e-b6f8-4122-8163-555398d76273')
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:33:14 AM UTC
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (300147,0,'Cashier Machine',300006,'zpos_Cashier_ID',22,'Y','N','N','N','N',0,'N',13,0,0,'Y',TO_TIMESTAMP('2018-02-22 03:33:14','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 03:33:14','YYYY-MM-DD HH24:MI:SS'),100,300025,'N','N','U','N','N','N','Y','b10915f8-0402-41d7-8aa1-4443663cc272','N',0,'N','N')
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:33:17 AM UTC
|
||||
CREATE TABLE zpos_Cashier (zpos_Cashier_ID NUMERIC(10) DEFAULT NULL , CONSTRAINT zpos_Cashier_Key PRIMARY KEY (zpos_Cashier_ID))
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:33:29 AM UTC
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (300148,0,'Cashier Machine UU',300006,'zpos_Cashier_UU',36,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2018-02-22 03:33:29','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 03:33:29','YYYY-MM-DD HH24:MI:SS'),100,300026,'N','N','U','N','N','N','Y','6d68ea25-63bb-458d-a5eb-25f17b283010','N',0,'N','N')
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:33:30 AM UTC
|
||||
ALTER TABLE zpos_Cashier ADD COLUMN zpos_Cashier_UU VARCHAR(36) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:33:30 AM UTC
|
||||
ALTER TABLE zpos_Cashier ADD CONSTRAINT zpos_Cashier_UU_idx UNIQUE (zpos_Cashier_UU)
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:33:44 AM UTC
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,AD_Val_Rule_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300149,0,'Client','Client/Tenant for this installation.','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.',300006,129,'AD_Client_ID','@#AD_Client_ID@',22,'N','N','N','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2018-02-22 03:33:44','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 03:33:44','YYYY-MM-DD HH24:MI:SS'),100,102,'N','N','U','N','N','N','Y','e9d43c5c-cf9a-42e4-9b99-e2018e3900e8','N',0,'N','N','D')
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:33:46 AM UTC
|
||||
ALTER TABLE zpos_Cashier ADD COLUMN AD_Client_ID NUMERIC(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:33:53 AM UTC
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,AD_Val_Rule_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300150,0,'Organization','Organizational entity within client','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.',300006,104,'AD_Org_ID','@#AD_Org_ID@',22,'N','N','N','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2018-02-22 03:33:53','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 03:33:53','YYYY-MM-DD HH24:MI:SS'),100,113,'N','N','U','N','N','N','Y','23674fec-df12-4594-a9c7-f4dfd4845c5a','N',0,'N','N','D')
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:33:54 AM UTC
|
||||
ALTER TABLE zpos_Cashier ADD COLUMN AD_Org_ID NUMERIC(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:34:01 AM UTC
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (300151,0,'Search Key','Search key for the record in the format required - must be unique','A search key allows you a fast method of finding a particular record.
|
||||
If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_<TableName>", where TableName is the actual name of the table (e.g. C_Order).',300006,'Value',40,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2018-02-22 03:34:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 03:34:01','YYYY-MM-DD HH24:MI:SS'),100,620,'Y','Y','U','N','N','N','Y','c9698891-ffa2-46eb-ad37-74c5a118bb69','Y',0,'N','N')
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:34:02 AM UTC
|
||||
ALTER TABLE zpos_Cashier ADD COLUMN Value VARCHAR(40) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:34:11 AM UTC
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (300152,0,'Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.',300006,'Name',60,'N','N','N','N','Y',0,'N',10,0,0,'Y',TO_TIMESTAMP('2018-02-22 03:34:11','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 03:34:11','YYYY-MM-DD HH24:MI:SS'),100,469,'Y','Y','U','N','N','N','Y','d9176bce-208c-405d-8d7c-cbf21d5b78df','Y',0,'N','N')
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:34:13 AM UTC
|
||||
ALTER TABLE zpos_Cashier ADD COLUMN Name VARCHAR(60) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:34:22 AM UTC
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (300153,0,'Description','Optional short description of the record','A description is limited to 255 characters.',300006,'Description',255,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2018-02-22 03:34:22','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 03:34:22','YYYY-MM-DD HH24:MI:SS'),100,275,'Y','Y','U','N','N','N','Y','5f9c5465-eec6-493c-bc60-8b0818aec655','Y',0,'N','N')
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:34:23 AM UTC
|
||||
ALTER TABLE zpos_Cashier ADD COLUMN Description VARCHAR(255) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:34:56 AM UTC
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (300154,0,'Updated','Date this record was updated','The Updated field indicates the date that this record was updated.',300006,'Updated','SYSDATE',7,'N','N','N','N','N',0,'N',16,0,0,'Y',TO_TIMESTAMP('2018-02-22 03:34:56','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 03:34:56','YYYY-MM-DD HH24:MI:SS'),100,607,'N','N','U','N','N','N','Y','488ad99d-35e0-435d-9fe6-33d090849f22','N',0,'N','N')
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:34:57 AM UTC
|
||||
ALTER TABLE zpos_Cashier ADD COLUMN Updated TIMESTAMP DEFAULT statement_timestamp()
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:35:04 AM UTC
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (300155,0,'Created','Date this record was created','The Created field indicates the date that this record was created.',300006,'Created','SYSDATE',7,'N','N','N','N','N',0,'N',16,0,0,'Y',TO_TIMESTAMP('2018-02-22 03:35:04','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 03:35:04','YYYY-MM-DD HH24:MI:SS'),100,245,'N','N','U','N','N','N','Y','88c790b3-2644-4028-9507-4b27404b3e2d','N',0,'N','N')
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:35:05 AM UTC
|
||||
ALTER TABLE zpos_Cashier ADD COLUMN Created TIMESTAMP DEFAULT statement_timestamp()
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:35:14 AM UTC
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300156,0,'Created By','User who created this records','The Created By field indicates the user who created this record.',300006,'CreatedBy',22,'N','N','N','N','N',0,'N',18,110,0,0,'Y',TO_TIMESTAMP('2018-02-22 03:35:14','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 03:35:14','YYYY-MM-DD HH24:MI:SS'),100,246,'N','N','U','N','N','N','Y','28ec8107-9d5b-4a70-b057-4b81cd49124c','N',0,'N','N','D')
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:35:15 AM UTC
|
||||
ALTER TABLE zpos_Cashier ADD COLUMN CreatedBy NUMERIC(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:35:21 AM UTC
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300157,0,'Updated By','User who updated this records','The Updated By field indicates the user who updated this record.',300006,'UpdatedBy',22,'N','N','N','N','N',0,'N',18,110,0,0,'Y',TO_TIMESTAMP('2018-02-22 03:35:21','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 03:35:21','YYYY-MM-DD HH24:MI:SS'),100,608,'N','N','U','N','N','N','Y','d42c6758-c5c4-4ba5-ad50-ede8905fbb9b','N',0,'N','N','D')
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:35:22 AM UTC
|
||||
ALTER TABLE zpos_Cashier ADD COLUMN UpdatedBy NUMERIC(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:35:30 AM UTC
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (300158,0,'Active','The record is active in the system','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
|
||||
There are two reasons for de-activating and not deleting records:
|
||||
(1) The system requires the record for audit purposes.
|
||||
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.',300006,'IsActive','Y',1,'N','N','N','N','N',0,'N',20,0,0,'Y',TO_TIMESTAMP('2018-02-22 03:35:30','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 03:35:30','YYYY-MM-DD HH24:MI:SS'),100,348,'Y','N','U','N','N','N','Y','072f3869-cfc9-49e8-8ccd-979a5a7f35f2','N',0,'N','N')
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:35:32 AM UTC
|
||||
ALTER TABLE zpos_Cashier ADD COLUMN IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N'))
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:36:03 AM UTC
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300159,0,'Cashier Machine',259,'zpos_Cashier_ID',22,'N','N','N','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2018-02-22 03:36:03','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 03:36:03','YYYY-MM-DD HH24:MI:SS'),100,300025,'N','N','U','N','N','N','Y','3de45028-3516-4f14-88f2-23ba4a7eb86c','Y',0,'N','N','N')
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:36:08 AM UTC
|
||||
UPDATE AD_Column SET FKConstraintName='zposCashier_COrder', FKConstraintType='N',Updated=TO_TIMESTAMP('2018-02-22 03:36:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=300159
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:36:08 AM UTC
|
||||
ALTER TABLE C_Order ADD COLUMN zpos_Cashier_ID NUMERIC(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:36:08 AM UTC
|
||||
ALTER TABLE C_Order ADD CONSTRAINT zposCashier_COrder FOREIGN KEY (zpos_Cashier_ID) REFERENCES zpos_cashier(zpos_cashier_id) DEFERRABLE INITIALLY DEFERRED
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:36:42 AM UTC
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,SortNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (300116,'Cashier Machine',294,300159,'Y',0,490,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-22 03:36:42','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 03:36:42','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','d74468fb-ed45-4836-81ed-129567c5734e','Y',490,1,2,1,'N','N','N')
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:03 AM UTC
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,SortNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (300117,'Cashier Machine',186,300159,'Y',0,580,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-22 03:37:03','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-22 03:37:03','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','8025dfa5-daf1-4639-9647-0d1a873817a8','Y',580,1,1,1,'N','N','N')
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:29 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=280, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300116
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:29 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=290, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3438
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:29 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=300, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3467
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:29 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=310, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3456
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:29 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=320, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3454
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:29 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=330, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3466
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:29 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=340, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3439
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:29 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=350, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3459
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:29 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=360, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3457
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:30 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=370, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3446
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:30 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=380, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7039
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:30 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=390, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7824
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:30 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=400, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7823
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:30 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=410, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3425
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:30 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=420, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3427
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:30 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=430, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3449
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:30 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=440, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3450
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:30 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=450, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=60923
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:30 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=460, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6506
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:30 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=470, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3426
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:30 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=480, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=60973
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:30 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=490, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3671
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:30 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204760
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=340, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=300117
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=350, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1098
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=360, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3272
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=370, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2112
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=380, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2109
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=390, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3113
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=400, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1099
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=410, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56906
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=420, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2593
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=430, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2589
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=440, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1324
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=450, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7038
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=460, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7826
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=470, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7825
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=480, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1112
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=490, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1113
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=500, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1082
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=510, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1084
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=520, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=60922
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=530, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6560
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=540, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1083
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=550, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58037
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=560, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3660
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=570, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=60972
|
||||
;
|
||||
|
||||
-- Feb 22, 2018 3:37:44 AM UTC
|
||||
UPDATE AD_Field SET SeqNo=580, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-02-22 03:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200756
|
||||
;
|
||||
|
||||
Loading…
Reference in New Issue