New Update for Return

--HG--
branch : EDII
This commit is contained in:
hodianto 2019-01-18 13:37:01 +07:00
parent ab88dff7e1
commit c19c0db2e0
17 changed files with 1849 additions and 4 deletions

View File

@ -0,0 +1,39 @@
package andromedia.midsuit.callout;
import java.sql.Timestamp;
import java.util.Properties;
import org.adempiere.base.IColumnCallout;
import org.compiere.model.CalloutEngine;
import org.compiere.model.GridField;
import org.compiere.model.GridTab;
import org.compiere.model.MOrder;
import org.compiere.model.MPriceList;
import org.compiere.model.Query;
import org.compiere.util.DB;
import org.compiere.util.Env;
import andromedia.midsuit.model.X_C_OrderLineMA;
public class MID_CalloutRMALineMA extends CalloutEngine implements IColumnCallout {
@Override
public String start(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
// TODO Auto-generated method stub
if(value == null) return null;
if(mField.getColumnName().equals(X_C_OrderLineMA.COLUMNNAME_M_AttributeSetInstance_ID)) {
return setDateMaterialPolicy(ctx, WindowNo, mTab, mField, value, oldValue);
}
return null;
}
private String setDateMaterialPolicy(Properties ctx, int windowNo, GridTab mTab, GridField mField, Object value,
Object oldValue) {
if(value==null) return "";
Timestamp retValue = DB.getSQLValueTSEx(null, "SELECT DateMaterialPolicy FROM M_Storage WHERE M_AttributeSetInstance_ID =? ", new Object[] { (int)value });
if(retValue!=null)
mTab.setValue(X_C_OrderLineMA.COLUMNNAME_DateMaterialPolicy, retValue);
return "";
}
}

View File

