[DIVKON] : Add Flagging
This commit is contained in:
parent
5af500caf8
commit
2cfdc2eec2
|
|
@ -21,6 +21,7 @@ import org.compiere.model.MInvoicePaySchedule;
|
|||
import org.compiere.model.MOrder;
|
||||
import org.compiere.model.MOrderLine;
|
||||
import org.compiere.model.MOrderPaySchedule;
|
||||
import org.compiere.model.MOrg;
|
||||
import org.compiere.model.MProduct;
|
||||
import org.compiere.model.MRMA;
|
||||
import org.compiere.model.MRMALine;
|
||||
|
|
@ -35,6 +36,7 @@ import org.compiere.util.Msg;
|
|||
public abstract class MID_CreateFromInvoice extends CreateFrom {
|
||||
|
||||
protected MInOut m_inout = null;
|
||||
MOrg org = new MOrg(Env.getCtx(), Env.getAD_Org_ID(Env.getCtx()), null);
|
||||
|
||||
/**
|
||||
* Protected Constructor
|
||||
|
|
@ -527,10 +529,12 @@ public abstract class MID_CreateFromInvoice extends CreateFrom {
|
|||
if (inoutLine != null)
|
||||
{
|
||||
invoiceLine.setShipLine(inoutLine); // overwrites
|
||||
invoiceLine.set_ValueNoCheck("Construction_C_Order_ID", inoutLine.get_Value("Construction_C_Order_ID") != null ? inoutLine.get_ValueAsInt("Construction_C_Order_ID") : null);
|
||||
invoiceLine.set_ValueNoCheck("SAP_ExpenseCode_ID", inoutLine.get_Value("SAP_ExpenseCode_ID") != null ? inoutLine.get_ValueAsInt("SAP_ExpenseCode_ID") : null);
|
||||
invoiceLine.set_ValueNoCheck("C_Project_ID", inoutLine.get_Value("C_Project_ID") != null ? inoutLine.get_ValueAsInt("C_Project_ID") : null);
|
||||
invoiceLine.set_ValueNoCheck("C_ProjectPhase_ID", inoutLine.get_Value("C_ProjectPhase_ID") != null ? inoutLine.get_ValueAsInt("C_ProjectPhase_ID") : null);
|
||||
if(org.get_ValueAsBoolean("IsProjectBased")) {
|
||||
invoiceLine.set_ValueNoCheck("Construction_C_Order_ID", inoutLine.get_Value("Construction_C_Order_ID") != null ? inoutLine.get_ValueAsInt("Construction_C_Order_ID") : null);
|
||||
invoiceLine.set_ValueNoCheck("SAP_ExpenseCode_ID", inoutLine.get_Value("SAP_ExpenseCode_ID") != null ? inoutLine.get_ValueAsInt("SAP_ExpenseCode_ID") : null);
|
||||
invoiceLine.set_ValueNoCheck("C_Project_ID", inoutLine.get_Value("C_Project_ID") != null ? inoutLine.get_ValueAsInt("C_Project_ID") : null);
|
||||
invoiceLine.set_ValueNoCheck("C_ProjectPhase_ID", inoutLine.get_Value("C_ProjectPhase_ID") != null ? inoutLine.get_ValueAsInt("C_ProjectPhase_ID") : null);
|
||||
}
|
||||
}
|
||||
else {
|
||||
log.fine("No Receipt Line");
|
||||
|
|
@ -538,10 +542,12 @@ public abstract class MID_CreateFromInvoice extends CreateFrom {
|
|||
if (orderLine != null)
|
||||
{
|
||||
invoiceLine.setOrderLine(orderLine); // overwrites
|
||||
invoiceLine.set_ValueNoCheck("Construction_C_Order_ID", orderLine.get_Value("Construction_C_Order_ID") != null ? orderLine.get_ValueAsInt("Construction_C_Order_ID") : null);
|
||||
invoiceLine.set_ValueNoCheck("SAP_ExpenseCode_ID", orderLine.get_Value("SAP_ExpenseCode_ID") != null ? orderLine.get_ValueAsInt("SAP_ExpenseCode_ID") : null);
|
||||
invoiceLine.set_ValueNoCheck("C_Project_ID", orderLine.get_Value("C_Project_ID") != null ? orderLine.get_ValueAsInt("C_Project_ID") : null);
|
||||
invoiceLine.set_ValueNoCheck("C_ProjectPhase_ID", orderLine.get_Value("C_ProjectPhase_ID") != null ? orderLine.get_ValueAsInt("C_ProjectPhase_ID") : null);
|
||||
if(org.get_ValueAsBoolean("IsProjectBased")) {
|
||||
invoiceLine.set_ValueNoCheck("Construction_C_Order_ID", orderLine.get_Value("Construction_C_Order_ID") != null ? orderLine.get_ValueAsInt("Construction_C_Order_ID") : null);
|
||||
invoiceLine.set_ValueNoCheck("SAP_ExpenseCode_ID", orderLine.get_Value("SAP_ExpenseCode_ID") != null ? orderLine.get_ValueAsInt("SAP_ExpenseCode_ID") : null);
|
||||
invoiceLine.set_ValueNoCheck("C_Project_ID", orderLine.get_Value("C_Project_ID") != null ? orderLine.get_ValueAsInt("C_Project_ID") : null);
|
||||
invoiceLine.set_ValueNoCheck("C_ProjectPhase_ID", orderLine.get_Value("C_ProjectPhase_ID") != null ? orderLine.get_ValueAsInt("C_ProjectPhase_ID") : null);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import org.compiere.model.GridTab;
|
|||
import org.compiere.model.MInvoiceLine;
|
||||
import org.compiere.model.MOrder;
|
||||
import org.compiere.model.MOrderLine;
|
||||
import org.compiere.model.MOrg;
|
||||
import org.compiere.model.MPriceList;
|
||||
import org.compiere.model.MProductPricing;
|
||||
import org.compiere.model.MRequisition;
|
||||
|
|
@ -39,6 +40,7 @@ public class MID_CreateFromOrder extends CreateFrom {
|
|||
*/
|
||||
|
||||
public String desc = "";
|
||||
MOrg org = new MOrg(Env.getCtx(), Env.getAD_Org_ID(Env.getCtx()), null);
|
||||
|
||||
public MID_CreateFromOrder(GridTab mTab) {
|
||||
super(mTab);
|
||||
|
|
@ -214,9 +216,9 @@ public class MID_CreateFromOrder extends CreateFrom {
|
|||
// Add By animfalahuddin
|
||||
StringBuilder project = new StringBuilder(" AND true");
|
||||
|
||||
if(order.getC_Project() != null && order.getC_Project_ID() > 0) {
|
||||
if(order.getC_Project_ID() > 0 && org.get_ValueAsBoolean("IsProjectBased")) {
|
||||
project = new StringBuilder(" AND r.C_Project_ID = " + order.getC_Project_ID());
|
||||
} else {
|
||||
} else if (org.get_ValueAsBoolean("IsProjectBased")) {
|
||||
project = new StringBuilder(" AND r.C_Project_ID is null");
|
||||
}
|
||||
|
||||
|
|
@ -276,9 +278,9 @@ public class MID_CreateFromOrder extends CreateFrom {
|
|||
// Add By @animfalahuddin
|
||||
StringBuilder project = new StringBuilder(" AND true");
|
||||
|
||||
if(order.getC_Project_ID() > 0) {
|
||||
if(order.getC_Project_ID() > 0 && org.get_ValueAsBoolean("IsProjectBased")) {
|
||||
project = new StringBuilder(" AND r.C_Project_ID = " + order.getC_Project_ID());
|
||||
} else {
|
||||
} else if (org.get_ValueAsBoolean("IsProjectBased")) {
|
||||
project = new StringBuilder(" AND r.C_Project_ID is null");
|
||||
}
|
||||
|
||||
|
|
@ -463,10 +465,12 @@ public class MID_CreateFromOrder extends CreateFrom {
|
|||
// orderLine.set_ValueOfColumn("Comments", reqLine.get_Value("Comments"));
|
||||
|
||||
// Add By @animfalahuddin
|
||||
orderLine.set_ValueNoCheck("Construction_C_Order_ID", reqLine.get_Value("Construction_C_Order_ID") != null ? reqLine.get_ValueAsInt("Construction_C_Order_ID") : null);
|
||||
orderLine.set_ValueNoCheck("SAP_ExpenseCode_ID", reqLine.get_Value("SAP_ExpenseCode_ID") != null ? reqLine.get_ValueAsInt("SAP_ExpenseCode_ID") : null);
|
||||
orderLine.set_ValueNoCheck("C_Project_ID", reqLine.get_Value("C_Project_ID") != null ? reqLine.get_ValueAsInt("C_Project_ID") : null);
|
||||
orderLine.set_ValueNoCheck("C_ProjectPhase_ID", reqLine.get_Value("C_ProjectPhase_ID") != null ? reqLine.get_ValueAsInt("C_ProjectPhase_ID") : null);
|
||||
if(org.get_ValueAsBoolean("IsProjectBased")) {
|
||||
orderLine.set_ValueNoCheck("Construction_C_Order_ID", reqLine.get_Value("Construction_C_Order_ID") != null ? reqLine.get_ValueAsInt("Construction_C_Order_ID") : null);
|
||||
orderLine.set_ValueNoCheck("SAP_ExpenseCode_ID", reqLine.get_Value("SAP_ExpenseCode_ID") != null ? reqLine.get_ValueAsInt("SAP_ExpenseCode_ID") : null);
|
||||
orderLine.set_ValueNoCheck("C_Project_ID", reqLine.get_Value("C_Project_ID") != null ? reqLine.get_ValueAsInt("C_Project_ID") : null);
|
||||
orderLine.set_ValueNoCheck("C_ProjectPhase_ID", reqLine.get_Value("C_ProjectPhase_ID") != null ? reqLine.get_ValueAsInt("C_ProjectPhase_ID") : null);
|
||||
}
|
||||
|
||||
if(!orderLine.save()){
|
||||
// String sqlDelete = "DELETE FROM C_OrderLine WHERE C_Order_ID=?";
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ import org.compiere.model.MInvoiceLine;
|
|||
import org.compiere.model.MLocator;
|
||||
import org.compiere.model.MOrder;
|
||||
import org.compiere.model.MOrderLine;
|
||||
import org.compiere.model.MOrg;
|
||||
import org.compiere.model.MProduct;
|
||||
import org.compiere.model.MRMA;
|
||||
import org.compiere.model.MRMALine;
|
||||
|
|
@ -61,6 +62,8 @@ public abstract class MID_CreateFromShipment extends CreateFrom
|
|||
/** Loaded RMA */
|
||||
private MRMA m_rma = null;
|
||||
private int defaultLocator_ID=0;
|
||||
|
||||
MOrg org = new MOrg(Env.getCtx(), Env.getAD_Org_ID(Env.getCtx()), null);
|
||||
|
||||
/**
|
||||
* Protected Constructor
|
||||
|
|
@ -132,9 +135,9 @@ public abstract class MID_CreateFromShipment extends CreateFrom
|
|||
|
||||
StringBuilder project = new StringBuilder(" AND true");
|
||||
|
||||
if(C_Project_ID > 0) {
|
||||
if(C_Project_ID > 0 && org.get_ValueAsBoolean("IsProjectBased")) {
|
||||
project = new StringBuilder(" AND i.C_Project_ID = " + C_Project_ID);
|
||||
} else {
|
||||
} else if(org.get_ValueAsBoolean("IsProjectBased")) {
|
||||
project = new StringBuilder(" AND i.C_Project_ID is null");
|
||||
}
|
||||
|
||||
|
|
@ -199,9 +202,9 @@ public abstract class MID_CreateFromShipment extends CreateFrom
|
|||
|
||||
StringBuilder project = new StringBuilder(" AND true");
|
||||
|
||||
if(C_Project_ID > 0) {
|
||||
if(C_Project_ID > 0 && org.get_ValueAsBoolean("IsProjectBased")) {
|
||||
project = new StringBuilder(" AND o.C_Project_ID = " + C_Project_ID);
|
||||
} else {
|
||||
} else if(org.get_ValueAsBoolean("IsProjectBased")) {
|
||||
project = new StringBuilder(" AND o.C_Project_ID is null");
|
||||
}
|
||||
|
||||
|
|
@ -725,10 +728,12 @@ public abstract class MID_CreateFromShipment extends CreateFrom
|
|||
iol.setAD_OrgTrx_ID(ol.getAD_OrgTrx_ID());
|
||||
iol.setUser1_ID(ol.getUser1_ID());
|
||||
iol.setUser2_ID(ol.getUser2_ID());
|
||||
iol.set_ValueNoCheck("Construction_C_Order_ID", ol.get_Value("Construction_C_Order_ID") != null ? ol.get_ValueAsInt("Construction_C_Order_ID") : null);
|
||||
iol.set_ValueNoCheck("SAP_ExpenseCode_ID", ol.get_Value("SAP_ExpenseCode_ID") != null ? ol.get_ValueAsInt("SAP_ExpenseCode_ID") : null);
|
||||
iol.set_ValueNoCheck("C_Project_ID", ol.get_Value("C_Project_ID") != null ? ol.get_ValueAsInt("C_Project_ID") : null);
|
||||
iol.set_ValueNoCheck("C_ProjectPhase_ID", ol.get_Value("C_ProjectPhase_ID") != null ? ol.get_ValueAsInt("C_ProjectPhase_ID") : null);
|
||||
if(org.get_ValueAsBoolean("IsProjectBased")) {
|
||||
iol.set_ValueNoCheck("Construction_C_Order_ID", ol.get_Value("Construction_C_Order_ID") != null ? ol.get_ValueAsInt("Construction_C_Order_ID") : null);
|
||||
iol.set_ValueNoCheck("SAP_ExpenseCode_ID", ol.get_Value("SAP_ExpenseCode_ID") != null ? ol.get_ValueAsInt("SAP_ExpenseCode_ID") : null);
|
||||
iol.set_ValueNoCheck("C_Project_ID", ol.get_Value("C_Project_ID") != null ? ol.get_ValueAsInt("C_Project_ID") : null);
|
||||
iol.set_ValueNoCheck("C_ProjectPhase_ID", ol.get_Value("C_ProjectPhase_ID") != null ? ol.get_ValueAsInt("C_ProjectPhase_ID") : null);
|
||||
}
|
||||
}
|
||||
else if (il != null)
|
||||
{
|
||||
|
|
@ -748,10 +753,13 @@ public abstract class MID_CreateFromShipment extends CreateFrom
|
|||
iol.setAD_OrgTrx_ID(il.getAD_OrgTrx_ID());
|
||||
iol.setUser1_ID(il.getUser1_ID());
|
||||
iol.setUser2_ID(il.getUser2_ID());
|
||||
iol.set_ValueNoCheck("Construction_C_Order_ID", il.get_Value("Construction_C_Order_ID") != null ? il.get_ValueAsInt("Construction_C_Order_ID") : null);
|
||||
iol.set_ValueNoCheck("SAP_ExpenseCode_ID", il.get_Value("SAP_ExpenseCode_ID") != null ? il.get_ValueAsInt("SAP_ExpenseCode_ID") : null);
|
||||
iol.set_ValueNoCheck("C_Project_ID", il.get_Value("C_Project_ID") != null ? il.get_ValueAsInt("C_Project_ID") : null);
|
||||
iol.set_ValueNoCheck("C_ProjectPhase_ID", il.get_Value("C_ProjectPhase_ID") != null ? il.get_ValueAsInt("C_ProjectPhase_ID") : null);
|
||||
if(org.get_ValueAsBoolean("IsProjectBased")) {
|
||||
iol.set_ValueNoCheck("Construction_C_Order_ID", il.get_Value("Construction_C_Order_ID") != null ? il.get_ValueAsInt("Construction_C_Order_ID") : null);
|
||||
iol.set_ValueNoCheck("SAP_ExpenseCode_ID", il.get_Value("SAP_ExpenseCode_ID") != null ? il.get_ValueAsInt("SAP_ExpenseCode_ID") : null);
|
||||
iol.set_ValueNoCheck("C_Project_ID", il.get_Value("C_Project_ID") != null ? il.get_ValueAsInt("C_Project_ID") : null);
|
||||
iol.set_ValueNoCheck("C_ProjectPhase_ID", il.get_Value("C_ProjectPhase_ID") != null ? il.get_ValueAsInt("C_ProjectPhase_ID") : null);
|
||||
}
|
||||
|
||||
}
|
||||
else if (M_RMALine_ID != 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue