IDEMPIERE-2588 Immediate posting of a cash POS Order is not posting allocation
This commit is contained in:
parent
b69fee8c91
commit
dd252d2bd7
|
@ -1765,6 +1765,9 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
|||
payment.saveEx();
|
||||
info.append("@C_Payment_ID@: " + payment.getDocumentInfo());
|
||||
|
||||
// IDEMPIERE-2588 - add the allocation generation with the payment
|
||||
if (payment.getJustCreatedAllocInv() != null)
|
||||
addDocsPostProcess(payment.getJustCreatedAllocInv());
|
||||
} // Payment
|
||||
|
||||
// Update Order & Match
|
||||
|
|
|
@ -83,7 +83,7 @@ public class MPayment extends X_C_Payment
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -7646717328867858897L;
|
||||
private static final long serialVersionUID = -7179638016937305380L;
|
||||
|
||||
/**
|
||||
* Get Payments Of BPartner
|
||||
|
@ -2303,6 +2303,7 @@ public class MPayment extends X_C_Payment
|
|||
throw new AdempiereException("Failed when processing document - " + alloc.getProcessMsg());
|
||||
// end added
|
||||
alloc.saveEx(get_TrxName());
|
||||
m_justCreatedAllocInv = alloc;
|
||||
m_processMsg = "@C_AllocationHdr_ID@: " + alloc.getDocumentNo();
|
||||
|
||||
// Get Project from Invoice
|
||||
|
@ -2997,5 +2998,11 @@ public class MPayment extends X_C_Payment
|
|||
|
||||
return MPaymentTransaction.getAllIDs(Table_Name, whereClause.toString(), trxName);
|
||||
}
|
||||
|
||||
// IDEMPIERE-2588
|
||||
private MAllocationHdr m_justCreatedAllocInv = null;
|
||||
public MAllocationHdr getJustCreatedAllocInv() {
|
||||
return m_justCreatedAllocInv;
|
||||
}
|
||||
|
||||
} // MPayment
|
||||
|
|
|
@ -316,7 +316,7 @@ public class DocumentEngine implements DocAction
|
|||
if (m_document != null && ok)
|
||||
{
|
||||
// PostProcess documents when invoice or inout (this is to postprocess the generated MatchPO and MatchInv if any)
|
||||
ArrayList<PO> docsPostProcess = new ArrayList<PO>();;
|
||||
ArrayList<PO> docsPostProcess = new ArrayList<PO>();
|
||||
if (m_document instanceof MInvoice || m_document instanceof MInOut) {
|
||||
if (m_document instanceof MInvoice) {
|
||||
docsPostProcess = ((MInvoice) m_document).getDocsPostProcess();
|
||||
|
|
Loading…
Reference in New Issue