@ -27,11 +27,13 @@ import andromedia.midsuit.callout.MID_CalloutOrderLineMA;
import andromedia.midsuit.callout.MID_CalloutPPO;
import andromedia.midsuit.callout.MID_CalloutProduction;
import andromedia.midsuit.callout.MID_CalloutProductionLine;
import andromedia.midsuit.callout.MID_CalloutRMALineMA;
import andromedia.midsuit.callout.MID_CalloutRequisitionLine;
import andromedia.midsuit.callout.MID_CalloutRequisitionTrxLine;
import andromedia.midsuit.model.MID_Analysis;
import andromedia.midsuit.model.X_C_OrderLineMA;
import andromedia.midsuit.model.X_MID_RequisitionLine;
import andromedia.midsuit.model.X_M_RMAMA;
import andromedia.midsuit.model.X_ps_ppo;
public class MID_CalloutFactory implements IColumnCalloutFactory{
@ -62,6 +64,8 @@ public class MID_CalloutFactory implements IColumnCalloutFactory{
list.add(new MID_CalloutInventoryLineMA());
if(tableName.equals(X_C_OrderLineMA.Table_Name))
list.add(new MID_CalloutOrderLineMA());
if(tableName.equals(X_M_RMAMA.Table_Name))
list.add(new MID_CalloutRMALineMA());
if(tableName.equals(X_M_RequisitionLine.Table_Name))
list.add(new MID_CalloutRequisitionLine());
if(tableName.equals(X_ps_ppo.Table_Name))

View File

@ -32,6 +32,9 @@ import andromedia.midsuit.model.MID_PPOLine;
import andromedia.midsuit.model.MID_UnrealizedRate;
import andromedia.midsuit.model.MID_UnrealizedRateLine;
import andromedia.midsuit.model.X_C_OrderLineMA;
import andromedia.midsuit.model.X_MID_UploadPEB;
import andromedia.midsuit.model.X_MID_UploadPEBLine;
import andromedia.midsuit.model.X_M_RMAMA;
import andromedia.midsuit.model.X_zpos_Cashier;
public class MID_ModelFactory implements IModelFactory{
@ -53,6 +56,7 @@ public class MID_ModelFactory implements IModelFactory{
mapTableModels.put(MID_MDDOrderLine.Table_Name, "andromedia.midsuit.model.MID_MDDOrderLine");
mapTableModels.put(MID_PPOLine.Table_Name, "andromedia.midsuit.model.MID_PPOLine");
mapTableModels.put(X_C_OrderLineMA.Table_Name, "andromedia.midsuit.model.X_C_OrderLineMA");
mapTableModels.put(X_M_RMAMA.Table_Name, "andromedia.midsuit.model.X_M_RMAMA");
mapTableModels.put(MID_MRequisition.Table_Name, "andromedia.midsuit.model.MID_MRequisition");
mapTableModels.put(MID_MRequisitionLine.Table_Name, "andromedia.midsuit.model.MID_MRequisitionLine");
mapTableModels.put(MID_MDepreciationEntry.Table_Name, "andromedia.midsuit.model.MID_MDepreciationEntry");
@ -62,6 +66,8 @@ public class MID_ModelFactory implements IModelFactory{
mapTableModels.put(MID_UnrealizedRateLine.Table_Name, "andromedia.midsuit.model.MID_UnrealizedRateLine");
mapTableModels.put(MID_MOrder.Table_Name, "andromedia.midsuit.model.MID_MOrder");
mapTableModels.put(MMovement.Table_Name, "andromedia.midsuit.model.MID_MMovement");
mapTableModels.put(X_MID_UploadPEBLine.Table_Name, "andromedia.midsuit.model.X_MID_UploadPEBLine");
mapTableModels.put(X_MID_UploadPEB.Table_Name, "andromedia.midsuit.model.X_MID_UploadPEB");
}
@Override

View File

@ -51,6 +51,7 @@ import org.compiere.util.KeyNamePair;
import org.compiere.util.Msg;
import andromedia.midsuit.model.X_C_OrderLineMA;
import andromedia.midsuit.model.X_M_RMAMA;
/**
* Create Invoice Transactions from PO Orders or Receipt
@ -796,6 +797,26 @@ public abstract class MID_CreateFromShipment extends CreateFrom
iol.setAD_OrgTrx_ID(rmal.getAD_OrgTrx_ID());
iol.setUser1_ID(rmal.getUser1_ID());
iol.setUser2_ID(rmal.getUser2_ID());
List<X_M_RMAMA> attLines = new Query(Env.getCtx(), X_M_RMAMA.Table_Name, "M_RMALine_ID =?", trxName)
.setParameters(new Object[] { M_RMALine_ID })
.setOnlyActiveRecords(true)
.list();
if(attLines.size()<=0)
iol.setM_AttributeSetInstance_ID(rmal.getM_AttributeSetInstance_ID());
else {
iol.setM_Locator_ID(M_Locator_ID);
iol.saveEx();
for(X_M_RMAMA attLine : attLines) {
MInOutLineMA inoutAtt = new MInOutLineMA(iol, attLine.getM_AttributeSetInstance_ID(), attLine.getMovementQty(), attLine.getDateMaterialPolicy());
inoutAtt.setM_InOutLine_ID(iol.getM_InOutLine_ID());
inoutAtt.setIsAutoGenerated(false);
inoutAtt.setM_AttributeSetInstance_ID(attLine.getM_AttributeSetInstance_ID());
inoutAtt.setDateMaterialPolicy(!inout.isSOTrx() ? iol.getM_InOut().getMovementDate() : attLine.getDateMaterialPolicy());
inoutAtt.saveEx();
}
}
}
// Charge

View File

@ -0,0 +1,186 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package andromedia.midsuit.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.model.*;
import org.compiere.util.KeyNamePair;
/** Generated Interface for MID_UploadPEB
* @author iDempiere (generated)
* @version Release 5.1
*/
@SuppressWarnings("all")
public interface I_MID_UploadPEB
{
/** TableName=MID_UploadPEB */
public static final String Table_Name = "MID_UploadPEB";
/** AD_Table_ID=30111 */
public static final int Table_ID = 30111;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 3 - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(3);
/** Load Meta Data */
/** Column name AD_Client_ID */
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
/** Get Client.
* Client/Tenant for this installation.
*/
public int getAD_Client_ID();
/** Column name AD_Org_ID */
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
/** Set Organization.
* Organizational entity within client
*/
public void setAD_Org_ID (int AD_Org_ID);
/** Get Organization.
* Organizational entity within client
*/
public int getAD_Org_ID();
/** Column name Created */
public static final String COLUMNNAME_Created = "Created";
/** Get Created.
* Date this record was created
*/
public Timestamp getCreated();
/** Column name CreatedBy */
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
/** Get Created By.
* User who created this records
*/
public int getCreatedBy();
/** Column name Description */
public static final String COLUMNNAME_Description = "Description";
/** Set Description.
* Optional short description of the record
*/
public void setDescription (String Description);
/** Get Description.
* Optional short description of the record
*/
public String getDescription();
/** Column name FileName */
public static final String COLUMNNAME_FileName = "FileName";
/** Set File Name.
* Name of the local file or URL
*/
public void setFileName (String FileName);
/** Get File Name.
* Name of the local file or URL
*/
public String getFileName();
/** Column name IsActive */
public static final String COLUMNNAME_IsActive = "IsActive";
/** Set Active.
* The record is active in the system
*/
public void setIsActive (boolean IsActive);
/** Get Active.
* The record is active in the system
*/
public boolean isActive();
/** Column name MID_UploadPEB_ID */
public static final String COLUMNNAME_MID_UploadPEB_ID = "MID_UploadPEB_ID";
/** Set Upload PEB */
public void setMID_UploadPEB_ID (int MID_UploadPEB_ID);
/** Get Upload PEB */
public int getMID_UploadPEB_ID();
/** Column name MID_UploadPEB_UU */
public static final String COLUMNNAME_MID_UploadPEB_UU = "MID_UploadPEB_UU";
/** Set MID_UploadPEB_UU */
public void setMID_UploadPEB_UU (String MID_UploadPEB_UU);
/** Get MID_UploadPEB_UU */
public String getMID_UploadPEB_UU();
/** Column name Processed */
public static final String COLUMNNAME_Processed = "Processed";
/** Set Processed.
* The document has been processed
*/
public void setProcessed (boolean Processed);
/** Get Processed.
* The document has been processed
*/
public boolean isProcessed();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";
/** Set Process Now */
public void setProcessing (boolean Processing);
/** Get Process Now */
public boolean isProcessing();
/** Column name Processing2 */
public static final String COLUMNNAME_Processing2 = "Processing2";
/** Set Process Now */
public void setProcessing2 (String Processing2);
/** Get Process Now */
public String getProcessing2();
/** Column name Updated */
public static final String COLUMNNAME_Updated = "Updated";
/** Get Updated.
* Date this record was updated
*/
public Timestamp getUpdated();
/** Column name UpdatedBy */
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
/** Get Updated By.
* User who updated this records
*/
public int getUpdatedBy();
}

View File

@ -0,0 +1,256 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package andromedia.midsuit.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.model.*;
import org.compiere.util.KeyNamePair;
/** Generated Interface for MID_UploadPEBLine
* @author iDempiere (generated)
* @version Release 5.1
*/
@SuppressWarnings("all")
public interface I_MID_UploadPEBLine
{
/** TableName=MID_UploadPEBLine */
public static final String Table_Name = "MID_UploadPEBLine";
/** AD_Table_ID=30112 */
public static final int Table_ID = 30112;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 3 - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(3);
/** Load Meta Data */
/** Column name AD_Client_ID */
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
/** Get Client.
* Client/Tenant for this installation.
*/
public int getAD_Client_ID();
/** Column name AD_Org_ID */
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
/** Set Organization.
* Organizational entity within client
*/
public void setAD_Org_ID (int AD_Org_ID);
/** Get Organization.
* Organizational entity within client
*/
public int getAD_Org_ID();
/** Column name C_BPartner_ID */
public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID";
/** Set Business Partner .
* Identifies a Business Partner
*/
public void setC_BPartner_ID (int C_BPartner_ID);
/** Get Business Partner .
* Identifies a Business Partner
*/
public int getC_BPartner_ID();
public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException;
/** Column name C_Currency_ID */
public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID";
/** Set Currency.
* The Currency for this record
*/
public void setC_Currency_ID (int C_Currency_ID);
/** Get Currency.
* The Currency for this record
*/
public int getC_Currency_ID();
public org.compiere.model.I_C_Currency getC_Currency() throws RuntimeException;
/** Column name C_Order_ID */
public static final String COLUMNNAME_C_Order_ID = "C_Order_ID";
/** Set Order.
* Order
*/
public void setC_Order_ID (int C_Order_ID);
/** Get Order.
* Order
*/
public int getC_Order_ID();
public org.compiere.model.I_C_Order getC_Order() throws RuntimeException;
/** Column name Created */
public static final String COLUMNNAME_Created = "Created";
/** Get Created.
* Date this record was created
*/
public Timestamp getCreated();
/** Column name CreatedBy */
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
/** Get Created By.
* User who created this records
*/
public int getCreatedBy();
/** Column name Description */
public static final String COLUMNNAME_Description = "Description";
/** Set Description.
* Optional short description of the record
*/
public void setDescription (String Description);
/** Get Description.
* Optional short description of the record
*/
public String getDescription();
/** Column name IsActive */
public static final String COLUMNNAME_IsActive = "IsActive";
/** Set Active.
* The record is active in the system
*/
public void setIsActive (boolean IsActive);
/** Get Active.
* The record is active in the system
*/
public boolean isActive();
/** Column name MID_AJUDocumentType_ID */
public static final String COLUMNNAME_MID_AJUDocumentType_ID = "MID_AJUDocumentType_ID";
/** Set Document Type AJU */
public void setMID_AJUDocumentType_ID (int MID_AJUDocumentType_ID);
/** Get Document Type AJU */
public int getMID_AJUDocumentType_ID();
/** Column name MID_UploadPEB_ID */
public static final String COLUMNNAME_MID_UploadPEB_ID = "MID_UploadPEB_ID";
/** Set Upload PEB */
public void setMID_UploadPEB_ID (int MID_UploadPEB_ID);
/** Get Upload PEB */
public int getMID_UploadPEB_ID();
public I_MID_UploadPEB getMID_UploadPEB() throws RuntimeException;
/** Column name MID_UploadPEBLine_ID */
public static final String COLUMNNAME_MID_UploadPEBLine_ID = "MID_UploadPEBLine_ID";
/** Set Upload PEB Line */
public void setMID_UploadPEBLine_ID (int MID_UploadPEBLine_ID);
/** Get Upload PEB Line */
public int getMID_UploadPEBLine_ID();
/** Column name MID_UploadPEBLine_UU */
public static final String COLUMNNAME_MID_UploadPEBLine_UU = "MID_UploadPEBLine_UU";
/** Set MID_UploadPEBLine_UU */
public void setMID_UploadPEBLine_UU (String MID_UploadPEBLine_UU);
/** Get MID_UploadPEBLine_UU */
public String getMID_UploadPEBLine_UU();
/** Column name NoAju */
public static final String COLUMNNAME_NoAju = "NoAju";
/** Set No. Aju */
public void setNoAju (String NoAju);
/** Get No. Aju */
public String getNoAju();
/** Column name Processed */
public static final String COLUMNNAME_Processed = "Processed";
/** Set Processed.
* The document has been processed
*/
public void setProcessed (boolean Processed);
/** Get Processed.
* The document has been processed
*/
public boolean isProcessed();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";
/** Set Process Now */
public void setProcessing (boolean Processing);
/** Get Process Now */
public boolean isProcessing();
/** Column name RegisterDate */
public static final String COLUMNNAME_RegisterDate = "RegisterDate";
/** Set RegisterDate */
public void setRegisterDate (Timestamp RegisterDate);
/** Get RegisterDate */
public Timestamp getRegisterDate();
/** Column name RegisterNo */
public static final String COLUMNNAME_RegisterNo = "RegisterNo";
/** Set RegisterNo */
public void setRegisterNo (String RegisterNo);
/** Get RegisterNo */
public String getRegisterNo();
/** Column name Updated */
public static final String COLUMNNAME_Updated = "Updated";
/** Get Updated.
* Date this record was updated
*/
public Timestamp getUpdated();
/** Column name UpdatedBy */
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
/** Get Updated By.
* User who updated this records
*/
public int getUpdatedBy();
}

View File

@ -0,0 +1,215 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package andromedia.midsuit.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.model.*;
import org.compiere.util.KeyNamePair;
/** Generated Interface for M_RMAMA
* @author iDempiere (generated)
* @version Release 5.1
*/
@SuppressWarnings("all")
public interface I_M_RMAMA
{
/** TableName=M_RMAMA */
public static final String Table_Name = "M_RMAMA";
/** AD_Table_ID=30113 */
public static final int Table_ID = 30113;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 3 - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(3);
/** Load Meta Data */
/** Column name AD_Client_ID */
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
/** Get Client.
* Client/Tenant for this installation.
*/
public int getAD_Client_ID();
/** Column name AD_Org_ID */
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
/** Set Organization.
* Organizational entity within client
*/
public void setAD_Org_ID (int AD_Org_ID);
/** Get Organization.
* Organizational entity within client
*/
public int getAD_Org_ID();
/** Column name C_OrderLine_ID */
public static final String COLUMNNAME_C_OrderLine_ID = "C_OrderLine_ID";
/** Set Sales Order Line.
* Sales Order Line
*/
public void setC_OrderLine_ID (int C_OrderLine_ID);
/** Get Sales Order Line.
* Sales Order Line
*/
public int getC_OrderLine_ID();
public org.compiere.model.I_C_OrderLine getC_OrderLine() throws RuntimeException;
/** Column name Created */
public static final String COLUMNNAME_Created = "Created";
/** Get Created.
* Date this record was created
*/
public Timestamp getCreated();
/** Column name CreatedBy */
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
/** Get Created By.
* User who created this records
*/
public int getCreatedBy();
/** Column name DateMaterialPolicy */
public static final String COLUMNNAME_DateMaterialPolicy = "DateMaterialPolicy";
/** Set Date Material Policy.
* Time used for LIFO and FIFO Material Policy
*/
public void setDateMaterialPolicy (Timestamp DateMaterialPolicy);
/** Get Date Material Policy.
* Time used for LIFO and FIFO Material Policy
*/
public Timestamp getDateMaterialPolicy();
/** Column name IsActive */
public static final String COLUMNNAME_IsActive = "IsActive";
/** Set Active.
* The record is active in the system
*/
public void setIsActive (boolean IsActive);
/** Get Active.
* The record is active in the system
*/
public boolean isActive();
/** Column name IsAutoGenerated */
public static final String COLUMNNAME_IsAutoGenerated = "IsAutoGenerated";
/** Set Auto Generated */
public void setIsAutoGenerated (boolean IsAutoGenerated);
/** Get Auto Generated */
public boolean isAutoGenerated();
/** Column name M_AttributeSetInstance_ID */
public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID";
/** Set Attribute Set Instance.
* Product Attribute Set Instance
*/
public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID);
/** Get Attribute Set Instance.
* Product Attribute Set Instance
*/
public int getM_AttributeSetInstance_ID();
public I_M_AttributeSetInstance getM_AttributeSetInstance() throws RuntimeException;
/** Column name M_InOutLine_ID */
public static final String COLUMNNAME_M_InOutLine_ID = "M_InOutLine_ID";
/** Set Shipment/Receipt Line.
* Line on Shipment or Receipt document
*/
public void setM_InOutLine_ID (int M_InOutLine_ID);
/** Get Shipment/Receipt Line.
* Line on Shipment or Receipt document
*/
public int getM_InOutLine_ID();
public org.compiere.model.I_M_InOutLine getM_InOutLine() throws RuntimeException;
/** Column name MovementQty */
public static final String COLUMNNAME_MovementQty = "MovementQty";
/** Set Movement Quantity.
* Quantity of a product moved.
*/
public void setMovementQty (BigDecimal MovementQty);
/** Get Movement Quantity.
* Quantity of a product moved.
*/
public BigDecimal getMovementQty();
/** Column name M_RMALine_ID */
public static final String COLUMNNAME_M_RMALine_ID = "M_RMALine_ID";
/** Set RMA Line.
* Return Material Authorization Line
*/
public void setM_RMALine_ID (int M_RMALine_ID);
/** Get RMA Line.
* Return Material Authorization Line
*/
public int getM_RMALine_ID();
public org.compiere.model.I_M_RMALine getM_RMALine() throws RuntimeException;
/** Column name M_RMAMA_UU */
public static final String COLUMNNAME_M_RMAMA_UU = "M_RMAMA_UU";
/** Set M_RMAMA_UU */
public void setM_RMAMA_UU (String M_RMAMA_UU);
/** Get M_RMAMA_UU */
public String getM_RMAMA_UU();
/** Column name Updated */
public static final String COLUMNNAME_Updated = "Updated";
/** Get Updated.
* Date this record was updated
*/
public Timestamp getUpdated();
/** Column name UpdatedBy */
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
/** Get Updated By.
* User who updated this records
*/
public int getUpdatedBy();
}

View File

@ -0,0 +1,200 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package andromedia.midsuit.model;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.model.*;
/** Generated Model for MID_UploadPEB
* @author iDempiere (generated)
* @version Release 5.1 - $Id$ */
public class X_MID_UploadPEB extends PO implements I_MID_UploadPEB, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 20190118L;
/** Standard Constructor */
public X_MID_UploadPEB (Properties ctx, int MID_UploadPEB_ID, String trxName)
{
super (ctx, MID_UploadPEB_ID, trxName);
/** if (MID_UploadPEB_ID == 0)
{
setProcessed (false);
// N
} */
}
/** Load Constructor */
public X_MID_UploadPEB (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 3 - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_MID_UploadPEB[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set Description.
@param Description
Optional short description of the record
*/
public void setDescription (String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set File Name.
@param FileName
Name of the local file or URL
*/
public void setFileName (String FileName)
{
set_Value (COLUMNNAME_FileName, FileName);
}
/** Get File Name.
@return Name of the local file or URL
*/
public String getFileName ()
{
return (String)get_Value(COLUMNNAME_FileName);
}
/** Set Upload PEB.
@param MID_UploadPEB_ID Upload PEB */
public void setMID_UploadPEB_ID (int MID_UploadPEB_ID)
{
if (MID_UploadPEB_ID < 1)
set_ValueNoCheck (COLUMNNAME_MID_UploadPEB_ID, null);
else
set_ValueNoCheck (COLUMNNAME_MID_UploadPEB_ID, Integer.valueOf(MID_UploadPEB_ID));
}
/** Get Upload PEB.
@return Upload PEB */
public int getMID_UploadPEB_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_MID_UploadPEB_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set MID_UploadPEB_UU.
@param MID_UploadPEB_UU MID_UploadPEB_UU */
public void setMID_UploadPEB_UU (String MID_UploadPEB_UU)
{
set_ValueNoCheck (COLUMNNAME_MID_UploadPEB_UU, MID_UploadPEB_UU);
}
/** Get MID_UploadPEB_UU.
@return MID_UploadPEB_UU */
public String getMID_UploadPEB_UU ()
{
return (String)get_Value(COLUMNNAME_MID_UploadPEB_UU);
}
/** Set Processed.
@param Processed
The document has been processed
*/
public void setProcessed (boolean Processed)
{
set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
}
/** Get Processed.
@return The document has been processed
*/
public boolean isProcessed ()
{
Object oo = get_Value(COLUMNNAME_Processed);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)
{
set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing));
}
/** Get Process Now.
@return Process Now */
public boolean isProcessing ()
{
Object oo = get_Value(COLUMNNAME_Processing);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Process Now.
@param Processing2 Process Now */
public void setProcessing2 (String Processing2)
{
set_Value (COLUMNNAME_Processing2, Processing2);
}
/** Get Process Now.
@return Process Now */
public String getProcessing2 ()
{
return (String)get_Value(COLUMNNAME_Processing2);
}
}

View File

@ -0,0 +1,348 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package andromedia.midsuit.model;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.model.*;
/** Generated Model for MID_UploadPEBLine
* @author iDempiere (generated)
* @version Release 5.1 - $Id$ */
public class X_MID_UploadPEBLine extends PO implements I_MID_UploadPEBLine, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 20190118L;
/** Standard Constructor */
public X_MID_UploadPEBLine (Properties ctx, int MID_UploadPEBLine_ID, String trxName)
{
super (ctx, MID_UploadPEBLine_ID, trxName);
/** if (MID_UploadPEBLine_ID == 0)
{
setProcessed (false);
// N
} */
}
/** Load Constructor */
public X_MID_UploadPEBLine (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 3 - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_MID_UploadPEBLine[")
.append(get_ID()).append("]");
return sb.toString();
}
public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException
{
return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
.getPO(getC_BPartner_ID(), get_TrxName()); }
/** Set Business Partner .
@param C_BPartner_ID
Identifies a Business Partner
*/
public void setC_BPartner_ID (int C_BPartner_ID)
{
if (C_BPartner_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_BPartner_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID));
}
/** Get Business Partner .
@return Identifies a Business Partner
*/
public int getC_BPartner_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public org.compiere.model.I_C_Currency getC_Currency() throws RuntimeException
{
return (org.compiere.model.I_C_Currency)MTable.get(getCtx(), org.compiere.model.I_C_Currency.Table_Name)
.getPO(getC_Currency_ID(), get_TrxName()); }
/** Set Currency.
@param C_Currency_ID
The Currency for this record
*/
public void setC_Currency_ID (int C_Currency_ID)
{
if (C_Currency_ID < 1)
set_Value (COLUMNNAME_C_Currency_ID, null);
else
set_Value (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID));
}
/** Get Currency.
@return The Currency for this record
*/
public int getC_Currency_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Currency_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public org.compiere.model.I_C_Order getC_Order() throws RuntimeException
{
return (org.compiere.model.I_C_Order)MTable.get(getCtx(), org.compiere.model.I_C_Order.Table_Name)
.getPO(getC_Order_ID(), get_TrxName()); }
/** Set Order.
@param C_Order_ID
Order
*/
public void setC_Order_ID (int C_Order_ID)
{
if (C_Order_ID < 1)
set_Value (COLUMNNAME_C_Order_ID, null);
else
set_Value (COLUMNNAME_C_Order_ID, Integer.valueOf(C_Order_ID));
}
/** Get Order.
@return Order
*/
public int getC_Order_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Order_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public int getM_RMA_ID () {
Integer ii = (Integer)get_Value("M_RMA_ID");
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Description.
@param Description
Optional short description of the record
*/
public void setDescription (String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Document Type AJU.
@param MID_AJUDocumentType_ID Document Type AJU */
public void setMID_AJUDocumentType_ID (int MID_AJUDocumentType_ID)
{
if (MID_AJUDocumentType_ID < 1)
set_Value (COLUMNNAME_MID_AJUDocumentType_ID, null);
else
set_Value (COLUMNNAME_MID_AJUDocumentType_ID, Integer.valueOf(MID_AJUDocumentType_ID));
}
/** Get Document Type AJU.
@return Document Type AJU */
public int getMID_AJUDocumentType_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_MID_AJUDocumentType_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_MID_UploadPEB getMID_UploadPEB() throws RuntimeException
{
return (I_MID_UploadPEB)MTable.get(getCtx(), I_MID_UploadPEB.Table_Name)
.getPO(getMID_UploadPEB_ID(), get_TrxName()); }
/** Set Upload PEB.
@param MID_UploadPEB_ID Upload PEB */
public void setMID_UploadPEB_ID (int MID_UploadPEB_ID)
{
if (MID_UploadPEB_ID < 1)
set_ValueNoCheck (COLUMNNAME_MID_UploadPEB_ID, null);
else
set_ValueNoCheck (COLUMNNAME_MID_UploadPEB_ID, Integer.valueOf(MID_UploadPEB_ID));
}
/** Get Upload PEB.
@return Upload PEB */
public int getMID_UploadPEB_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_MID_UploadPEB_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Upload PEB Line.
@param MID_UploadPEBLine_ID Upload PEB Line */
public void setMID_UploadPEBLine_ID (int MID_UploadPEBLine_ID)
{
if (MID_UploadPEBLine_ID < 1)
set_ValueNoCheck (COLUMNNAME_MID_UploadPEBLine_ID, null);
else
set_ValueNoCheck (COLUMNNAME_MID_UploadPEBLine_ID, Integer.valueOf(MID_UploadPEBLine_ID));
}
/** Get Upload PEB Line.
@return Upload PEB Line */
public int getMID_UploadPEBLine_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_MID_UploadPEBLine_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set MID_UploadPEBLine_UU.
@param MID_UploadPEBLine_UU MID_UploadPEBLine_UU */
public void setMID_UploadPEBLine_UU (String MID_UploadPEBLine_UU)
{
set_ValueNoCheck (COLUMNNAME_MID_UploadPEBLine_UU, MID_UploadPEBLine_UU);
}
/** Get MID_UploadPEBLine_UU.
@return MID_UploadPEBLine_UU */
public String getMID_UploadPEBLine_UU ()
{
return (String)get_Value(COLUMNNAME_MID_UploadPEBLine_UU);
}
/** Set No. Aju.
@param NoAju No. Aju */
public void setNoAju (String NoAju)
{
set_Value (COLUMNNAME_NoAju, NoAju);
}
/** Get No. Aju.
@return No. Aju */
public String getNoAju ()
{
return (String)get_Value(COLUMNNAME_NoAju);
}
/** Set Processed.
@param Processed
The document has been processed
*/
public void setProcessed (boolean Processed)
{
set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
}
/** Get Processed.
@return The document has been processed
*/
public boolean isProcessed ()
{
Object oo = get_Value(COLUMNNAME_Processed);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)
{
set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing));
}
/** Get Process Now.
@return Process Now */
public boolean isProcessing ()
{
Object oo = get_Value(COLUMNNAME_Processing);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set RegisterDate.
@param RegisterDate RegisterDate */
public void setRegisterDate (Timestamp RegisterDate)
{
set_Value (COLUMNNAME_RegisterDate, RegisterDate);
}
/** Get RegisterDate.
@return RegisterDate */
public Timestamp getRegisterDate ()
{
return (Timestamp)get_Value(COLUMNNAME_RegisterDate);
}
/** Set RegisterNo.
@param RegisterNo RegisterNo */
public void setRegisterNo (String RegisterNo)
{
set_Value (COLUMNNAME_RegisterNo, RegisterNo);
}
/** Get RegisterNo.
@return RegisterNo */
public String getRegisterNo ()
{
return (String)get_Value(COLUMNNAME_RegisterNo);
}
}

View File

@ -0,0 +1,271 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package andromedia.midsuit.model;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.model.*;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
/** Generated Model for M_RMAMA
* @author iDempiere (generated)
* @version Release 5.1 - $Id$ */
public class X_M_RMAMA extends PO implements I_M_RMAMA, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 20190118L;
/** Standard Constructor */
public X_M_RMAMA (Properties ctx, int M_RMAMA_ID, String trxName)
{
super (ctx, M_RMAMA_ID, trxName);
/** if (M_RMAMA_ID == 0)
{
setC_OrderLine_ID (0);
setM_AttributeSetInstance_ID (0);
setMovementQty (Env.ZERO);
// 1
} */
}
/** Load Constructor */
public X_M_RMAMA (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 3 - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_M_RMAMA[")
.append(get_ID()).append("]");
return sb.toString();
}
public org.compiere.model.I_C_OrderLine getC_OrderLine() throws RuntimeException
{
return (org.compiere.model.I_C_OrderLine)MTable.get(getCtx(), org.compiere.model.I_C_OrderLine.Table_Name)
.getPO(getC_OrderLine_ID(), get_TrxName()); }
/** Set Sales Order Line.
@param C_OrderLine_ID
Sales Order Line
*/
public void setC_OrderLine_ID (int C_OrderLine_ID)
{
if (C_OrderLine_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_OrderLine_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_OrderLine_ID, Integer.valueOf(C_OrderLine_ID));
}
/** Get Sales Order Line.
@return Sales Order Line
*/
public int getC_OrderLine_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_OrderLine_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Date Material Policy.
@param DateMaterialPolicy
Time used for LIFO and FIFO Material Policy
*/
public void setDateMaterialPolicy (Timestamp DateMaterialPolicy)
{
set_ValueNoCheck (COLUMNNAME_DateMaterialPolicy, DateMaterialPolicy);
}
/** Get Date Material Policy.
@return Time used for LIFO and FIFO Material Policy
*/
public Timestamp getDateMaterialPolicy ()
{
return (Timestamp)get_Value(COLUMNNAME_DateMaterialPolicy);
}
/** Set Auto Generated.
@param IsAutoGenerated Auto Generated */
public void setIsAutoGenerated (boolean IsAutoGenerated)
{
set_ValueNoCheck (COLUMNNAME_IsAutoGenerated, Boolean.valueOf(IsAutoGenerated));
}
/** Get Auto Generated.
@return Auto Generated */
public boolean isAutoGenerated ()
{
Object oo = get_Value(COLUMNNAME_IsAutoGenerated);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
public I_M_AttributeSetInstance getM_AttributeSetInstance() throws RuntimeException
{
return (I_M_AttributeSetInstance)MTable.get(getCtx(), I_M_AttributeSetInstance.Table_Name)
.getPO(getM_AttributeSetInstance_ID(), get_TrxName()); }
/** Set Attribute Set Instance.
@param M_AttributeSetInstance_ID
Product Attribute Set Instance
*/
public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID)
{
if (M_AttributeSetInstance_ID < 0)
set_ValueNoCheck (COLUMNNAME_M_AttributeSetInstance_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_AttributeSetInstance_ID, Integer.valueOf(M_AttributeSetInstance_ID));
}
/** Get Attribute Set Instance.
@return Product Attribute Set Instance
*/
public int getM_AttributeSetInstance_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstance_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public org.compiere.model.I_M_InOutLine getM_InOutLine() throws RuntimeException
{
return (org.compiere.model.I_M_InOutLine)MTable.get(getCtx(), org.compiere.model.I_M_InOutLine.Table_Name)
.getPO(getM_InOutLine_ID(), get_TrxName()); }
/** Set Shipment/Receipt Line.
@param M_InOutLine_ID
Line on Shipment or Receipt document
*/
public void setM_InOutLine_ID (int M_InOutLine_ID)
{
if (M_InOutLine_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_InOutLine_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_InOutLine_ID, Integer.valueOf(M_InOutLine_ID));
}
/** Get Shipment/Receipt Line.
@return Line on Shipment or Receipt document
*/
public int getM_InOutLine_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_InOutLine_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getM_InOutLine_ID()));
}
/** Set Movement Quantity.
@param MovementQty
Quantity of a product moved.
*/
public void setMovementQty (BigDecimal MovementQty)
{
set_Value (COLUMNNAME_MovementQty, MovementQty);
}
/** Get Movement Quantity.
@return Quantity of a product moved.
*/
public BigDecimal getMovementQty ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_MovementQty);
if (bd == null)
return Env.ZERO;
return bd;
}
public org.compiere.model.I_M_RMALine getM_RMALine() throws RuntimeException
{
return (org.compiere.model.I_M_RMALine)MTable.get(getCtx(), org.compiere.model.I_M_RMALine.Table_Name)
.getPO(getM_RMALine_ID(), get_TrxName()); }
/** Set RMA Line.
@param M_RMALine_ID
Return Material Authorization Line
*/
public void setM_RMALine_ID (int M_RMALine_ID)
{
if (M_RMALine_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_RMALine_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_RMALine_ID, Integer.valueOf(M_RMALine_ID));
}
/** Get RMA Line.
@return Return Material Authorization Line
*/
public int getM_RMALine_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_RMALine_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set M_RMAMA_UU.
@param M_RMAMA_UU M_RMAMA_UU */
public void setM_RMAMA_UU (String M_RMAMA_UU)
{
set_Value (COLUMNNAME_M_RMAMA_UU, M_RMAMA_UU);
}
/** Get M_RMAMA_UU.
@return M_RMAMA_UU */
public String getM_RMAMA_UU ()
{
return (String)get_Value(COLUMNNAME_M_RMAMA_UU);
}
}

