IDEMPIERE-2731 Modify Access Modifiers of MInOut and MOrder properties and Methods
This commit is contained in:
parent
27a8811d5f
commit
f05a59eeab
|
@ -63,8 +63,7 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = -239302197968535277L;
|
private static final long serialVersionUID = 1226522383231204912L;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create Shipment From Order
|
* Create Shipment From Order
|
||||||
|
@ -541,11 +540,11 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
|
|
||||||
|
|
||||||
/** Lines */
|
/** Lines */
|
||||||
private MInOutLine[] m_lines = null;
|
protected MInOutLine[] m_lines = null;
|
||||||
/** Confirmations */
|
/** Confirmations */
|
||||||
private MInOutConfirm[] m_confirms = null;
|
protected MInOutConfirm[] m_confirms = null;
|
||||||
/** BPartner */
|
/** BPartner */
|
||||||
private MBPartner m_partner = null;
|
protected MBPartner m_partner = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -781,13 +780,13 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
} // copyLinesFrom
|
} // copyLinesFrom
|
||||||
|
|
||||||
/** Reversal Flag */
|
/** Reversal Flag */
|
||||||
private boolean m_reversal = false;
|
protected boolean m_reversal = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set Reversal
|
* Set Reversal
|
||||||
* @param reversal reversal
|
* @param reversal reversal
|
||||||
*/
|
*/
|
||||||
private void setReversal(boolean reversal)
|
protected void setReversal(boolean reversal)
|
||||||
{
|
{
|
||||||
m_reversal = reversal;
|
m_reversal = reversal;
|
||||||
} // setReversal
|
} // setReversal
|
||||||
|
@ -955,7 +954,7 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
MInOutConfirm.create (this, MInOutConfirm.CONFIRMTYPE_ShipReceiptConfirm, true);
|
MInOutConfirm.create (this, MInOutConfirm.CONFIRMTYPE_ShipReceiptConfirm, true);
|
||||||
} // createConfirmation
|
} // createConfirmation
|
||||||
|
|
||||||
private void voidConfirmations()
|
protected void voidConfirmations()
|
||||||
{
|
{
|
||||||
for(MInOutConfirm confirm : getConfirmations(true))
|
for(MInOutConfirm confirm : getConfirmations(true))
|
||||||
{
|
{
|
||||||
|
@ -1079,9 +1078,9 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
} // process
|
} // process
|
||||||
|
|
||||||
/** Process Message */
|
/** Process Message */
|
||||||
private String m_processMsg = null;
|
protected String m_processMsg = null;
|
||||||
/** Just Prepared Flag */
|
/** Just Prepared Flag */
|
||||||
private boolean m_justPrepared = false;
|
protected boolean m_justPrepared = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unlock Document.
|
* Unlock Document.
|
||||||
|
@ -1664,7 +1663,7 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
/* Save array of documents to process AFTER completing this one */
|
/* Save array of documents to process AFTER completing this one */
|
||||||
ArrayList<PO> docsPostProcess = new ArrayList<PO>();
|
ArrayList<PO> docsPostProcess = new ArrayList<PO>();
|
||||||
|
|
||||||
private void addDocsPostProcess(PO doc) {
|
protected void addDocsPostProcess(PO doc) {
|
||||||
docsPostProcess.add(doc);
|
docsPostProcess.add(doc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1678,7 +1677,7 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
* Based on createCounterDoc() by JJ
|
* Based on createCounterDoc() by JJ
|
||||||
* @return shipment if created else null
|
* @return shipment if created else null
|
||||||
*/
|
*/
|
||||||
private MInOut createDropShipment() {
|
protected MInOut createDropShipment() {
|
||||||
|
|
||||||
if ( isSOTrx() || !isDropShip() || getC_Order_ID() == 0 )
|
if ( isSOTrx() || !isDropShip() || getC_Order_ID() == 0 )
|
||||||
return null;
|
return null;
|
||||||
|
@ -1748,7 +1747,7 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
/**
|
/**
|
||||||
* Set the definite document number after completed
|
* Set the definite document number after completed
|
||||||
*/
|
*/
|
||||||
private void setDefiniteDocumentNo() {
|
protected void setDefiniteDocumentNo() {
|
||||||
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
|
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
|
||||||
if (dt.isOverwriteDateOnComplete()) {
|
if (dt.isOverwriteDateOnComplete()) {
|
||||||
setMovementDate(new Timestamp (System.currentTimeMillis()));
|
setMovementDate(new Timestamp (System.currentTimeMillis()));
|
||||||
|
@ -1768,7 +1767,7 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
* Check Material Policy
|
* Check Material Policy
|
||||||
* Sets line ASI
|
* Sets line ASI
|
||||||
*/
|
*/
|
||||||
private void checkMaterialPolicy(MInOutLine line,BigDecimal qty)
|
protected void checkMaterialPolicy(MInOutLine line,BigDecimal qty)
|
||||||
{
|
{
|
||||||
|
|
||||||
int no = MInOutLineMA.deleteInOutLineMA(line.getM_InOutLine_ID(), get_TrxName());
|
int no = MInOutLineMA.deleteInOutLineMA(line.getM_InOutLine_ID(), get_TrxName());
|
||||||
|
@ -1895,7 +1894,7 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
}
|
}
|
||||||
} // checkMaterialPolicy
|
} // checkMaterialPolicy
|
||||||
|
|
||||||
private BigDecimal autoBalanceNegative(MInOutLine line, MProduct product,BigDecimal qtyToReceive) {
|
protected BigDecimal autoBalanceNegative(MInOutLine line, MProduct product,BigDecimal qtyToReceive) {
|
||||||
MStorageOnHand[] storages = MStorageOnHand.getWarehouseNegative(getCtx(), getM_Warehouse_ID(), line.getM_Product_ID(), 0,
|
MStorageOnHand[] storages = MStorageOnHand.getWarehouseNegative(getCtx(), getM_Warehouse_ID(), line.getM_Product_ID(), 0,
|
||||||
null, MClient.MMPOLICY_FiFo.equals(product.getMMPolicy()), line.getM_Locator_ID(), get_TrxName(), false);
|
null, MClient.MMPOLICY_FiFo.equals(product.getMMPolicy()), line.getM_Locator_ID(), get_TrxName(), false);
|
||||||
|
|
||||||
|
@ -1924,7 +1923,7 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
* Create Counter Document
|
* Create Counter Document
|
||||||
* @return InOut
|
* @return InOut
|
||||||
*/
|
*/
|
||||||
private MInOut createCounterDoc()
|
protected MInOut createCounterDoc()
|
||||||
{
|
{
|
||||||
// Is this a counter doc ?
|
// Is this a counter doc ?
|
||||||
if (getRef_InOut_ID() != 0)
|
if (getRef_InOut_ID() != 0)
|
||||||
|
@ -2145,7 +2144,7 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
return true;
|
return true;
|
||||||
} // reverseCorrectionIt
|
} // reverseCorrectionIt
|
||||||
|
|
||||||
private MInOut reverse(boolean accrual) {
|
protected MInOut reverse(boolean accrual) {
|
||||||
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
|
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
|
||||||
Timestamp reversalDate = accrual ? Env.getContextAsDate(getCtx(), "#Date") : getDateAcct();
|
Timestamp reversalDate = accrual ? Env.getContextAsDate(getCtx(), "#Date") : getDateAcct();
|
||||||
if (reversalDate == null) {
|
if (reversalDate == null) {
|
||||||
|
@ -2251,7 +2250,7 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
return reversal;
|
return reversal;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean reverseMatching(Timestamp reversalDate) {
|
protected boolean reverseMatching(Timestamp reversalDate) {
|
||||||
MMatchInv[] mInv = MMatchInv.getInOut(getCtx(), getM_InOut_ID(), get_TrxName());
|
MMatchInv[] mInv = MMatchInv.getInOut(getCtx(), getM_InOut_ID(), get_TrxName());
|
||||||
for (MMatchInv mMatchInv : mInv)
|
for (MMatchInv mMatchInv : mInv)
|
||||||
{
|
{
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 6669447827539872218L;
|
private static final long serialVersionUID = -6750443365394535762L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create new Order by copying
|
* Create new Order by copying
|
||||||
|
@ -253,11 +253,11 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
} // MOrder
|
} // MOrder
|
||||||
|
|
||||||
/** Order Lines */
|
/** Order Lines */
|
||||||
private MOrderLine[] m_lines = null;
|
protected MOrderLine[] m_lines = null;
|
||||||
/** Tax Lines */
|
/** Tax Lines */
|
||||||
private MOrderTax[] m_taxes = null;
|
protected MOrderTax[] m_taxes = null;
|
||||||
/** Force Creation of order */
|
/** Force Creation of order */
|
||||||
private boolean m_forceCreation = false;
|
protected boolean m_forceCreation = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overwrite Client/Org if required
|
* Overwrite Client/Org if required
|
||||||
|
@ -1204,9 +1204,9 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
} // processIt
|
} // processIt
|
||||||
|
|
||||||
/** Process Message */
|
/** Process Message */
|
||||||
private String m_processMsg = null;
|
protected String m_processMsg = null;
|
||||||
/** Just Prepared Flag */
|
/** Just Prepared Flag */
|
||||||
private boolean m_justPrepared = false;
|
protected boolean m_justPrepared = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unlock Document.
|
* Unlock Document.
|
||||||
|
@ -1434,7 +1434,7 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
return DocAction.STATUS_InProgress;
|
return DocAction.STATUS_InProgress;
|
||||||
} // prepareIt
|
} // prepareIt
|
||||||
|
|
||||||
private boolean calculateFreightCharge()
|
protected boolean calculateFreightCharge()
|
||||||
{
|
{
|
||||||
MClientInfo ci = MClientInfo.get(getCtx(), getAD_Client_ID(), get_TrxName());
|
MClientInfo ci = MClientInfo.get(getCtx(), getAD_Client_ID(), get_TrxName());
|
||||||
if (ci.getC_ChargeFreight_ID() == 0 && ci.getM_ProductFreight_ID() == 0)
|
if (ci.getC_ChargeFreight_ID() == 0 && ci.getM_ProductFreight_ID() == 0)
|
||||||
|
@ -1574,7 +1574,7 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
* Explode non stocked BOM.
|
* Explode non stocked BOM.
|
||||||
* @return true if bom exploded
|
* @return true if bom exploded
|
||||||
*/
|
*/
|
||||||
private boolean explodeBOM()
|
protected boolean explodeBOM()
|
||||||
{
|
{
|
||||||
boolean retValue = false;
|
boolean retValue = false;
|
||||||
String where = "AND IsActive='Y' AND EXISTS "
|
String where = "AND IsActive='Y' AND EXISTS "
|
||||||
|
@ -1665,7 +1665,7 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
* @param lines order lines (ordered by M_Product_ID for deadlock prevention)
|
* @param lines order lines (ordered by M_Product_ID for deadlock prevention)
|
||||||
* @return true if (un) reserved
|
* @return true if (un) reserved
|
||||||
*/
|
*/
|
||||||
private boolean reserveStock (MDocType dt, MOrderLine[] lines)
|
protected boolean reserveStock (MDocType dt, MOrderLine[] lines)
|
||||||
{
|
{
|
||||||
if (dt == null)
|
if (dt == null)
|
||||||
dt = MDocType.get(getCtx(), getC_DocType_ID());
|
dt = MDocType.get(getCtx(), getC_DocType_ID());
|
||||||
|
@ -1788,7 +1788,7 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
* (Re) Create Pay Schedule
|
* (Re) Create Pay Schedule
|
||||||
* @return true if valid schedule
|
* @return true if valid schedule
|
||||||
*/
|
*/
|
||||||
private boolean createPaySchedule()
|
protected boolean createPaySchedule()
|
||||||
{
|
{
|
||||||
if (getC_PaymentTerm_ID() == 0)
|
if (getC_PaymentTerm_ID() == 0)
|
||||||
return false;
|
return false;
|
||||||
|
@ -1981,7 +1981,7 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private String landedCostAllocation() {
|
protected String landedCostAllocation() {
|
||||||
MOrderLandedCost[] landedCosts = MOrderLandedCost.getOfOrder(getC_Order_ID(), get_TrxName());
|
MOrderLandedCost[] landedCosts = MOrderLandedCost.getOfOrder(getC_Order_ID(), get_TrxName());
|
||||||
for(MOrderLandedCost landedCost : landedCosts) {
|
for(MOrderLandedCost landedCost : landedCosts) {
|
||||||
String error = landedCost.distributeLandedCost();
|
String error = landedCost.distributeLandedCost();
|
||||||
|
@ -1992,7 +1992,7 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private String createPOSPayments() {
|
protected String createPOSPayments() {
|
||||||
|
|
||||||
// Just for POS order with payment rule mixed
|
// Just for POS order with payment rule mixed
|
||||||
if (! this.isSOTrx())
|
if (! this.isSOTrx())
|
||||||
|
@ -2104,7 +2104,7 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
/**
|
/**
|
||||||
* Set the definite document number after completed
|
* Set the definite document number after completed
|
||||||
*/
|
*/
|
||||||
private void setDefiniteDocumentNo() {
|
protected void setDefiniteDocumentNo() {
|
||||||
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
|
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
|
||||||
if (dt.isOverwriteDateOnComplete()) {
|
if (dt.isOverwriteDateOnComplete()) {
|
||||||
/* a42niem - BF IDEMPIERE-63 - check if document has been completed before */
|
/* a42niem - BF IDEMPIERE-63 - check if document has been completed before */
|
||||||
|
@ -2132,7 +2132,7 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
* @param movementDate optional movement date (default today)
|
* @param movementDate optional movement date (default today)
|
||||||
* @return shipment or null
|
* @return shipment or null
|
||||||
*/
|
*/
|
||||||
private MInOut createShipment(MDocType dt, Timestamp movementDate)
|
protected MInOut createShipment(MDocType dt, Timestamp movementDate)
|
||||||
{
|
{
|
||||||
if (log.isLoggable(Level.INFO)) log.info("For " + dt);
|
if (log.isLoggable(Level.INFO)) log.info("For " + dt);
|
||||||
MInOut shipment = new MInOut (this, dt.getC_DocTypeShipment_ID(), movementDate);
|
MInOut shipment = new MInOut (this, dt.getC_DocTypeShipment_ID(), movementDate);
|
||||||
|
@ -2193,7 +2193,7 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
* @param invoiceDate invoice date
|
* @param invoiceDate invoice date
|
||||||
* @return invoice or null
|
* @return invoice or null
|
||||||
*/
|
*/
|
||||||
private MInvoice createInvoice (MDocType dt, MInOut shipment, Timestamp invoiceDate)
|
protected MInvoice createInvoice (MDocType dt, MInOut shipment, Timestamp invoiceDate)
|
||||||
{
|
{
|
||||||
if (log.isLoggable(Level.INFO)) log.info(dt.toString());
|
if (log.isLoggable(Level.INFO)) log.info(dt.toString());
|
||||||
MInvoice invoice = new MInvoice (this, dt.getC_DocTypeInvoice_ID(), invoiceDate);
|
MInvoice invoice = new MInvoice (this, dt.getC_DocTypeInvoice_ID(), invoiceDate);
|
||||||
|
@ -2294,7 +2294,7 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
* Create Counter Document
|
* Create Counter Document
|
||||||
* @return counter order
|
* @return counter order
|
||||||
*/
|
*/
|
||||||
private MOrder createCounterDoc()
|
protected MOrder createCounterDoc()
|
||||||
{
|
{
|
||||||
// Is this itself a counter doc ?
|
// Is this itself a counter doc ?
|
||||||
if (getRef_Order_ID() != 0)
|
if (getRef_Order_ID() != 0)
|
||||||
|
@ -2456,7 +2456,7 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
* Create Shipment/Invoice Reversals
|
* Create Shipment/Invoice Reversals
|
||||||
* @return true if success
|
* @return true if success
|
||||||
*/
|
*/
|
||||||
private boolean createReversals()
|
protected boolean createReversals()
|
||||||
{
|
{
|
||||||
// Cancel only Sales
|
// Cancel only Sales
|
||||||
if (!isSOTrx())
|
if (!isSOTrx())
|
||||||
|
@ -2787,7 +2787,7 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
} // getApprovalAmt
|
} // getApprovalAmt
|
||||||
|
|
||||||
//AZ Goodwill
|
//AZ Goodwill
|
||||||
private String deleteMatchPOCostDetail(MOrderLine line)
|
protected String deleteMatchPOCostDetail(MOrderLine line)
|
||||||
{
|
{
|
||||||
// Get Account Schemas to delete MCostDetail
|
// Get Account Schemas to delete MCostDetail
|
||||||
MAcctSchema[] acctschemas = MAcctSchema.getClientAcctSchema(getCtx(), getAD_Client_ID());
|
MAcctSchema[] acctschemas = MAcctSchema.getClientAcctSchema(getCtx(), getAD_Client_ID());
|
||||||
|
|
Loading…
Reference in New Issue