merge from 11305 revision
FR 1948157 - Is necessary the reference for document reverse - fix the reversal_ID before preparing as it's needed to know the reversal_ID in model validators - change isReversal to public in MInOut Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=1948157
This commit is contained in:
parent
4dcfc53d39
commit
3c456c93ff
|
@ -54,8 +54,7 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 1925611141368881643L;
|
private static final long serialVersionUID = 727186799622809208L;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create Shipment From Order
|
* Create Shipment From Order
|
||||||
|
@ -760,7 +759,7 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
* Is Reversal
|
* Is Reversal
|
||||||
* @return reversal
|
* @return reversal
|
||||||
*/
|
*/
|
||||||
private boolean isReversal()
|
public boolean isReversal()
|
||||||
{
|
{
|
||||||
return m_reversal;
|
return m_reversal;
|
||||||
} // isReversal
|
} // isReversal
|
||||||
|
@ -2025,6 +2024,9 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
// Set M_RMA_ID
|
// Set M_RMA_ID
|
||||||
reversal.setM_RMA_ID(getM_RMA_ID());
|
reversal.setM_RMA_ID(getM_RMA_ID());
|
||||||
reversal.addDescription("{->" + getDocumentNo() + ")");
|
reversal.addDescription("{->" + getDocumentNo() + ")");
|
||||||
|
//FR1948157
|
||||||
|
reversal.setReversal_ID(getM_InOut_ID());
|
||||||
|
reversal.saveEx(get_TrxName());
|
||||||
//
|
//
|
||||||
if (!reversal.processIt(DocAction.ACTION_Complete)
|
if (!reversal.processIt(DocAction.ACTION_Complete)
|
||||||
|| !reversal.getDocStatus().equals(DocAction.STATUS_Completed))
|
|| !reversal.getDocStatus().equals(DocAction.STATUS_Completed))
|
||||||
|
@ -2033,12 +2035,10 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
reversal.closeIt();
|
reversal.closeIt();
|
||||||
//FR1948157
|
|
||||||
reversal.setReversal_ID(getM_InOut_ID());
|
|
||||||
reversal.setProcessing (false);
|
reversal.setProcessing (false);
|
||||||
reversal.setDocStatus(DOCSTATUS_Reversed);
|
reversal.setDocStatus(DOCSTATUS_Reversed);
|
||||||
reversal.setDocAction(DOCACTION_None);
|
reversal.setDocAction(DOCACTION_None);
|
||||||
reversal.save(get_TrxName());
|
reversal.saveEx(get_TrxName());
|
||||||
//
|
//
|
||||||
addDescription("(" + reversal.getDocumentNo() + "<-)");
|
addDescription("(" + reversal.getDocumentNo() + "<-)");
|
||||||
|
|
||||||
|
|
|
@ -2114,6 +2114,9 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
||||||
}
|
}
|
||||||
reversal.setC_Order_ID(getC_Order_ID());
|
reversal.setC_Order_ID(getC_Order_ID());
|
||||||
reversal.addDescription("{->" + getDocumentNo() + ")");
|
reversal.addDescription("{->" + getDocumentNo() + ")");
|
||||||
|
//FR1948157
|
||||||
|
reversal.setReversal_ID(getC_Invoice_ID());
|
||||||
|
reversal.saveEx(get_TrxName());
|
||||||
//
|
//
|
||||||
if (!reversal.processIt(DocAction.ACTION_Complete))
|
if (!reversal.processIt(DocAction.ACTION_Complete))
|
||||||
{
|
{
|
||||||
|
@ -2121,14 +2124,12 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
reversal.setC_Payment_ID(0);
|
reversal.setC_Payment_ID(0);
|
||||||
//FR1948157
|
|
||||||
reversal.setReversal_ID(getC_Invoice_ID());
|
|
||||||
reversal.setIsPaid(true);
|
reversal.setIsPaid(true);
|
||||||
reversal.closeIt();
|
reversal.closeIt();
|
||||||
reversal.setProcessing (false);
|
reversal.setProcessing (false);
|
||||||
reversal.setDocStatus(DOCSTATUS_Reversed);
|
reversal.setDocStatus(DOCSTATUS_Reversed);
|
||||||
reversal.setDocAction(DOCACTION_None);
|
reversal.setDocAction(DOCACTION_None);
|
||||||
reversal.save(get_TrxName());
|
reversal.saveEx(get_TrxName());
|
||||||
m_processMsg = reversal.getDocumentNo();
|
m_processMsg = reversal.getDocumentNo();
|
||||||
//
|
//
|
||||||
addDescription("(" + reversal.getDocumentNo() + "<-)");
|
addDescription("(" + reversal.getDocumentNo() + "<-)");
|
||||||
|
|
|
@ -641,7 +641,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
|
||||||
reverse.setDescription(description);
|
reverse.setDescription(description);
|
||||||
//[ 1948157 ]
|
//[ 1948157 ]
|
||||||
reverse.setReversal_ID(getGL_JournalBatch_ID());
|
reverse.setReversal_ID(getGL_JournalBatch_ID());
|
||||||
reverse.save();
|
reverse.saveEx();
|
||||||
//
|
//
|
||||||
|
|
||||||
// Reverse Journals
|
// Reverse Journals
|
||||||
|
|
|
@ -2372,7 +2372,7 @@ public final class MPayment extends X_C_Payment
|
||||||
reversal.addDescription("{->" + getDocumentNo() + ")");
|
reversal.addDescription("{->" + getDocumentNo() + ")");
|
||||||
//FR [ 1948157 ]
|
//FR [ 1948157 ]
|
||||||
reversal.setReversal_ID(getC_Payment_ID());
|
reversal.setReversal_ID(getC_Payment_ID());
|
||||||
reversal.save(get_TrxName());
|
reversal.saveEx(get_TrxName());
|
||||||
// Post Reversal
|
// Post Reversal
|
||||||
if (!reversal.processIt(DocAction.ACTION_Complete))
|
if (!reversal.processIt(DocAction.ACTION_Complete))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue