From 0b4b07daa812984d155c83ec0f68c911c2e97fbe Mon Sep 17 00:00:00 2001 From: hodianto Date: Tue, 20 Feb 2018 19:20:45 +0700 Subject: [PATCH] Start Factory & Migration Script --- .DS_Store | Bin 0 -> 6148 bytes andromeida.midsuit.project/.project | 5 + .../META-INF/MANIFEST.MF | 11 +- .../OSGI-INF/MID_CalloutFactory.xml | 8 + .../OSGI-INF/MID_CreateFromFactory.xml | 8 + .../OSGI-INF/MID_DocFactory.xml | 9 + .../OSGI-INF/MID_FormFactory.xml | 8 + .../OSGI-INF/MID_ModelFactory.xml | 8 + .../OSGI-INF/MID_ProcessFactory.xml | 8 + .../OSGI-INF/MID_ValidatorFactory.xml | 6 + andromeida.midsuit.project/build.properties | 11 +- .../midsuit/factory/MID_CalloutFactory.java | 5 + .../factory/MID_CreateFromFactory.java | 18 + .../midsuit/factory/MID_DocFactory.java | 5 + .../midsuit/factory/MID_FormFactory.java | 5 + .../midsuit/factory/MID_ModelFactory.java | 73 +++ .../midsuit/factory/MID_ProcessFactory.java | 21 + .../midsuit/factory/MID_ValidatorFactory.java | 34 ++ .../midsuit/form/MID_CreateFromOrder.java | 398 ++++++++++++ .../midsuit/form/MID_WCreateFromOrder.java | 379 ++++++++++++ .../SalesOrderRequisition.sql | 575 ++++++++++++++++++ 21 files changed, 1592 insertions(+), 3 deletions(-) create mode 100644 .DS_Store create mode 100644 andromeida.midsuit.project/OSGI-INF/MID_CalloutFactory.xml create mode 100644 andromeida.midsuit.project/OSGI-INF/MID_CreateFromFactory.xml create mode 100644 andromeida.midsuit.project/OSGI-INF/MID_DocFactory.xml create mode 100644 andromeida.midsuit.project/OSGI-INF/MID_FormFactory.xml create mode 100644 andromeida.midsuit.project/OSGI-INF/MID_ModelFactory.xml create mode 100644 andromeida.midsuit.project/OSGI-INF/MID_ProcessFactory.xml create mode 100644 andromeida.midsuit.project/OSGI-INF/MID_ValidatorFactory.xml create mode 100644 andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_CalloutFactory.java create mode 100644 andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_CreateFromFactory.java create mode 100644 andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_DocFactory.java create mode 100644 andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_FormFactory.java create mode 100644 andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_ModelFactory.java create mode 100644 andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_ProcessFactory.java create mode 100644 andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_ValidatorFactory.java create mode 100644 andromeida.midsuit.project/src/andromedia/midsuit/form/MID_CreateFromOrder.java create mode 100644 andromeida.midsuit.project/src/andromedia/midsuit/form/MID_WCreateFromOrder.java create mode 100644 midsuitMigrationScript/SalesOrderRequisition.sql diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..982aaee2dbb8e46fb967a4891315411e68c247b8 GIT binary patch literal 6148 zcmeHKO=}ZD7=EXTx`~K66k9wkg5aTq1VdYp!V=@52SHfTgG#y|Az9t*EXk&+jgegZ z2_Ezx^ypvkCf*f)jXv`c$tHRT6%m;iW}bIu-shc}2XqkvK1UsphUy9KIJkGh9(?)$xikz3!T$xW106h+jf zgg6bTlV`B4CB}8~5E&wpQ=d9uhUlrn7v7LYzzpqFMm$GEKv_N~oh{|O0j6L_h#r9H zN<5Zz6)Vf=1v17MPmuov{t4~VF11k_Xq{pt&CkK!EX{FkX@&Q}>0&ky*(2;F!K?w= z$h5NF&&YMQpxRow{P8f=C+H_XjiX^!t9@k~h2n*amn^Gnm9LbaxjjC1GcOwro8I7w zXg%<x-v0vY@8;!EzY)^*d}B#&7{hyQ*;x@8PT^ zLfoyp0q>{t1nctqywwUvSwQsV!^gMZ4%X*~=i;Zm^R55b9V9VNx>)yI(*-I1q^r|g z;tVim6fg=H1r`+$=Yx$R(9t+kD31A`FnPRvngYNLQrAg@3{H7nx&zxVt1f1YGo zMggP1f29B`w%k?|The#y%I3sfYoi>Y2orHLg_43wU&qoBSMfHAG>qB80XiCI3ef{I PKLSz)QyB&RsscX%CBW^f literal 0 HcmV?d00001 diff --git a/andromeida.midsuit.project/.project b/andromeida.midsuit.project/.project index ddc4f2f..15a03a4 100644 --- a/andromeida.midsuit.project/.project +++ b/andromeida.midsuit.project/.project @@ -20,6 +20,11 @@ + + org.eclipse.pde.ds.core.builder + + + org.eclipse.pde.PluginNature diff --git a/andromeida.midsuit.project/META-INF/MANIFEST.MF b/andromeida.midsuit.project/META-INF/MANIFEST.MF index 04e4c81..e84043e 100644 --- a/andromeida.midsuit.project/META-INF/MANIFEST.MF +++ b/andromeida.midsuit.project/META-INF/MANIFEST.MF @@ -6,5 +6,14 @@ Bundle-Version: 1.0.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Require-Bundle: org.adempiere.base;bundle-version="5.1.0", org.adempiere.plugin.utils;bundle-version="5.1.0", - org.eclipse.osgi.services;bundle-version="3.6.0" + org.eclipse.osgi.services;bundle-version="3.6.0", + zk;bundle-version="8.0.2", + zcommon;bundle-version="8.0.2", + zul;bundle-version="8.0.2", + org.adempiere.ui.zk 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 +Import-Package: org.compiere.apps, + org.compiere.grid, + org.compiere.minigrid diff --git a/andromeida.midsuit.project/OSGI-INF/MID_CalloutFactory.xml b/andromeida.midsuit.project/OSGI-INF/MID_CalloutFactory.xml new file mode 100644 index 0000000..0cc2620 --- /dev/null +++ b/andromeida.midsuit.project/OSGI-INF/MID_CalloutFactory.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/andromeida.midsuit.project/OSGI-INF/MID_CreateFromFactory.xml b/andromeida.midsuit.project/OSGI-INF/MID_CreateFromFactory.xml new file mode 100644 index 0000000..49e6ce6 --- /dev/null +++ b/andromeida.midsuit.project/OSGI-INF/MID_CreateFromFactory.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/andromeida.midsuit.project/OSGI-INF/MID_DocFactory.xml b/andromeida.midsuit.project/OSGI-INF/MID_DocFactory.xml new file mode 100644 index 0000000..4fb36c6 --- /dev/null +++ b/andromeida.midsuit.project/OSGI-INF/MID_DocFactory.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/andromeida.midsuit.project/OSGI-INF/MID_FormFactory.xml b/andromeida.midsuit.project/OSGI-INF/MID_FormFactory.xml new file mode 100644 index 0000000..de2ee1e --- /dev/null +++ b/andromeida.midsuit.project/OSGI-INF/MID_FormFactory.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/andromeida.midsuit.project/OSGI-INF/MID_ModelFactory.xml b/andromeida.midsuit.project/OSGI-INF/MID_ModelFactory.xml new file mode 100644 index 0000000..e3005bf --- /dev/null +++ b/andromeida.midsuit.project/OSGI-INF/MID_ModelFactory.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/andromeida.midsuit.project/OSGI-INF/MID_ProcessFactory.xml b/andromeida.midsuit.project/OSGI-INF/MID_ProcessFactory.xml new file mode 100644 index 0000000..c51362d --- /dev/null +++ b/andromeida.midsuit.project/OSGI-INF/MID_ProcessFactory.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/andromeida.midsuit.project/OSGI-INF/MID_ValidatorFactory.xml b/andromeida.midsuit.project/OSGI-INF/MID_ValidatorFactory.xml new file mode 100644 index 0000000..65e0235 --- /dev/null +++ b/andromeida.midsuit.project/OSGI-INF/MID_ValidatorFactory.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/andromeida.midsuit.project/build.properties b/andromeida.midsuit.project/build.properties index 34d2e4d..43bce03 100644 --- a/andromeida.midsuit.project/build.properties +++ b/andromeida.midsuit.project/build.properties @@ -1,4 +1,11 @@ -source.. = src/ output.. = bin/ bin.includes = META-INF/,\ - . + .,\ + 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 +source.. = src/ diff --git a/andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_CalloutFactory.java b/andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_CalloutFactory.java new file mode 100644 index 0000000..fe512cf --- /dev/null +++ b/andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_CalloutFactory.java @@ -0,0 +1,5 @@ +package andromedia.midsuit.factory; + +public class MID_CalloutFactory { + +} diff --git a/andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_CreateFromFactory.java b/andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_CreateFromFactory.java new file mode 100644 index 0000000..3029f22 --- /dev/null +++ b/andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_CreateFromFactory.java @@ -0,0 +1,18 @@ +package andromedia.midsuit.factory; + +import org.compiere.grid.ICreateFrom; +import org.compiere.grid.ICreateFromFactory; +import org.compiere.model.GridTab; +import org.compiere.model.X_C_Order; + +import andromedia.midsuit.form.MID_CreateFromOrder; + +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 null; + } +} diff --git a/andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_DocFactory.java b/andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_DocFactory.java new file mode 100644 index 0000000..9df4a7a --- /dev/null +++ b/andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_DocFactory.java @@ -0,0 +1,5 @@ +package andromedia.midsuit.factory; + +public class MID_DocFactory { + +} diff --git a/andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_FormFactory.java b/andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_FormFactory.java new file mode 100644 index 0000000..b912b14 --- /dev/null +++ b/andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_FormFactory.java @@ -0,0 +1,5 @@ +package andromedia.midsuit.factory; + +public class MID_FormFactory { + +} diff --git a/andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_ModelFactory.java b/andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_ModelFactory.java new file mode 100644 index 0000000..d9cf5bc --- /dev/null +++ b/andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_ModelFactory.java @@ -0,0 +1,73 @@ +package andromedia.midsuit.factory; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.util.HashMap; +import java.util.Properties; + +import org.adempiere.base.IModelFactory; +import org.compiere.model.PO; +import org.compiere.util.Env; + +public class MID_ModelFactory implements IModelFactory{ + private static HashMap mapTableModels = new HashMap(); + static { + //Ex mapTableModels.put(MOrderLine.Table_Name, "org.semeru.project.model.SMT_MOrderLine"); + } + + @Override + public Class getClass(String tableName) { + if (mapTableModels.containsKey(tableName)) { + Class act = null; + try { + act = Class.forName(mapTableModels.get(tableName)); + + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } + return act; + } else { + return null; + } + + } + + @Override + public PO getPO(String tableName, int Record_ID, String trxName) { + if (mapTableModels.containsKey(tableName)) { + Class clazz = null; + Constructor ctor = null; + PO object = null; + try { + clazz = Class.forName(mapTableModels.get(tableName)); + ctor = clazz.getConstructor(Properties.class, int.class, String.class); + object = (PO) ctor.newInstance(new Object[] { Env.getCtx(), Record_ID, trxName }); + + } catch (Exception e) { + e.printStackTrace(); + } + return object; + } else + return null; + } + + @Override + public PO getPO(String tableName, ResultSet rs, String trxName) { + if (mapTableModels.containsKey(tableName)) { + Class clazz = null; + Constructor ctor = null; + PO object = null; + try { + clazz = Class.forName(mapTableModels.get(tableName)); + ctor = clazz.getConstructor(Properties.class, ResultSet.class, String.class); + object = (PO) ctor.newInstance(new Object[] { Env.getCtx(), rs, trxName }); + + } catch (Exception e) { + e.printStackTrace(); + } + return object; + } else + return null; + } + +} diff --git a/andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_ProcessFactory.java b/andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_ProcessFactory.java new file mode 100644 index 0000000..e4ae2cb --- /dev/null +++ b/andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_ProcessFactory.java @@ -0,0 +1,21 @@ +package andromedia.midsuit.factory; + +import org.adempiere.base.IProcessFactory; +import org.compiere.process.ProcessCall; + +public class MID_ProcessFactory implements IProcessFactory { + + @Override + public ProcessCall newProcessInstance(String className) { + // TODO Auto-generated method stub + ProcessCall proses = null; + try { + Class clazz = getClass().getClassLoader().loadClass(className); + proses = (ProcessCall) clazz.newInstance(); + } catch (Exception e) { + return null; + } + return proses; + } + +} diff --git a/andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_ValidatorFactory.java b/andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_ValidatorFactory.java new file mode 100644 index 0000000..90f7d83 --- /dev/null +++ b/andromeida.midsuit.project/src/andromedia/midsuit/factory/MID_ValidatorFactory.java @@ -0,0 +1,34 @@ +package andromedia.midsuit.factory; + +import org.adempiere.base.event.AbstractEventHandler; +import org.adempiere.exceptions.AdempiereException; +import org.compiere.model.PO; +import org.compiere.util.CLogger; +import org.osgi.service.event.Event; + +public class MID_ValidatorFactory extends AbstractEventHandler { + public CLogger log = CLogger.getCLogger(MID_ValidatorFactory.class); + + @Override + + protected void doHandleEvent(Event event) { + String msg = ""; + +// if (getPO(event).get_TableName().equals(MOrderLandedCostAllocation.Table_Name)) +// msg = SMT_LandedCostAllocationValidator.executeEvent(event, getPO(event)); + logEvent(event, getPO(event), msg); + } + + private void logEvent(Event event, PO po, String msg) { + log.fine("EVENT MANAGER // " + event.getTopic() + " po =" + po + " MESSAGE=" + msg); + if (msg.length() > 0) + throw new AdempiereException(msg); + } + + @Override + protected void initialize() { + + // registerTableEvent(IEventTopics.DOC_BEFORE_COMPLETE, Table_Name); + } + +} diff --git a/andromeida.midsuit.project/src/andromedia/midsuit/form/MID_CreateFromOrder.java b/andromeida.midsuit.project/src/andromedia/midsuit/form/MID_CreateFromOrder.java new file mode 100644 index 0000000..ba29923 --- /dev/null +++ b/andromeida.midsuit.project/src/andromedia/midsuit/form/MID_CreateFromOrder.java @@ -0,0 +1,398 @@ +package andromedia.midsuit.form; + +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.Vector; +import java.util.logging.Level; + +import org.adempiere.exceptions.AdempiereException; +import org.compiere.apps.IStatusBar; +import org.compiere.grid.CreateFrom; +import org.compiere.minigrid.IMiniTable; +import org.compiere.model.GridTab; +import org.compiere.model.MInvoiceLine; +import org.compiere.model.MOrder; +import org.compiere.model.MOrderLine; +import org.compiere.model.MPriceList; +import org.compiere.model.MProductPricing; +import org.compiere.model.MRequisition; +import org.compiere.model.MRequisitionLine; +import org.compiere.model.MTax; +import org.compiere.model.MUOMConversion; +import org.compiere.model.Query; +import org.compiere.model.X_C_OrderLine; +import org.compiere.process.DocAction; +import org.compiere.util.DB; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; +import org.compiere.util.Msg; + +public class MID_CreateFromOrder extends CreateFrom { + /* + * create by yonk + * + */ + + public String desc = ""; + + public MID_CreateFromOrder(GridTab mTab) { + super(mTab); + if (log.isLoggable(Level.INFO)) log.info(mTab.toString()); + } + + @Override + public Object getWindow() { + return null; + } + + protected Vector getOISColumnNames() + { + // Header Info + Vector columnNames = new Vector(7); + columnNames.add(Msg.getMsg(Env.getCtx(), "Select")); + columnNames.add("Line"); + columnNames.add(Msg.translate(Env.getCtx(), "M_Product_ID")); + columnNames.add(Msg.translate(Env.getCtx(), "C_Charge_ID")); + columnNames.add(Msg.translate(Env.getCtx(), "Quantity")); + columnNames.add(Msg.translate(Env.getCtx(), "DateRequired")); + columnNames.add(Msg.translate(Env.getCtx(), "C_UOM_ID")); +// columnNames.add(Msg.translate(Env.getCtx(), "SisaPO")); + return columnNames; + } + + @Override + public boolean dynInit() throws Exception { + log.config(""); + setTitle(Msg.getElement(Env.getCtx(), "C_Order_ID", false) + " .. " + Msg.translate(Env.getCtx(), "CreateFrom")); + return true; + } + + @Override + public void info(IMiniTable miniTable, IStatusBar statusBar) { + + } + + protected Vector> getRequisitionData(int M_Requisition_ID, int M_Product_ID, Timestamp dateRequired, int C_Charge_ID, int salesRepID) + { + //int C_Order_ID = Env.getContextAsInt(Env.getCtx(), getGridTab().getWindowNo(), "C_Order_ID"); + Vector> data = new Vector>(); + int C_Order_ID = Env.getContextAsInt(Env.getCtx(), getGridTab().getWindowNo(), "C_Order_ID"); + MOrder order = new MOrder(Env.getCtx(), C_Order_ID, null); + + /** + * 1 M_RequisitionLine_ID + * 2 Line + * 3 Product Name + * 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 (M_Requisition_ID > 0) { + sqlStmt.append("AND rl.M_Requisition_ID=? "); + MRequisition req = new MRequisition(Env.getCtx(), M_Requisition_ID, null); + desc = req.getDescription(); + } + + if (M_Product_ID > 0) { + sqlStmt.append("AND rl.M_Product_ID=? "); + } + + if (dateRequired != null) { + sqlStmt.append("AND mr.DateRequired=? "); + } + + if (C_Charge_ID > 0) { + sqlStmt.append("AND rl.C_Charge_ID=? "); + } + + sqlStmt.append(" ORDER BY rl.line"); + + try + { + int count = 1; + PreparedStatement pstmt = DB.prepareStatement(sqlStmt.toString(), null); + pstmt.setInt(count, Env.getAD_Client_ID(Env.getCtx())); count++; + pstmt.setString(count, DocAction.STATUS_Completed); + + if (M_Requisition_ID > 0) { + count++; + pstmt.setInt(count, M_Requisition_ID); + } + + if (M_Product_ID > 0) { + count++; + pstmt.setInt(count, M_Product_ID); + } + + if (dateRequired != null) { + count++; + pstmt.setTimestamp(count, dateRequired); + } + + if (C_Charge_ID > 0) { + count++; + pstmt.setInt(count, C_Charge_ID); + } + + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + { + if(rs.getBigDecimal(8).signum()<=0) + continue; + + Vector line = new Vector(7); + line.add(new Boolean(false)); // 0-Selection + + KeyNamePair lineKNPair = new KeyNamePair(rs.getInt(1), rs.getString(2)); // 1-Line + line.add(lineKNPair); + line.add(rs.getString(3)); //2-Product + line.add(rs.getString(7)); //3-Charge + BigDecimal qty = rs.getBigDecimal(4); + line.add((BigDecimal)rs.getBigDecimal(8)); // 4 - Qty + Timestamp p_dateRequired = rs.getTimestamp(5); + line.add(p_dateRequired); //5 - DateRequired + line.add(rs.getString(6)); // 7 - UOM +// line.add((BigDecimal)rs.getBigDecimal(8)); //9 - SisaPO + data.add(line); + } + rs.close(); + pstmt.close(); + } + catch (SQLException e) + { + log.log(Level.SEVERE, sqlStmt.toString(), e); + } + + return data; + } + + protected ArrayList loadRequisitionData (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 list = new ArrayList(); + 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.M_Requisition_ID,").append(display) + .append(" FROM M_Requisition r ") + .append(" LEFT JOIN M_RequisitionLine rl ON (rl.M_Requisition_ID=r.M_Requisition_ID)") + .append(" LEFT JOIN (SELECT M_RequisitionLine_ID, SUM(QtyOrdered) as QtyOrdered FROM C_OrderLine") + .append(" GROUP BY M_RequisitionLine_ID) ol ON (ol.M_RequisitionLine_ID=rl.M_RequisitionLine_ID)") + .append(" WHERE EXISTS (SELECT 1 FROM M_RequisitionLine l WHERE r.M_Requisition_ID=l.M_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.M_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 void configureMiniTable (IMiniTable miniTable) + { + miniTable.setColumnClass(0, Boolean.class, false); // 0-Selection + miniTable.setColumnClass(1, String.class, true); // 1-Line + miniTable.setColumnClass(2, String.class, true); // 2-Product + miniTable.setColumnClass(3, String.class, true); // 3-Charge + miniTable.setColumnClass(4, BigDecimal.class, false); // 4-Qty + miniTable.setColumnClass(5, Timestamp.class, true); // 5-DateRequired + miniTable.setColumnClass(6, String.class, true); // 7-UOM + //miniTable.setColumnClass(8, BigDecimal.class, true); // 8-QtyRequired +// miniTable.setColumnClass(8, BigDecimal.class, false); // 9-SisaPO + + + // Table UI + miniTable.autoSize(); + } + + @Override + public boolean save(IMiniTable miniTable, String trxName) { + log.config(""); + String desc = ""; + int C_Order_ID = Env.getContextAsInt(Env.getCtx(), getGridTab().getWindowNo(), "C_Order_ID"); + MOrder order = new MOrder(Env.getCtx(), C_Order_ID, null); + + + //Add by @solrizal Line Number + for (int i = 0; i < miniTable.getRowCount(); i++) + { + if (((Boolean)miniTable.getValueAt(i, 0)).booleanValue()) + { + MOrderLine orderLine = new MOrderLine(order); + BigDecimal qty = (BigDecimal)miniTable.getValueAt(i, 4); // 4 - Qty +// BigDecimal sisapo = (BigDecimal)miniTable.getValueAt(i, 7); // 9 - SisaPO + BigDecimal qtyOrdered = qty; +// BigDecimal qtyOrdered = sisapo; + KeyNamePair pp = (KeyNamePair)miniTable.getValueAt(i, 1); // 1-Line + + int requisitionLineID = pp.getKey(); + MRequisitionLine reqLine = new MRequisitionLine(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()); + + + 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("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.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(); + 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")); + } + } + order.setDescription(order.getDescription()==null? desc : order.getDescription()+";"+desc); + order.saveEx(); + return true; + } + +} diff --git a/andromeida.midsuit.project/src/andromedia/midsuit/form/MID_WCreateFromOrder.java b/andromeida.midsuit.project/src/andromedia/midsuit/form/MID_WCreateFromOrder.java new file mode 100644 index 0000000..8223e6a --- /dev/null +++ b/andromeida.midsuit.project/src/andromedia/midsuit/form/MID_WCreateFromOrder.java @@ -0,0 +1,379 @@ +package andromedia.midsuit.form; + +import static org.compiere.model.SystemIDs.COLUMN_C_INVOICELINE_M_PRODUCT_ID; + +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Vector; +import java.util.logging.Level; + +import org.adempiere.webui.apps.AEnv; +import org.adempiere.webui.apps.form.WCreateFromWindow; +import org.adempiere.webui.component.Grid; +import org.adempiere.webui.component.GridFactory; +import org.adempiere.webui.component.Label; +import org.adempiere.webui.component.ListItem; +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.WDateEditor; +import org.adempiere.webui.editor.WEditor; +import org.adempiere.webui.editor.WSearchEditor; +import org.adempiere.webui.event.ValueChangeEvent; +import org.adempiere.webui.event.ValueChangeListener; +import org.compiere.model.GridTab; +import org.compiere.model.MLookup; +import org.compiere.model.MLookupFactory; +import org.compiere.model.MOrder; +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.zul.Borderlayout; +import org.zkoss.zul.Center; + +public class MID_WCreateFromOrder extends MID_CreateFromOrder implements EventListener, ValueChangeListener +{ + /** Window No */ + private int p_WindowNo; + private WCreateFromWindow window; + + /** Logger */ + private CLogger log = CLogger.getCLogger(getClass()); + + protected Label requisitionLabel = new Label(); + protected Listbox requisitionField = ListboxFactory.newDropdownListbox(); + protected Label productLabel = new Label(); + protected WEditor productField; + protected Label dateRequiredLabel = new Label(); + protected WEditor dateRequiredField; + + public MID_WCreateFromOrder(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); + } + AEnv.showWindow(window); + } + + public boolean dynInit() throws Exception + { + log.config(""); + + super.dynInit(); + + window.setTitle("Create PO From Requisition"); + + initBPartner(); + + return true; + } // dynInit + + protected void zkInit() throws Exception + { + int C_Order_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_Order_ID"); + MOrder order = new MOrder(Env.getCtx(),C_Order_ID,null); + + requisitionLabel.setText(Msg.getElement(Env.getCtx(), "M_Requisition_ID", false)); + productLabel.setText(Msg.getElement(Env.getCtx(), "M_Product_ID", false)); + /* @win temporary commented + chargeLabel.setText(Msg.getElement(Env.getCtx(), "C_Charge_ID", false)); + projectLabel.setText(Msg.getElement(Env.getCtx(), "C_Project_ID", false)); + */ + dateRequiredLabel.setText(Msg.getElement(Env.getCtx(), "DateRequired", false)); + + Borderlayout parameterLayout = new Borderlayout(); + parameterLayout.setHeight("110px"); + parameterLayout.setWidth("100%"); + Panel parameterPanel = window.getParameterPanel(); + parameterPanel.appendChild(parameterLayout); + + Grid parameterStdLayout = GridFactory.newGridLayout(); + Panel parameterStdPanel = new Panel(); + parameterStdPanel.appendChild(parameterStdLayout); + + Center center = new Center(); + parameterLayout.appendChild(center); + center.appendChild(parameterStdPanel); + + Rows rows = (Rows) parameterStdLayout.newRows(); + + Row row = rows.newRow(); + + row.appendChild(dateRequiredLabel.rightAlign()); + if (dateRequiredField != null) + row.appendChild(dateRequiredField.getComponent()); + + row.appendChild(requisitionLabel.rightAlign()); + requisitionField.setHflex("1"); + row.appendChild(requisitionField); + + if (order.isSOTrx()) { + requisitionLabel.setVisible(false); + requisitionField.setVisible(false); + } + + row = rows.newRow(); + + row.appendChild(productLabel.rightAlign()); + if (productField != null) + row.appendChild(productField.getComponent()); + + } + + 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; + ListItem li = null; + + int C_Order_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_Order_ID"); + if (C_Order_ID<=0) { + return; + } + + MOrder order = new MOrder(Env.getCtx(),C_Order_ID,null); + if (order.isSOTrx()) + return; + + Timestamp dateRequired = null; + int M_Requisition_ID = 0; + int M_Product_ID = 0; + int C_Charge_ID = 0; + int C_Project_ID = 0; + int salesRepID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "SalesRep_ID"); + + // Requisition + if (e.getTarget().equals(dateRequiredField)) { + dateRequired = (Timestamp) dateRequiredField.getValue(); + } else if (e.getTarget().equals(requisitionField)) { + li = requisitionField.getSelectedItem(); + if (li != null && li.getValue() != null) + M_Requisition_ID = ((Integer) li.getValue()).intValue(); + } else if (e.getTarget().equals(productField)) { + if (productField.getValue()!=null) + M_Product_ID = (Integer) productField.getValue(); + } + + loadRequisition(M_Requisition_ID, M_Product_ID, dateRequired, C_Charge_ID, salesRepID); + + m_actionActive = false; + } + + /** + * 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 + int M_Requisition_ID = 0; + Timestamp dateRequired = null; + int M_Product_ID = 0; + int C_Charge_ID = 0; + // int C_Project_ID = 0; + + int salesRepID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "SalesRep_ID"); + + if (e.getPropertyName().equals("M_Requisition_ID")) + { + if (e.getNewValue() != null) + M_Requisition_ID = ((Integer)e.getNewValue()).intValue(); + + if (productField.getValue() != null) + M_Product_ID = (Integer) productField.getValue(); + + dateRequired = (Timestamp) dateRequiredField.getValue(); + + loadRequisition(M_Requisition_ID, M_Product_ID, dateRequired, C_Charge_ID, salesRepID); + + } + + else if (e.getPropertyName().equals("M_Product_ID")) + { + ListItem li = requisitionField.getSelectedItem(); + if (li != null && li.getValue() != null) + M_Requisition_ID = ((Integer) li.getValue()).intValue(); + + if (e.getNewValue() != null) + M_Product_ID = ((Integer)e.getNewValue()).intValue(); + + dateRequired = (Timestamp) dateRequiredField.getValue(); + + loadRequisition(M_Requisition_ID, M_Product_ID, dateRequired, C_Charge_ID, salesRepID); + } + + else if (e.getPropertyName().equals("DateRequired")) + { + ListItem li = requisitionField.getSelectedItem(); + if (li != null && li.getValue() != null) + M_Requisition_ID = ((Integer) li.getValue()).intValue(); + + if (productField.getValue() != null) + M_Product_ID = (Integer) productField.getValue(); + + dateRequired = ((Timestamp)e.getNewValue()); + + loadRequisition(M_Requisition_ID, M_Product_ID, dateRequired, C_Charge_ID, salesRepID); + } + + else if (e.getPropertyName().equals("C_Charge_ID")) + { + ListItem li = requisitionField.getSelectedItem(); + if (li != null && li.getValue() != null) + M_Requisition_ID = ((Integer) li.getValue()).intValue(); + + if (productField.getValue() != null) + M_Product_ID = (Integer) productField.getValue(); + + dateRequired = (Timestamp) dateRequiredField.getValue(); + + // if (projectField.getValue() != null) + // C_Project_ID = (Integer) projectField.getValue(); + + if (e.getNewValue() != null) + C_Charge_ID = ((Integer)e.getNewValue()).intValue(); + + loadRequisition(M_Requisition_ID, M_Product_ID, dateRequired, C_Charge_ID, salesRepID); + } + + 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() throws Exception + { + + // load Product + int AD_Column_ID = COLUMN_C_INVOICELINE_M_PRODUCT_ID; + MLookup lookupProduct = MLookupFactory.get (Env.getCtx(), p_WindowNo, 0, AD_Column_ID, DisplayType.Search); + productField = new WSearchEditor ("M_Product_ID", true, false, true, lookupProduct); + // + dateRequiredField = new WDateEditor("DateRequired", false, false, true, "DateRequired"); + + int C_BPartner_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_BPartner_ID"); + //projectField = new WSearchEditor ("C_Project_ID", false, true, false, lookupProject); + // + + int C_Project_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_Project_ID"); + //projectField.setValue(new Integer(C_Project_ID)); + + //chargeField = new WSearchEditor ("C_Charge_ID", true, false, true, lookupCharge); + + int salesRepID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "SalesRep_ID"); + int M_Warehouse_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "M_Warehouse_ID"); + // initial loading + initBPRequisitionDetails(C_BPartner_ID, C_Project_ID, salesRepID, M_Warehouse_ID); + } // initBPartner + + /** + * Load PBartner dependent Order/Invoice/Shipment Field. + * @param C_BPartner_ID BPartner + * @param forInvoice for invoice + */ + protected void initBPRequisitionDetails (int C_BPartner_ID, int C_Project_ID, int salesRepID, int M_Warehouse_ID) + { + if (log.isLoggable(Level.CONFIG)) log.config("C_BPartner_ID=" + C_BPartner_ID); + + KeyNamePair pp = new KeyNamePair(0,""); + requisitionField.removeActionListener(this); + requisitionField.removeAllItems(); + requisitionField.addItem(pp); + + int C_Order_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_Order_ID"); + MOrder order = new MOrder(Env.getCtx(),C_Order_ID,null); + + if (!order.isSOTrx()){ + ArrayList list = loadRequisitionData(C_BPartner_ID, M_Warehouse_ID); + for(KeyNamePair knp : list) + requisitionField.addItem(knp); + } + + requisitionField.setSelectedIndex(0); + requisitionField.addActionListener(this); + productField.addValueChangeListener(this); + dateRequiredField.addValueChangeListener(this); + //projectField.addValueChangeListener(this); + //chargeField.addValueChangeListener(this); + + + } // initBPartnerOIS + + /** + * Load Data - Requisition + * @param M_Requisition_ID Requisition + */ + 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)); + } // Load Requisition + + /** + * 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; + } + +} diff --git a/midsuitMigrationScript/SalesOrderRequisition.sql b/midsuitMigrationScript/SalesOrderRequisition.sql new file mode 100644 index 0000000..085570f --- /dev/null +++ b/midsuitMigrationScript/SalesOrderRequisition.sql @@ -0,0 +1,575 @@ +-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator +-- Feb 20, 2018 12:04:20 PM 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 (300000,'Midsuit Requisition for Sales Order','MID_Requisition',0,'4',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:04:20','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:04:20','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','N','N','U','N','Y','L','N','Y','e33c6595-693f-4cd1-ab90-c8e11ed9c00c','N','N','N') +; + +-- Feb 20, 2018 12:04:20 PM 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 ('MID_Requisition',1000000,'N','N','Table MID_Requisition','Y','Y',0,0,TO_TIMESTAMP('2018-02-20 12:04:20','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:04:20','YYYY-MM-DD HH24:MI:SS'),100,300000,'Y',1000000,1,200000,'a2305f0c-1157-4f48-a282-75a684ed3a4b') +; + +-- Feb 20, 2018 12:04:33 PM UTC +UPDATE AD_Table SET AccessLevel='3',Updated=TO_TIMESTAMP('2018-02-20 12:04:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=300000 +; + +-- Feb 20, 2018 12:06:13 PM 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,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300000,1,'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.',300000,129,'AD_Client_ID','@#AD_Client_ID@',22,'N','N','Y','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,102,'N','N','U','N','N','N','Y','a9488777-a345-4f82-abd1-e393ee09eb78','N','N','N','D') +; + +-- Feb 20, 2018 12:06:13 PM 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,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300001,1,'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.',300000,104,'AD_Org_ID','@#AD_Org_ID@',22,'N','N','Y','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,113,'N','N','U','N','N','N','Y','140ce453-0dd5-45f7-9a68-c0936664f28b','N','N','N','D') +; + +-- Feb 20, 2018 12:06:13 PM UTC +INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,AD_Val_Rule_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,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300002,1,'User/Contact','User within the system - Internal or Business Partner Contact','The User identifies a unique user in the system. This could be an internal user or a business partner contact',300000,164,'AD_User_ID',22,'N','N','Y','N','Y',2,'N',19,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,138,'Y','N','U','N','N','N','Y','67d6b721-12b4-4ffe-9bfd-96c94615c56b','Y','N','N','N') +; + +-- Feb 20, 2018 12:06:13 PM UTC +INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,AD_Val_Rule_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,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,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300003,0,'Document Type','Document type or rules','The Document Type determines document sequence and processing rules',300000,259,'C_DocType_ID',10,'N','N','Y','N','N','N',19,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,196,'Y','N','U','N','N','N','Y','bb29e043-8c50-4ce7-ad16-1b65f7c894ee','Y','N','N','N') +; + +-- Feb 20, 2018 12:06:13 PM 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,IsToolbarButton,IsSecure) VALUES (300004,1,'Created','Date this record was created','The Created field indicates the date that this record was created.',300000,'Created','SYSDATE',7,'N','N','Y','N','N',0,'N',16,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,245,'N','N','U','N','N','N','Y','0c48dbc9-9d78-4b49-96fb-5998612d2c2c','N','N','N') +; + +-- Feb 20, 2018 12:06:13 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_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,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300005,1,'Created By','User who created this records','The Created By field indicates the user who created this record.',300000,'CreatedBy',22,'N','N','Y','N','N',0,'N',18,110,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,246,'N','N','U','N','N','N','Y','4f7962d4-6458-4eb3-87a0-c94c5324d338','N','N','N','D') +; + +-- Feb 20, 2018 12:06:13 PM UTC +INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Callout,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (300006,0,'Document Date','Date of the Document','The Document Date indicates the date the document was generated. It may or may not be the same as the accounting date.',300000,'DateDoc','@#Date@',7,'N','N','Y','N','N','N',15,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,'org.compiere.model.CalloutEngine.checkPeriodOpen',265,'Y','N','U','N','N','N','Y','4d7a978c-4106-418d-ae97-16f1d93d90ff','Y','N','N') +; + +-- Feb 20, 2018 12:06:13 PM UTC +INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,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,IsToolbarButton,IsSecure) VALUES (300007,1,'Date Required','Date when required',300000,'DateRequired',7,'N','N','Y','N','N',0,'N',15,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,2451,'Y','N','U','N','N','N','Y','7df87a6b-00ea-4159-b43c-83a29ffe4b1f','Y','N','N') +; + +-- Feb 20, 2018 12:06:13 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,IsToolbarButton,IsSecure) VALUES (300008,1,'Description','Optional short description of the record','A description is limited to 255 characters.',300000,'Description',255,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,275,'Y','Y','U','N','N','N','Y','e67d6630-d066-444a-9f0a-701e3edd2273','Y','N','N') +; + +-- Feb 20, 2018 12:06:13 PM 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_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,AD_Process_ID,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (300009,1,'Document Action','The targeted status of the document','You find the current status in the Document Status field. The options are listed in a popup',300000,'DocAction','CO',2,'N','N','Y','N','N',0,'N',28,135,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,287,'Y',273,'N','U','N','N','N','Y','33f8589b-c2be-4a8f-96d9-4b4ee555e421','Y','B','N') +; + +-- Feb 20, 2018 12:06:13 PM 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_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,IsToolbarButton,IsSecure) VALUES (300010,1,'Document Status','The current status of the document','The Document Status indicates the status of a document at this time. If you want to change the document status, use the Document Action field',300000,'DocStatus','DR',2,'N','N','Y','N','N',0,'N',17,131,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,289,'Y','N','U','N','N','N','Y','fc5bd8f3-9b53-418c-b9c2-9ec6571dd811','Y','N','N') +; + +-- Feb 20, 2018 12:06:14 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,IsToolbarButton,IsSecure) VALUES (300011,1,'Document No','Document sequence number of the document','The document number is usually automatically generated by the system and determined by the document type of the document. If the document is not saved, the preliminary number is displayed in "<>". + +If the document type of your document has no automatic document sequence defined, the field is empty if you create a new document. This is for documents which usually have an external number (like vendor invoice). If you leave the field empty, the system will generate a document number for you. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).',300000,'DocumentNo',30,'N','N','Y','N','Y',1,'N',10,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:13','YYYY-MM-DD HH24:MI:SS'),100,290,'N','Y','U','N','N','N','Y','87cf9c82-0149-4c2e-bace-ff15165aaed8','Y','N','N') +; + +-- Feb 20, 2018 12:06:14 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,IsToolbarButton,IsSecure) VALUES (300012,1,'Comment/Help','Comment or Hint','The Help field contains a hint, comment or help about the use of this item.',300000,'Help',2000,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,326,'Y','N','U','N','N','N','Y','6489d113-54fe-43e4-bc25-12632829a56e','Y','N','N') +; + +-- Feb 20, 2018 12:06:14 PM 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,IsToolbarButton,IsSecure) VALUES (300013,1,'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.',300000,'IsActive','Y',1,'N','N','Y','N','N',0,'N',20,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,348,'Y','N','U','N','N','N','Y','00ef74c7-d252-4a27-868e-bd7736195a1d','N','N','N') +; + +-- Feb 20, 2018 12:06:14 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,IsToolbarButton,IsSecure) VALUES (300014,1,'Approved','Indicates if this document requires approval','The Approved checkbox indicates if this document requires approval before it can be processed.',300000,'IsApproved',1,'N','N','Y','N','N',0,'N',20,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,351,'Y','N','U','N','N','N','Y','bc887892-08af-4b1d-a0da-52a152f895f3','Y','N','N') +; + +-- Feb 20, 2018 12:06:14 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,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300015,1,'Price List','Unique identifier of a Price List','Price Lists are used to determine the pricing, margin and cost of items purchased or sold.',300000,'M_PriceList_ID',22,'N','N','Y','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,449,'Y','N','U','N','N','N','Y','9f300445-21f3-4703-b379-dbc031131e73','Y','N','N','N') +; + +-- Feb 20, 2018 12:06:14 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 (300000,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,'MID_Requisition_ID','Midsuit Requisition for Sales Order','Midsuit Requisition for Sales Order','U','20d146b8-380d-40b8-87d2-8f4c49ace32a') +; + +-- Feb 20, 2018 12:06:14 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,IsToolbarButton,IsSecure) VALUES (300016,1,'Midsuit Requisition for Sales Order',300000,'MID_Requisition_ID',22,'Y','N','Y','N','N',0,'N',13,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,300000,'N','N','U','N','N','N','Y','8776ac2f-cb47-4313-aa4f-1fcfa45a00ba','N','N','N') +; + +-- Feb 20, 2018 12:06:14 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 (300001,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,'MID_Requisition_UU','MID_Requisition_UU','MID_Requisition_UU','U','538a2d0f-cf46-464e-bc04-6483854df7cb') +; + +-- Feb 20, 2018 12:06:14 PM UTC +INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,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,IsToolbarButton,IsSecure) VALUES (300017,1.00,'MID_Requisition_UU',300000,'MID_Requisition_UU',36,'N','N','N','N','N','N',10,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,300001,'Y','N','U','N','N','N','Y','cc6ebe17-2df7-4669-af29-2c7bfe874371','N','N','N') +; + +-- Feb 20, 2018 12:06:14 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,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300018,1,'Warehouse','Storage Warehouse and Service Point','The Warehouse identifies a unique Warehouse where products are stored or Services are provided.',300000,'M_Warehouse_ID',22,'N','N','Y','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,459,'Y','N','U','N','N','N','Y','a75550a2-91c6-4ada-ab20-375d6fa9c9cd','Y','N','N','N') +; + +-- Feb 20, 2018 12:06:14 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_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,IsToolbarButton,IsSecure) VALUES (300019,1,'Posted','Posting status','The Posted field indicates the status of the Generation of General Ledger Accounting Lines ',300000,'Posted',1,'N','N','Y','N','N',0,'N',28,234,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,1308,'Y','N','U','N','N','N','Y','0bc84201-1619-4af3-8b84-39cdcd1c7de9','Y','N','N') +; + +-- Feb 20, 2018 12:06:14 PM 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_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,IsToolbarButton,IsSecure) VALUES (300020,1,'Priority','Priority of a document','The Priority indicates the importance (high, medium, low) of this document',300000,'PriorityRule','5',1,'N','N','Y','N','N',0,'N',17,154,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,522,'Y','N','U','N','N','N','Y','bcc3c31d-54df-477f-8163-0eef83a4cb14','Y','N','N') +; + +-- Feb 20, 2018 12:06:14 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,IsToolbarButton,IsSecure) VALUES (300021,1,'Processed','The document has been processed','The Processed checkbox indicates that a document has been processed.',300000,'Processed',1,'N','N','Y','N','N',0,'N',20,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,1047,'Y','N','U','N','N','N','Y','524a0c29-f0ed-4257-9b16-5e62a31743fc','Y','N','N') +; + +-- Feb 20, 2018 12:06:14 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,IsToolbarButton,IsSecure) VALUES (300022,0,'Processed On','The date+time (expressed in decimal format) when the document has been processed','The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.',300000,'ProcessedOn',20,'N','N','N','N','N',0,'N',22,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,54128,'Y','N','U','N','N','N','Y','f63ef349-fff9-41d5-b998-a26bae52ea16','N','N','N') +; + +-- Feb 20, 2018 12:06:14 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,IsToolbarButton,IsSecure) VALUES (300023,1,'Process Now',300000,'Processing',1,'N','N','N','N','N',0,'N',20,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,524,'Y','N','U','N','N','N','Y','134a83ab-cfb6-41d8-ae99-739862ff1eb1','N','N','N') +; + +-- Feb 20, 2018 12:06:14 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,IsToolbarButton,IsSecure) VALUES (300024,1,'Total Lines','Total of all document lines','The Total amount displays the total of all lines in document currency',300000,'TotalLines',22,'N','N','Y','N','N',0,'N',12,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,598,'Y','N','U','N','N','N','Y','da8733a1-cedf-448d-9240-312a33cd3f08','Y','N','N') +; + +-- Feb 20, 2018 12:06:14 PM 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,IsToolbarButton,IsSecure) VALUES (300025,1,'Updated','Date this record was updated','The Updated field indicates the date that this record was updated.',300000,'Updated','SYSDATE',7,'N','N','Y','N','N',0,'N',16,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,607,'N','N','U','N','N','N','Y','4d704651-b18a-4b5a-af4f-c33fd62140fd','N','N','N') +; + +-- Feb 20, 2018 12:06:14 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_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,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300026,1,'Updated By','User who updated this records','The Updated By field indicates the user who updated this record.',300000,'UpdatedBy',22,'N','N','Y','N','N',0,'N',18,110,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:14','YYYY-MM-DD HH24:MI:SS'),100,608,'N','N','U','N','N','N','Y','20af9e94-8c95-4c06-8e69-9dc4bdca1391','N','N','N','D') +; + +-- Feb 20, 2018 12:06:26 PM UTC +UPDATE AD_Column SET FKConstraintName='ADUser_MIDRequisition', FKConstraintType='N',Updated=TO_TIMESTAMP('2018-02-20 12:06:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=300002 +; + +-- Feb 20, 2018 12:06:26 PM UTC +UPDATE AD_Column SET FKConstraintName='CDocType_MIDRequisition', FKConstraintType='N',Updated=TO_TIMESTAMP('2018-02-20 12:06:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=300003 +; + +-- Feb 20, 2018 12:06:26 PM UTC +UPDATE AD_Column SET FKConstraintName='MPriceList_MIDRequisition', FKConstraintType='N',Updated=TO_TIMESTAMP('2018-02-20 12:06:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=300015 +; + +-- Feb 20, 2018 12:06:26 PM UTC +UPDATE AD_Column SET FKConstraintName='MWarehouse_MIDRequisition', FKConstraintType='N',Updated=TO_TIMESTAMP('2018-02-20 12:06:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=300018 +; + +-- Feb 20, 2018 12:06:27 PM UTC +CREATE TABLE MID_Requisition (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, AD_User_ID NUMERIC(10) NOT NULL, C_DocType_ID NUMERIC(10) NOT NULL, Created TIMESTAMP DEFAULT statement_timestamp() NOT NULL, CreatedBy NUMERIC(10) NOT NULL, DateDoc TIMESTAMP NOT NULL, DateRequired TIMESTAMP NOT NULL, Description VARCHAR(255) DEFAULT NULL , DocAction CHAR(2) DEFAULT 'CO' NOT NULL, DocStatus VARCHAR(2) DEFAULT 'DR' NOT NULL, DocumentNo VARCHAR(30) NOT NULL, Help VARCHAR(2000) DEFAULT NULL , IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, IsApproved CHAR(1) CHECK (IsApproved IN ('Y','N')) NOT NULL, MID_Requisition_ID NUMERIC(10) NOT NULL, MID_Requisition_UU VARCHAR(36) DEFAULT NULL , M_PriceList_ID NUMERIC(10) NOT NULL, M_Warehouse_ID NUMERIC(10) NOT NULL, Posted CHAR(1) NOT NULL, PriorityRule CHAR(1) DEFAULT '5' NOT NULL, Processed CHAR(1) CHECK (Processed IN ('Y','N')) NOT NULL, ProcessedOn NUMERIC DEFAULT NULL , Processing CHAR(1) DEFAULT NULL CHECK (Processing IN ('Y','N')), TotalLines NUMERIC NOT NULL, Updated TIMESTAMP DEFAULT statement_timestamp() NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, CONSTRAINT MID_Requisition_Key PRIMARY KEY (MID_Requisition_ID), CONSTRAINT MID_Requisition_UU_idx UNIQUE (MID_Requisition_UU)) +; + +-- Feb 20, 2018 12:06:27 PM UTC +ALTER TABLE MID_Requisition ADD CONSTRAINT ADUser_MIDRequisition FOREIGN KEY (AD_User_ID) REFERENCES ad_user(ad_user_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Feb 20, 2018 12:06:27 PM UTC +ALTER TABLE MID_Requisition ADD CONSTRAINT CDocType_MIDRequisition FOREIGN KEY (C_DocType_ID) REFERENCES c_doctype(c_doctype_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Feb 20, 2018 12:06:27 PM UTC +ALTER TABLE MID_Requisition ADD CONSTRAINT MPriceList_MIDRequisition FOREIGN KEY (M_PriceList_ID) REFERENCES m_pricelist(m_pricelist_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Feb 20, 2018 12:06:27 PM UTC +ALTER TABLE MID_Requisition ADD CONSTRAINT MWarehouse_MIDRequisition FOREIGN KEY (M_Warehouse_ID) REFERENCES m_warehouse(m_warehouse_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Feb 20, 2018 12:06:53 PM 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 (300001,'Midsuit Requisition Line for Sales Order','MID_RequisitionLine',0,'3',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:06:53','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:53','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','N','N','U','N','Y','L','N','Y','2b146416-3c21-498f-a771-6c6751a3441c','N','N','N') +; + +-- Feb 20, 2018 12:06:53 PM 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 ('MID_RequisitionLine',1000000,'N','N','Table MID_RequisitionLine','Y','Y',0,0,TO_TIMESTAMP('2018-02-20 12:06:53','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:06:53','YYYY-MM-DD HH24:MI:SS'),100,300001,'Y',1000000,1,200000,'16e78d86-2850-49da-89c0-50e559c3805e') +; + +-- Feb 20, 2018 12:07:00 PM 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,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300027,1,'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.',300001,129,'AD_Client_ID','@AD_Client_ID@',22,'N','N','Y','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:00','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:00','YYYY-MM-DD HH24:MI:SS'),100,102,'N','N','U','N','N','N','Y','ee63d6d1-64bd-4ca3-8248-118aea6bd279','N','N','N','D') +; + +-- Feb 20, 2018 12:07:00 PM 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,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300028,1,'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.',300001,104,'AD_Org_ID','@AD_Org_ID@',22,'N','N','Y','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:00','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:00','YYYY-MM-DD HH24:MI:SS'),100,113,'N','N','U','N','N','N','Y','f9544095-273b-487a-ba44-159769c1ddde','N','N','N','D') +; + +-- Feb 20, 2018 12:07:00 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,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300029,0,'Business Partner ','Identifies a Business Partner','A Business Partner is anyone with whom you transact. This can include Vendor, Customer, Employee or Salesperson',300001,'C_BPartner_ID',10,'N','N','N','N','N',0,'N',30,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:00','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:00','YYYY-MM-DD HH24:MI:SS'),100,187,'Y','N','U','N','N','N','Y','f56b66e6-204a-4673-ad39-f6b4ecc78be3','Y','N','N','N') +; + +-- Feb 20, 2018 12:07:00 PM UTC +INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,AD_Val_Rule_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,ReadOnlyLogic,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300030,0,'Charge','Additional document charges','The Charge indicates a type of Charge (Handling, Shipping, Restocking)',300001,52029,'C_Charge_ID',10,'N','N','N','N','N','N',19,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:00','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:00','YYYY-MM-DD HH24:MI:SS'),100,968,'Y','N','@M_Product_ID@!0','U','N','N','N','Y','28073b62-6051-4401-83b0-826d1693b361','Y','N','N','N') +; + +-- Feb 20, 2018 12:07:00 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,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300031,1,'Sales Order Line','Sales Order Line','The Sales Order Line is a unique identifier for a line in an order.',300001,'C_OrderLine_ID',22,'N','N','N','N','N',0,'N',30,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:00','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:00','YYYY-MM-DD HH24:MI:SS'),100,561,'Y','N','U','N','N','N','Y','f81e5dec-e57d-4029-acce-8650668c37ba','Y','N','N','N') +; + +-- Feb 20, 2018 12:07:01 PM 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,IsToolbarButton,IsSecure) VALUES (300032,1,'Created','Date this record was created','The Created field indicates the date that this record was created.',300001,'Created','SYSDATE',7,'N','N','Y','N','N',0,'N',16,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:00','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:00','YYYY-MM-DD HH24:MI:SS'),100,245,'N','N','U','N','N','N','Y','28171adf-51d5-4e1c-a120-058ec278a033','N','N','N') +; + +-- Feb 20, 2018 12:07:01 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_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,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300033,1,'Created By','User who created this records','The Created By field indicates the user who created this record.',300001,'CreatedBy',22,'N','N','Y','N','N',0,'N',18,110,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,246,'N','N','U','N','N','N','Y','2202bbe5-6153-4c21-a695-5707b159827a','N','N','N','D') +; + +-- Feb 20, 2018 12:07:01 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,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300034,0,'UOM','Unit of Measure','The UOM defines a unique non monetary Unit of Measure',300001,'C_UOM_ID',10,'N','N','N','N','N',0,'N',30,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,215,'N','N','U','N','N','N','Y','db1a1975-4e7f-4938-a6f3-0a0684f54c59','Y','N','N','N') +; + +-- Feb 20, 2018 12:07:01 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,IsToolbarButton,IsSecure) VALUES (300035,1,'Description','Optional short description of the record','A description is limited to 255 characters.',300001,'Description',255,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,275,'Y','Y','U','N','N','N','Y','f042ffdf-2050-482b-84cc-b4765d2b04b3','Y','N','N') +; + +-- Feb 20, 2018 12:07:01 PM 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,IsToolbarButton,IsSecure) VALUES (300036,1,'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.',300001,'IsActive','Y',1,'N','N','Y','N','N',0,'N',20,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,348,'Y','N','U','N','N','N','Y','80b06b5b-0583-46ae-af31-460940a8b274','N','N','N') +; + +-- Feb 20, 2018 12:07:01 PM 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,IsToolbarButton,IsSecure) VALUES (300037,1,'Line No','Unique line for this document','Indicates the unique line for a document. It will also control the display order of the lines within a document.',300001,'Line','@SQL=SELECT COALESCE(MAX(Line),0)+10 AS DefaultValue FROM M_RequisitionLine WHERE M_Requisition_ID=@M_Requisition_ID@',22,'N','N','Y','N','Y',1,'N',11,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,439,'Y','N','U','N','N','N','Y','2575085a-49ac-438f-ae0e-6f2813963df8','Y','N','N') +; + +-- Feb 20, 2018 12:07:01 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,IsToolbarButton,IsSecure) VALUES (300038,1,'Line Amount','Line Extended Amount (Quantity * Actual Price) without Freight and Charges','Indicates the extended line amount based on the quantity and the actual price. Any additional charges or freight are not included. The Amount may or may not include tax. If the price list is inclusive tax, the line amount is the same as the line total.',300001,'LineNetAmt',22,'N','N','Y','N','N',0,'N',12,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,441,'Y','N','U','N','N','N','Y','e381dd6a-5c64-494f-90a7-854d1d566dcf','Y','N','N') +; + +-- Feb 20, 2018 12:07:01 PM UTC +INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,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,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300039,0,'Attribute Set Instance','Product Attribute Set Instance','The values of the actual Product Attribute Instances. The product level attributes are defined on Product level.',300001,'M_AttributeSetInstance_ID',22,'N','N','N','N','N','N',35,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,2019,'Y','N','U','N','N','N','Y','cd75fb93-8573-4760-9a0b-8948700195ff','Y','N','N','N') +; + +-- Feb 20, 2018 12:07:01 PM UTC +INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,AD_Val_Rule_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Callout,AD_Element_ID,IsUpdateable,IsSelectionColumn,ReadOnlyLogic,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300040,1,'Product','Product, Service, Item','Identifies an item which is either purchased or sold in this organization.',300001,52058,'M_Product_ID',22,'N','N','N','N','N',0,'N',30,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,'org.compiere.model.CalloutRequisition.product',454,'Y','N','@C_Charge_ID@!0','U','N','N','N','Y','b8208cbd-c6ed-4f31-a6db-78861442dc6c','Y','N','N','N') +; + +-- Feb 20, 2018 12:07:01 PM UTC +INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,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,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300041,1,'Requisition','Material Requisition',300001,'M_Requisition_ID',22,'N','Y','Y','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,2452,'N','N','U','N','N','N','Y','2a841879-f94d-4ed7-b67a-b85b68213214','Y','N','N','C') +; + +-- Feb 20, 2018 12:07:01 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 (300002,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,'MID_RequisitionLine_ID','Midsuit Requisition Line for Sales Order','Midsuit Requisition Line for Sales Order','U','76ad0b76-b143-4399-8df8-5fc2315c4bf1') +; + +-- Feb 20, 2018 12:07:01 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,IsToolbarButton,IsSecure) VALUES (300042,1,'Midsuit Requisition Line for Sales Order',300001,'MID_RequisitionLine_ID',22,'Y','N','Y','N','N',0,'N',13,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,300002,'N','N','U','N','N','N','Y','6d533320-6fad-496b-9fa1-fa5004b1673c','N','N','N') +; + +-- Feb 20, 2018 12:07:01 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 (300003,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,'MID_RequisitionLine_UU','MID_RequisitionLine_UU','MID_RequisitionLine_UU','U','5e59bd8b-fb32-4146-8203-9b45bca38976') +; + +-- Feb 20, 2018 12:07:01 PM UTC +INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,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,IsToolbarButton,IsSecure) VALUES (300043,1.00,'MID_RequisitionLine_UU',300001,'MID_RequisitionLine_UU',36,'N','N','N','N','N','N',10,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,300003,'Y','N','U','N','N','N','Y','7fbae498-54ea-4064-b1ee-de6e5909ca7a','N','N','N') +; + +-- Feb 20, 2018 12:07:01 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,Callout,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (300044,1,'Unit Price','Actual Price ','The Actual or Unit Price indicates the Price for a product in source currency.',300001,'PriceActual',22,'N','N','Y','N','N',0,'N',37,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,'org.compiere.model.CalloutRequisition.amt',519,'Y','N','U','N','N','N','Y','60071468-a34f-490c-be29-c67d573e62a9','Y','N','N') +; + +-- Feb 20, 2018 12:07:01 PM 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,Callout,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (300045,1,'Quantity','Quantity','The Quantity indicates the number of a specific product or item for this document.',300001,'Qty','1',22,'N','N','Y','N','N',0,'N',29,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,'org.compiere.model.CalloutRequisition.amt',526,'Y','N','U','N','N','N','Y','29d7ad84-947c-49c4-949b-bc2c250c39cd','Y','N','N') +; + +-- Feb 20, 2018 12:07:01 PM 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,IsToolbarButton,IsSecure) VALUES (300046,1,'Updated','Date this record was updated','The Updated field indicates the date that this record was updated.',300001,'Updated','SYSDATE',7,'N','N','Y','N','N',0,'N',16,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,607,'N','N','U','N','N','N','Y','3db59833-7e42-4841-8b46-5c52c65bee0d','N','N','N') +; + +-- Feb 20, 2018 12:07:01 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_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,IsToolbarButton,IsSecure,FKConstraintType) VALUES (300047,1,'Updated By','User who updated this records','The Updated By field indicates the user who updated this record.',300001,'UpdatedBy',22,'N','N','Y','N','N',0,'N',18,110,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:07:01','YYYY-MM-DD HH24:MI:SS'),100,608,'N','N','U','N','N','N','Y','43f362de-ab64-45e7-a42d-182406120e2d','N','N','N','D') +; + +-- Feb 20, 2018 12:08:23 PM UTC +DELETE FROM AD_Column_Trl WHERE AD_Column_ID=300041 +; + +-- Feb 20, 2018 12:08:23 PM UTC +DELETE FROM AD_Column WHERE AD_Column_ID=300041 +; + +-- Feb 20, 2018 12:08:37 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 (300048,0,'Midsuit Requisition for Sales Order',300001,'MID_Requisition_ID',22,'N','Y','N','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:08:37','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:08:37','YYYY-MM-DD HH24:MI:SS'),100,300000,'N','N','U','N','N','N','Y','25dd928e-f5f1-43a4-b651-098894eae7ed','Y',0,'N','N','N') +; + +-- Feb 20, 2018 12:08:38 PM UTC +UPDATE AD_Column SET FKConstraintName='CBPartner_MIDRequisitionLine', FKConstraintType='N',Updated=TO_TIMESTAMP('2018-02-20 12:08:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=300029 +; + +-- Feb 20, 2018 12:08:38 PM UTC +UPDATE AD_Column SET FKConstraintName='CCharge_MIDRequisitionLine', FKConstraintType='N',Updated=TO_TIMESTAMP('2018-02-20 12:08:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=300030 +; + +-- Feb 20, 2018 12:08:38 PM UTC +UPDATE AD_Column SET FKConstraintName='COrderLine_MIDRequisitionLine', FKConstraintType='N',Updated=TO_TIMESTAMP('2018-02-20 12:08:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=300031 +; + +-- Feb 20, 2018 12:08:38 PM UTC +UPDATE AD_Column SET FKConstraintName='CUOM_MIDRequisitionLine', FKConstraintType='N',Updated=TO_TIMESTAMP('2018-02-20 12:08:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=300034 +; + +-- Feb 20, 2018 12:08:39 PM UTC +UPDATE AD_Column SET FKConstraintName='MAttributeSetInstance_MIDRequi', FKConstraintType='N',Updated=TO_TIMESTAMP('2018-02-20 12:08:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=300039 +; + +-- Feb 20, 2018 12:08:39 PM UTC +UPDATE AD_Column SET IsUpdateable='N', FKConstraintName='MIDRequisition_MIDRequisitionL', FKConstraintType='N',Updated=TO_TIMESTAMP('2018-02-20 12:08:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=300048 +; + +-- Feb 20, 2018 12:08:39 PM UTC +UPDATE AD_Column SET FKConstraintName='MProduct_MIDRequisitionLine', FKConstraintType='N',Updated=TO_TIMESTAMP('2018-02-20 12:08:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=300040 +; + +-- Feb 20, 2018 12:08:39 PM UTC +CREATE TABLE MID_RequisitionLine (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, C_BPartner_ID NUMERIC(10) DEFAULT NULL , C_Charge_ID NUMERIC(10) DEFAULT NULL , C_OrderLine_ID NUMERIC(10) DEFAULT NULL , Created TIMESTAMP DEFAULT statement_timestamp() NOT NULL, CreatedBy NUMERIC(10) NOT NULL, C_UOM_ID NUMERIC(10) DEFAULT NULL , Description VARCHAR(255) DEFAULT NULL , IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Line NUMERIC(10) NOT NULL, LineNetAmt NUMERIC NOT NULL, M_AttributeSetInstance_ID NUMERIC(10) DEFAULT NULL , MID_Requisition_ID NUMERIC(10) DEFAULT NULL , MID_RequisitionLine_ID NUMERIC(10) NOT NULL, MID_RequisitionLine_UU VARCHAR(36) DEFAULT NULL , M_Product_ID NUMERIC(10) DEFAULT NULL , PriceActual NUMERIC NOT NULL, Qty NUMERIC DEFAULT 1 NOT NULL, Updated TIMESTAMP DEFAULT statement_timestamp() NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, CONSTRAINT MID_RequisitionLine_Key PRIMARY KEY (MID_RequisitionLine_ID), CONSTRAINT MID_RequisitionLine_UU_idx UNIQUE (MID_RequisitionLine_UU)) +; + +-- Feb 20, 2018 12:08:39 PM UTC +ALTER TABLE MID_RequisitionLine ADD CONSTRAINT CBPartner_MIDRequisitionLine FOREIGN KEY (C_BPartner_ID) REFERENCES c_bpartner(c_bpartner_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Feb 20, 2018 12:08:39 PM UTC +ALTER TABLE MID_RequisitionLine ADD CONSTRAINT CCharge_MIDRequisitionLine FOREIGN KEY (C_Charge_ID) REFERENCES c_charge(c_charge_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Feb 20, 2018 12:08:39 PM UTC +ALTER TABLE MID_RequisitionLine ADD CONSTRAINT COrderLine_MIDRequisitionLine FOREIGN KEY (C_OrderLine_ID) REFERENCES c_orderline(c_orderline_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Feb 20, 2018 12:08:39 PM UTC +ALTER TABLE MID_RequisitionLine ADD CONSTRAINT CUOM_MIDRequisitionLine FOREIGN KEY (C_UOM_ID) REFERENCES c_uom(c_uom_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Feb 20, 2018 12:08:39 PM UTC +ALTER TABLE MID_RequisitionLine ADD CONSTRAINT MAttributeSetInstance_MIDRequi FOREIGN KEY (M_AttributeSetInstance_ID) REFERENCES m_attributesetinstance(m_attributesetinstance_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Feb 20, 2018 12:08:39 PM UTC +ALTER TABLE MID_RequisitionLine ADD CONSTRAINT MIDRequisition_MIDRequisitionL FOREIGN KEY (MID_Requisition_ID) REFERENCES mid_requisition(mid_requisition_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Feb 20, 2018 12:08:39 PM UTC +ALTER TABLE MID_RequisitionLine ADD CONSTRAINT MProduct_MIDRequisitionLine FOREIGN KEY (M_Product_ID) REFERENCES m_product(m_product_id) DEFERRABLE INITIALLY DEFERRED +; + +-- Feb 20, 2018 12:13:15 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 (300049,0,'Document No','Document sequence number of the document','The document number is usually automatically generated by the system and determined by the document type of the document. If the document is not saved, the preliminary number is displayed in "<>". + +If the document type of your document has no automatic document sequence defined, the field is empty if you create a new document. This is for documents which usually have an external number (like vendor invoice). If you leave the field empty, the system will generate a document number for you. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).',270,'DocumentNo',30,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:13:15','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:13:15','YYYY-MM-DD HH24:MI:SS'),100,290,'N','Y','U','N','N','N','Y','571f6156-4e6f-470a-962c-bb0c73999b32','Y',0,'N','N') +; + +-- Feb 20, 2018 12:13:18 PM UTC +ALTER TABLE Fact_Acct ADD COLUMN DocumentNo VARCHAR(30) DEFAULT NULL +; + +-- Feb 20, 2018 12:13:41 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 (300050,0,'Line No','Unique line for this document','Indicates the unique line for a document. It will also control the display order of the lines within a document.',270,'Line',22,'N','N','N','N','N',0,'N',11,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:13:41','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:13:41','YYYY-MM-DD HH24:MI:SS'),100,439,'N','N','U','N','N','N','Y','231717d9-cd98-4e23-bdc0-1fc20be047bc','Y',0,'N','N') +; + +-- Feb 20, 2018 12:13:42 PM UTC +ALTER TABLE Fact_Acct ADD COLUMN Line NUMERIC(10) DEFAULT NULL +; + +-- Feb 20, 2018 12:13:55 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 (300004,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:13:55','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:13:55','YYYY-MM-DD HH24:MI:SS'),100,'RefDocNo','Reference Document No','Reference Document No','U','3bf5c8b4-77a0-4bed-b0d4-eeb2ee02eea7') +; + +-- Feb 20, 2018 12:14:02 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) VALUES (300051,0,'Reference Document No',270,'RefDocNo',30,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:14:02','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:14:02','YYYY-MM-DD HH24:MI:SS'),100,300004,'Y','N','U','N','N','N','Y','40e4bb3a-2738-4654-ad7e-bd0f7cf39223','Y',0,'N','N') +; + +-- Feb 20, 2018 12:14:03 PM UTC +ALTER TABLE Fact_Acct ADD COLUMN RefDocNo VARCHAR(30) DEFAULT NULL +; + +-- Feb 20, 2018 12:14:22 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 (300005,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:14:22','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:14:22','YYYY-MM-DD HH24:MI:SS'),100,'RefDocumentNo','Reference Document No','Reference Document No','U','ef3ca62c-237d-4539-aca5-9b6918e2addd') +; + +-- Feb 20, 2018 12:14:34 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) VALUES (300052,0,'Reference Document No',270,'RefDocumentNo',30,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:14:34','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:14:34','YYYY-MM-DD HH24:MI:SS'),100,300005,'Y','N','U','N','N','N','Y','72a353f9-c5be-41c1-afbd-5d1f2d31d0aa','Y',0,'N','N') +; + +-- Feb 20, 2018 12:14:35 PM UTC +ALTER TABLE Fact_Acct ADD COLUMN RefDocumentNo VARCHAR(30) DEFAULT NULL +; + +-- Feb 20, 2018 12:16:20 PM UTC +INSERT INTO AD_Window (AD_Window_ID,Name,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,WindowType,Processing,EntityType,IsSOTrx,IsDefault,WinHeight,WinWidth,IsBetaFunctionality,AD_Window_UU) VALUES (300000,'Sales Requisition',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:20','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:20','YYYY-MM-DD HH24:MI:SS'),100,'M','N','U','Y','N',0,0,'N','15214e36-6016-45a5-ad9f-790fb88dbbf7') +; + +-- Feb 20, 2018 12:16:37 PM UTC +INSERT INTO AD_Tab (AD_Tab_ID,Name,AD_Window_ID,SeqNo,IsSingleRow,AD_Table_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,HasTree,IsInfoTab,IsTranslationTab,IsReadOnly,Processing,ImportFields,TabLevel,IsSortTab,EntityType,IsInsertRecord,IsAdvancedTab,AD_Tab_UU,TreeDisplayedOn) VALUES (300000,'Sales Requisition',300000,10,'Y',300000,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:37','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:37','YYYY-MM-DD HH24:MI:SS'),100,'N','N','N','N','N','N',0,'N','U','Y','N','0270021f-c216-41fe-a20b-8bf7a8c6abd0','B') +; + +-- Feb 20, 2018 12:16:40 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,ColumnSpan) VALUES (300000,'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.',300000,300000,'Y',22,10,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:39','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:39','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','26698e8c-cb51-40df-a0cf-ecccf599c11b','N',2) +; + +-- Feb 20, 2018 12:16:40 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,IsAllowCopy,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (300001,'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.',300000,300001,'Y',22,20,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','2e93c188-73ae-482c-9058-fc1a029f4dbe','Y','Y',10,4,2) +; + +-- Feb 20, 2018 12:16:40 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,ColumnSpan) VALUES (300002,'Description','Optional short description of the record','A description is limited to 255 characters.',300000,300008,'Y',255,30,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','6b33c0f1-c32d-47ab-877c-fc78cb15c1f1','Y',20,5) +; + +-- Feb 20, 2018 12:16:40 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,ColumnSpan) VALUES (300003,'Comment/Help','Comment or Hint','The Help field contains a hint, comment or help about the use of this item.',300000,300012,'Y',2000,40,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','4ab27dce-917b-46f9-b3a5-37df5ea254af','Y',30,5) +; + +-- Feb 20, 2018 12:16:40 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,ColumnSpan) VALUES (300004,'User/Contact','User within the system - Internal or Business Partner Contact','The User identifies a unique user in the system. This could be an internal user or a business partner contact',300000,300002,'Y',22,50,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','3e5baa60-10dc-42b7-b59d-ffaef9e8b272','Y',40,2) +; + +-- Feb 20, 2018 12:16:40 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,ColumnSpan) VALUES (300005,'Document Type','Document type or rules','The Document Type determines document sequence and processing rules',300000,300003,'Y',10,60,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','989efdc0-d4ba-4c15-9bde-cf7bd7b6d1c1','Y',50,2) +; + +-- Feb 20, 2018 12:16:40 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,ColumnSpan) VALUES (300006,'Document Date','Date of the Document','The Document Date indicates the date the document was generated. It may or may not be the same as the accounting date.',300000,300006,'Y',7,70,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','b564de8f-3722-4194-8d30-2f835a3e6a7f','Y',60,2) +; + +-- Feb 20, 2018 12:16:40 PM UTC +INSERT INTO AD_Field (AD_Field_ID,Name,Description,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,ColumnSpan) VALUES (300007,'Date Required','Date when required',300000,300007,'Y',7,80,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','26b59ba1-b533-466c-ac18-69e83d5fd97f','Y',70,2) +; + +-- Feb 20, 2018 12:16:40 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 (300008,'Document Action','The targeted status of the document','You find the current status in the Document Status field. The options are listed in a popup',300000,300009,'Y',2,90,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','5fba95d1-8558-40d3-b0fe-2c60d646156f','Y',80,2,2) +; + +-- Feb 20, 2018 12:16:40 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,ColumnSpan) VALUES (300009,'Document Status','The current status of the document','The Document Status indicates the status of a document at this time. If you want to change the document status, use the Document Action field',300000,300010,'Y',2,100,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','74846ff5-dd88-47b8-915a-39cc341db46b','Y',90,2) +; + +-- Feb 20, 2018 12:16:40 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,ColumnSpan) VALUES (300010,'Document No','Document sequence number of the document','The document number is usually automatically generated by the system and determined by the document type of the document. If the document is not saved, the preliminary number is displayed in "<>". + +If the document type of your document has no automatic document sequence defined, the field is empty if you create a new document. This is for documents which usually have an external number (like vendor invoice). If you leave the field empty, the system will generate a document number for you. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).',300000,300011,'Y',30,110,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','30b8b6ca-79ca-4cb7-9b8f-034073d2f809','Y',100,2) +; + +-- Feb 20, 2018 12:16:40 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 (300011,'Approved','Indicates if this document requires approval','The Approved checkbox indicates if this document requires approval before it can be processed.',300000,300014,'Y',1,120,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','39ae8734-e4b8-498d-b21f-7162d711ef40','Y',110,2,2) +; + +-- Feb 20, 2018 12:16:40 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,ColumnSpan) VALUES (300012,'Price List','Unique identifier of a Price List','Price Lists are used to determine the pricing, margin and cost of items purchased or sold.',300000,300015,'Y',22,130,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','1c9c5c62-7848-4dce-a492-6d7c6b29a6da','Y',120,2) +; + +-- Feb 20, 2018 12:16:40 PM UTC +INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,ColumnSpan) VALUES (300013,'Midsuit Requisition for Sales Order',300000,300016,'N',22,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','027bd99b-70c0-49cf-87ba-227210831aa9','N',2) +; + +-- Feb 20, 2018 12:16:40 PM UTC +INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,ColumnSpan) VALUES (300014,'MID_Requisition_UU',300000,300017,'N',36,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','d1f53bda-dc17-444c-95f6-07b6b5e2e060','N',2) +; + +-- Feb 20, 2018 12:16:40 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,ColumnSpan) VALUES (300015,'Warehouse','Storage Warehouse and Service Point','The Warehouse identifies a unique Warehouse where products are stored or Services are provided.',300000,300018,'Y',22,140,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','3c9fdbfc-ecc2-4f17-9e01-9331eeadf760','Y',130,2) +; + +-- Feb 20, 2018 12:16:40 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 (300016,'Posted','Posting status','The Posted field indicates the status of the Generation of General Ledger Accounting Lines ',300000,300019,'Y',1,150,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','15354b4b-6b66-4044-a476-c123dddb3802','Y',140,2,2) +; + +-- Feb 20, 2018 12:16:40 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,ColumnSpan) VALUES (300017,'Priority','Priority of a document','The Priority indicates the importance (high, medium, low) of this document',300000,300020,'Y',1,160,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','111dd1e4-63c1-4bb2-ba2f-23f9817fdfe1','Y',150,2) +; + +-- Feb 20, 2018 12:16:40 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 (300018,'Processed','The document has been processed','The Processed checkbox indicates that a document has been processed.',300000,300021,'Y',1,170,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','44c0d00a-a38f-4fb7-9db6-69f3fc9b8d3a','Y',160,2,2) +; + +-- Feb 20, 2018 12:16:41 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,ColumnSpan) VALUES (300019,'Processed On','The date+time (expressed in decimal format) when the document has been processed','The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.',300000,300022,'Y',20,180,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:40','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','0e6caf77-3e32-40b9-a3a5-b46085e2ebec','Y',170,2) +; + +-- Feb 20, 2018 12:16:41 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 (300020,'Process Now',300000,300023,'Y',1,190,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:41','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:41','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','8e579933-f906-4796-b0d8-73be5a9ca38b','Y',180,2,2) +; + +-- Feb 20, 2018 12:16:41 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,ColumnSpan) VALUES (300021,'Total Lines','Total of all document lines','The Total amount displays the total of all lines in document currency',300000,300024,'Y',22,200,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:41','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:41','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','caba41df-48ff-4b83-bedc-2d462c609f19','Y',190,2) +; + +-- Feb 20, 2018 12:16:41 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 (300022,'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.',300000,300013,'Y',1,210,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:16:41','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:16:41','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','a651cd30-71ff-4619-8388-5274753552f8','Y',200,2,2) +; + +-- Feb 20, 2018 12:17:06 PM UTC +INSERT INTO AD_Tab (AD_Tab_ID,Name,AD_Window_ID,SeqNo,IsSingleRow,AD_Table_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,HasTree,IsInfoTab,IsTranslationTab,IsReadOnly,Processing,ImportFields,TabLevel,IsSortTab,EntityType,IsInsertRecord,IsAdvancedTab,Parent_Column_ID,AD_Tab_UU,TreeDisplayedOn) VALUES (300001,'Sales Requisition Line',300000,20,'Y',300001,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:17:06','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:17:06','YYYY-MM-DD HH24:MI:SS'),100,'N','N','N','N','N','N',1,'N','U','Y','N',300016,'da2d4a86-08e0-44bd-95f1-392fc10f1e09','B') +; + +-- Feb 20, 2018 12:17:09 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,ColumnSpan) VALUES (300023,'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.',300001,300027,'Y',22,10,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:17:09','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:17:09','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','d523c39d-ddb2-456c-a4aa-4856a3c19d8e','N',2) +; + +-- Feb 20, 2018 12:17:09 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,IsAllowCopy,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (300024,'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.',300001,300028,'Y',22,20,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:17:09','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:17:09','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','03affc9e-9f21-498a-8672-311d1ebb2755','Y','Y',10,4,2) +; + +-- Feb 20, 2018 12:17:09 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,ColumnSpan) VALUES (300025,'Description','Optional short description of the record','A description is limited to 255 characters.',300001,300035,'Y',255,30,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:17:09','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:17:09','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','aa7e55c4-c343-4872-8d88-19a237de4fbb','Y',20,5) +; + +-- Feb 20, 2018 12:17:09 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,ColumnSpan) VALUES (300026,'Business Partner ','Identifies a Business Partner','A Business Partner is anyone with whom you transact. This can include Vendor, Customer, Employee or Salesperson',300001,300029,'Y',10,40,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:17:09','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:17:09','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','4eabb59e-1405-4663-b1cd-54ec4de62444','Y',30,2) +; + +-- Feb 20, 2018 12:17:09 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,ColumnSpan) VALUES (300027,'Charge','Additional document charges','The Charge indicates a type of Charge (Handling, Shipping, Restocking)',300001,300030,'Y',10,50,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:17:09','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:17:09','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','f65f4a35-aabd-45c0-adc6-5c55f80c217a','Y',40,2) +; + +-- Feb 20, 2018 12:17:09 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,ColumnSpan) VALUES (300028,'Sales Order Line','Sales Order Line','The Sales Order Line is a unique identifier for a line in an order.',300001,300031,'Y',22,60,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:17:09','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:17:09','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','4d04c005-5c1c-455c-abf5-44403aeaa474','Y',50,2) +; + +-- Feb 20, 2018 12:17:09 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,ColumnSpan) VALUES (300029,'UOM','Unit of Measure','The UOM defines a unique non monetary Unit of Measure',300001,300034,'Y',10,70,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:17:09','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:17:09','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','210af4cc-1dc8-4837-94c8-2c7b65b8cb0f','Y',60,2) +; + +-- Feb 20, 2018 12:17:09 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,ColumnSpan) VALUES (300030,'Line No','Unique line for this document','Indicates the unique line for a document. It will also control the display order of the lines within a document.',300001,300037,'Y',22,80,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:17:09','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:17:09','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','9323960f-cd25-4cc6-afd8-ebf5f1b6a1a4','Y',70,2) +; + +-- Feb 20, 2018 12:17:09 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,ColumnSpan) VALUES (300031,'Line Amount','Line Extended Amount (Quantity * Actual Price) without Freight and Charges','Indicates the extended line amount based on the quantity and the actual price. Any additional charges or freight are not included. The Amount may or may not include tax. If the price list is inclusive tax, the line amount is the same as the line total.',300001,300038,'Y',22,90,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:17:09','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:17:09','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','e8e3021a-abaa-4de9-8f61-1d726b0062a9','Y',80,2) +; + +-- Feb 20, 2018 12:17:09 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,ColumnSpan) VALUES (300032,'Attribute Set Instance','Product Attribute Set Instance','The values of the actual Product Attribute Instances. The product level attributes are defined on Product level.',300001,300039,'Y',22,100,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:17:09','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:17:09','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','47f8a570-ed6e-4b66-8a18-f026320e1587','Y',90,2) +; + +-- Feb 20, 2018 12:17:10 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,ColumnSpan) VALUES (300033,'Product','Product, Service, Item','Identifies an item which is either purchased or sold in this organization.',300001,300040,'Y',22,110,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:17:10','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:17:10','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','6ac9140d-b34e-46bf-b501-dee841e2287e','Y',100,2) +; + +-- Feb 20, 2018 12:17:10 PM UTC +INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,ColumnSpan) VALUES (300034,'Midsuit Requisition Line for Sales Order',300001,300042,'N',22,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:17:10','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:17:10','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','03c81caf-4b1d-43e1-899f-d90c667ce405','N',2) +; + +-- Feb 20, 2018 12:17:10 PM UTC +INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,ColumnSpan) VALUES (300035,'MID_RequisitionLine_UU',300001,300043,'N',36,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:17:10','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:17:10','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','aa773ce5-3afb-4ad4-a222-d4efabd19e2a','N',2) +; + +-- Feb 20, 2018 12:17:10 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,ColumnSpan) VALUES (300036,'Unit Price','Actual Price ','The Actual or Unit Price indicates the Price for a product in source currency.',300001,300044,'Y',22,120,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:17:10','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:17:10','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','46a65595-4b43-43a8-ba69-28c7d946e342','Y',110,2) +; + +-- Feb 20, 2018 12:17:10 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,ColumnSpan) VALUES (300037,'Quantity','Quantity','The Quantity indicates the number of a specific product or item for this document.',300001,300045,'Y',22,130,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:17:10','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:17:10','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','03a5cfc0-c43e-4cf2-81ab-641bc76e589c','Y',120,2) +; + +-- Feb 20, 2018 12:17:10 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,ColumnSpan) VALUES (300038,'Midsuit Requisition for Sales Order',300001,300048,'Y',22,140,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:17:10','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:17:10','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','3abb8ce9-3675-43c8-9d87-a27c1927c7a5','Y',130,2) +; + +-- Feb 20, 2018 12:17:10 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 (300039,'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.',300001,300036,'Y',1,150,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-02-20 12:17:10','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:17:10','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','b6de0eb2-9d19-437b-9dde-63d1690caa24','Y',140,2,2) +; + +-- Feb 20, 2018 12:17:35 PM UTC +INSERT INTO AD_Menu (AD_Menu_ID,Name,"action",AD_Window_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsSummary,IsSOTrx,IsReadOnly,EntityType,IsCentrallyMaintained,AD_Menu_UU) VALUES (300000,'Sales Requisition','W',300000,0,0,'Y',TO_TIMESTAMP('2018-02-20 12:17:35','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-02-20 12:17:35','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','N','U','Y','c0f19ebf-ef5f-4b5d-8e1d-eefacdcbff45') +; + +-- Feb 20, 2018 12:17:35 PM UTC +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) +; +