View File

@ -0,0 +1,69 @@
package andromedia.midsuit.process;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import org.adempiere.exceptions.AdempiereException;
import org.compiere.model.MOrder;
import org.compiere.model.MRMA;
import org.compiere.model.Query;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
import org.compiere.util.DB;
import andromedia.midsuit.model.X_MID_UploadPEB;
import andromedia.midsuit.model.X_MID_UploadPEBLine;
public class MID_PEBUpdateOrder extends SvrProcess{
X_MID_UploadPEB peb = null;
@Override
protected void prepare() {
// TODO Auto-generated method stub
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
}
peb = new X_MID_UploadPEB(getCtx(), getRecord_ID(), get_TrxName());
}
@Override
protected String doIt() throws Exception {
String whereClause = " MID_UploadPEB_ID =? AND Processed='N' AND (C_Order_ID IS NOT NULL OR M_RMA_ID IS NOT NULL)";
List<X_MID_UploadPEBLine> lines = new Query(getCtx(), X_MID_UploadPEBLine.Table_Name, whereClause, get_TrxName())
.setParameters(new Object[] { getRecord_ID() })
.setOnlyActiveRecords(true)
.list();
for(X_MID_UploadPEBLine line : lines) {
if(line.getC_Order_ID()>0) {
MOrder order = new MOrder(getCtx(), line.getC_Order_ID(), get_TrxName());
order.set_ValueNoCheck("RegisterNo", line.getRegisterNo());
order.set_ValueNoCheck("RegisterDate", line.getRegisterDate());
order.set_ValueNoCheck("NoAju1", line.getNoAju());
order.set_ValueNoCheck("MID_AJUDocumentType_ID", line.getMID_AJUDocumentType_ID());
order.saveEx();
}else if(line.getM_RMA_ID()>0){
MRMA rma = new MRMA(getCtx(), line.getM_RMA_ID(), get_TrxName());
rma.set_ValueNoCheck("RegisterNo", line.getRegisterNo());
rma.set_ValueNoCheck("RegisterDate", line.getRegisterDate());
rma.set_ValueNoCheck("NoAju", line.getNoAju());
rma.set_ValueNoCheck("MID_AJUDocumentType_ID", line.getMID_AJUDocumentType_ID());
rma.saveEx();
}
line.setProcessed(true);
line.saveEx();
}
int countNotProcessed = DB.getSQLValueEx(get_TrxName(), "SELECT COUNT(*) FROM MID_UploadPEBLine WHERE Processed =? AND MID_UploadPEB_ID =?", new Object[] { false, getRecord_ID() });
if(countNotProcessed==0) {
peb.setProcessed(true);
peb.saveEx();
}
return "";
}
}

View File

@ -0,0 +1,69 @@
package andromedia.midsuit.process;
import java.util.List;
import org.adempiere.exceptions.AdempiereException;
import org.compiere.model.MOrder;
import org.compiere.model.MRMA;
import org.compiere.model.Query;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
import org.compiere.util.DB;
import andromedia.midsuit.model.X_MID_UploadPEB;
import andromedia.midsuit.model.X_MID_UploadPEBLine;
public class MID_PEBUpdateOrderLine extends SvrProcess{
X_MID_UploadPEBLine pebLine = null;
@Override
protected void prepare() {
// TODO Auto-generated method stub
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
}
pebLine = new X_MID_UploadPEBLine(getCtx(), getRecord_ID(), get_TrxName());
}
@Override
protected String doIt() throws Exception {
if(pebLine.getC_Order_ID()==0 && pebLine.getM_RMA_ID()==0)
throw new AdempiereException("Sales Order / Return Order Must be Filled !!!");
if(pebLine.getC_Order_ID()>0)
setOrder(pebLine);
else
setRMA(pebLine);
pebLine.setProcessed(true);
pebLine.saveEx();
int countNotProcessed = DB.getSQLValueEx(get_TrxName(), "SELECT COUNT(*) FROM MID_UploadPEBLine WHERE Processed =? AND MID_UploadPEB_ID =?", new Object[] { false, pebLine.getMID_UploadPEB_ID() });
if(countNotProcessed==0) {
X_MID_UploadPEB peb = new X_MID_UploadPEB(getCtx(), pebLine.getMID_UploadPEB_ID(), get_TrxName());
peb.setProcessed(true);
peb.saveEx();
}
return "";
}
private void setRMA(X_MID_UploadPEBLine pebLine) {
MRMA rma = new MRMA(getCtx(), pebLine.getM_RMA_ID(), get_TrxName());
rma.set_ValueNoCheck("RegisterNo", pebLine.getRegisterNo());
rma.set_ValueNoCheck("RegisterDate", pebLine.getRegisterDate());
rma.set_ValueNoCheck("NoAju", pebLine.getNoAju());
rma.set_ValueNoCheck("MID_AJUDocumentType_ID", pebLine.getMID_AJUDocumentType_ID());
rma.saveEx();
}
private void setOrder(X_MID_UploadPEBLine pebLine) {
MOrder order = new MOrder(getCtx(), pebLine.getC_Order_ID(), get_TrxName());
order.set_ValueNoCheck("RegisterNo", pebLine.getRegisterNo());
order.set_ValueNoCheck("RegisterDate", pebLine.getRegisterDate());
order.set_ValueNoCheck("NoAju1", pebLine.getNoAju());
order.set_ValueNoCheck("MID_AJUDocumentType_ID", pebLine.getMID_AJUDocumentType_ID());
order.saveEx();
}
}

View File

@ -75,7 +75,7 @@ public class MID_ProcessUnrealizedGainLoss extends SvrProcess{
, ass[0].getC_Currency_ID(), period.getEndDate(), unRate.getC_ConversionType_ID(), invoice.getAD_Client_ID(),
invoice.getAD_Org_ID());
if(lastUnrealizedRate != null)
if(lastUnrealizedRate.signum()>0)
transactionRate = lastUnrealizedRate;
if(transactionRate == null)
throw new AdempiereException("Transaction Rate Invoice No."+invoice.getDocumentNo()+" at "+invoice.getDateAcct().toString()+" not found !!!");

View File

@ -0,0 +1,132 @@
package andromedia.midsuit.process;
import java.io.File;
import java.math.BigDecimal;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Iterator;
import org.adempiere.exceptions.AdempiereException;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.compiere.model.MBPartnerLocation;
import org.compiere.model.MOrder;
import org.compiere.model.MOrderLine;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import andromedia.midsuit.model.MID_MOrder;
import andromedia.midsuit.model.X_MID_UploadPEB;
import andromedia.midsuit.model.X_MID_UploadPEBLine;
import net.ucanaccess.jdbc.UcanaccessDriver;
public class MID_UploadPEBWindow extends SvrProcess{
String p_File = "";
int p_C_DocType_ID =0;
X_MID_UploadPEB peb = null;
@Override
protected void prepare() {
// TODO Auto-generated method stub
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
if(para[i].getParameterName().equals("FileName"))
p_File = para[i].getParameterAsString();
else if(para[i].getParameterName().equals("C_DocType_ID"))
p_C_DocType_ID = para[i].getParameterAsInt();
}
peb = new X_MID_UploadPEB(getCtx(), getRecord_ID(), get_TrxName());
}
@Override
protected String doIt() throws Exception {
File TPB = new File(p_File);
int formatIndex = TPB.getName().lastIndexOf(".");
int fileNameIndex = TPB.getName().lastIndexOf("_");
if(TPB.getName().substring(formatIndex+1).equalsIgnoreCase("xlsx") ||
TPB.getName().substring(formatIndex+1).equalsIgnoreCase("xls")){
readExcel(TPB, peb);
}else{
readAccess(TPB, peb);
}
peb.setFileName(TPB.getName().substring(fileNameIndex+1));
peb.saveEx();
return "";
}
private void readExcel(File TPB, X_MID_UploadPEB peb) throws Exception{
Workbook workbook = WorkbookFactory.create(TPB);
Sheet header = workbook.getSheet("Header");
Iterator<Row> rows = header.rowIterator();
int rowNum = 0;
while(rows.hasNext()){
Row row = rows.next();
if(rowNum==0) {
rowNum++;
continue;
}
X_MID_UploadPEBLine line = new X_MID_UploadPEBLine(getCtx(), 0, get_TrxName());
line.setMID_UploadPEB_ID(peb.get_ID());
line.setAD_Org_ID(peb.getAD_Org_ID());
line.setRegisterNo(row.getCell(103).getStringCellValue());
SimpleDateFormat dateFormat = new SimpleDateFormat("dd MMM yyyy");
Date parsedDate = dateFormat.parse(row.getCell(117).getStringCellValue());
Timestamp registerDate = new Timestamp(parsedDate.getTime());
line.setRegisterDate(registerDate);
line.setNoAju(row.getCell(0).getStringCellValue());
String AJU_DocType_Value = row.getCell(5).getStringCellValue();
int MID_AJUDocType_ID = DB.getSQLValue(get_TrxName(), "SELECT MID_AJUDocumentType_ID FROM MID_AjuDocumentType WHERE Value =?", new Object[] { AJU_DocType_Value });
if(MID_AJUDocType_ID <=0)
throw new AdempiereException("AJU Document For "+AJU_DocType_Value+" !!!");
line.setMID_AJUDocumentType_ID(MID_AJUDocType_ID);
line.saveEx();
}
}
private void readAccess(File TPB, X_MID_UploadPEB peb) throws Exception{
String msg = "";
Class.forName("net.ucanaccess.jdbc.UcanaccessDriver");
String databaseURL = "jdbc:ucanaccess://" + TPB.getPath() + ";jackcessOpener=andromedia.midsuit.process.CryptCodecOpener";
try (Connection conn = DriverManager.getConnection(databaseURL)) {
String sql = "SELECT * FROM tblPebHdr";
Statement statement = conn.createStatement();
ResultSet rs = statement.executeQuery(sql);
while (rs.next()) {
if (msg != "") throw new AdempiereException(msg);
X_MID_UploadPEBLine line = new X_MID_UploadPEBLine(getCtx(), 0, get_TrxName());
line.setMID_UploadPEB_ID(peb.get_ID());
line.setAD_Org_ID(peb.getAD_Org_ID());
int MID_AJUDocumentType_ID = DB.getSQLValue(get_TrxName(), "SELECT MID_AJUDocumentType_ID FROM MID_AJUDocumentType WHERE Value =? AND AD_Client_ID =?", new Object[] { "30", getAD_Client_ID() });
line.setNoAju(rs.getString("CAR"));
line.setRegisterNo(rs.getString("NODAFT"));
line.setRegisterDate(rs.getTimestamp("TGDAFT"));
line.setMID_AJUDocumentType_ID(MID_AJUDocumentType_ID);
line.saveEx();
}
} catch (SQLException ex) {
ex.printStackTrace();
}
}
}

View File

@ -71,11 +71,18 @@ public class MID_UploadTPB extends SvrProcess{
order.set_ValueNoCheck("MID_AJUDocumentType_ID", MID_AJUDocType_ID);
int C_BPartner_ID = DB.getSQLValue(get_TrxName(), "SELECT C_BPartner_ID FROM C_Bpartner WHERE Name =? AND AD_Client_ID =? AND IsVendor ='Y'", new Object[] { row.getCell(3).getStringCellValue(), getAD_Client_ID()});
int C_BPartner_ID = 0;
int C_Currency_ID = 0;
if(AJU_DocType_Value.equals("40")) {
C_BPartner_ID = DB.getSQLValue(get_TrxName(), "SELECT C_BPartner_ID FROM C_Bpartner WHERE Name =? AND AD_Client_ID =? AND IsVendor ='Y'", new Object[] { row.getCell(93).getStringCellValue(), getAD_Client_ID()});
C_Currency_ID = DB.getSQLValue(get_TrxName(), "SELECT C_Currency_ID FROM C_Currency WHERE ISO_Code =? ", new Object[] { "IDR" });
}else {
C_BPartner_ID = DB.getSQLValue(get_TrxName(), "SELECT C_BPartner_ID FROM C_Bpartner WHERE Name =? AND AD_Client_ID =? AND IsVendor ='Y'", new Object[] { row.getCell(3).getStringCellValue(), getAD_Client_ID()});
C_Currency_ID = DB.getSQLValue(get_TrxName(), "SELECT C_Currency_ID FROM C_Currency WHERE ISO_Code =? ", new Object[] { row.getCell(88).getStringCellValue()});
}
if(C_BPartner_ID <=0)
throw new AdempiereException("Business Partner Not Found "+row.getCell(3).getStringCellValue()+" !!!");
int C_Currency_ID = DB.getSQLValue(get_TrxName(), "SELECT C_Currency_ID FROM C_Currency WHERE ISO_Code =? ", new Object[] { row.getCell(88).getStringCellValue()});
if(C_Currency_ID <=0)
throw new AdempiereException("Currency Not Found "+row.getCell(88).getStringCellValue()+" !!!");
order.setC_BPartner_ID(C_BPartner_ID);

View File

@ -1,6 +1,7 @@
package andromedia.midsuit.validator;
import org.adempiere.base.event.IEventTopics;
import org.compiere.model.MDocType;
import org.compiere.model.MInventoryLine;
import org.compiere.model.PO;
import org.osgi.service.event.Event;
@ -30,6 +31,11 @@ public class MID_InventoryLineValidator {
else if (inv.getM_Product().getM_Product_Category().getValue().contains("SCRAP")) {
if(inv.getQtyInternalUse().signum()>0)
inv.setQtyInternalUse(inv.getQtyInternalUse().negate());
}else {
MDocType dt = (MDocType) inv.getM_Inventory().getC_DocType();
if(dt.get_ValueAsBoolean("IsReceipt") && inv.getQtyInternalUse().signum()>0) {
inv.setQtyInternalUse(inv.getQtyInternalUse().negate());
}
}
return "";
}
@ -45,6 +51,11 @@ public class MID_InventoryLineValidator {
}else if (inv.getM_Product().getM_Product_Category().getValue().contains("SCRAP")) {
if(inv.getQtyInternalUse().signum()>0)
inv.setQtyInternalUse(inv.getQtyInternalUse().negate());
}else {
MDocType dt = (MDocType) inv.getM_Inventory().getC_DocType();
if(dt.get_ValueAsBoolean("IsReceipt") && inv.getQtyInternalUse().signum()>0) {
inv.setQtyInternalUse(inv.getQtyInternalUse().negate());
}
}
return "";
}

View File

@ -2,6 +2,7 @@ package andromedia.midsuit.validator;
import org.adempiere.base.event.IEventTopics;
import org.adempiere.exceptions.AdempiereException;
import org.compiere.model.MDocType;
import org.compiere.model.MInventory;
import org.compiere.model.MInventoryLine;
import org.compiere.model.PO;
@ -68,6 +69,16 @@ public class MID_InventoryValidator {
return "";
}
private static String beforeComplete(MInventory inv){
MDocType dt = (MDocType) inv.getC_DocType();
boolean isReceipt = dt.get_ValueAsBoolean("IsReceipt");
if(isReceipt) {
for(MInventoryLine line : inv.getLines(true)) {
if(line.getQtyInternalUse().signum()>0) {
line.setQtyInternalUse(line.getQtyInternalUse().negate());
line.saveEx();
}
}
}
int PS_PPO_ID = inv.get_ValueAsInt("ps_ppo_ID");
if(PS_PPO_ID==0) return "";
return "";