diff --git a/org.adempiere.base/src/org/compiere/acct/DocLine_Allocation.java b/org.adempiere.base/src/org/compiere/acct/DocLine_Allocation.java index d61a4b5082..0b9498600f 100644 --- a/org.adempiere.base/src/org/compiere/acct/DocLine_Allocation.java +++ b/org.adempiere.base/src/org/compiere/acct/DocLine_Allocation.java @@ -53,6 +53,14 @@ public class DocLine_Allocation extends DocLine m_DiscountAmt = line.getDiscountAmt(); m_WriteOffAmt = line.getWriteOffAmt(); m_OverUnderAmt = line.getOverUnderAmt(); + + // Get Payment Conversion Rate + if (line.getC_Payment_ID() != 0) + { + MPayment payment = new MPayment (doc.getCtx(), line.getC_Payment_ID(), doc.getTrxName()); + int C_ConversionType_ID = payment.getC_ConversionType_ID(); + this.setC_ConversionType_ID(C_ConversionType_ID); + } } // DocLine_Allocation private int m_C_Invoice_ID; diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java b/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java index 278921afa8..6934a93025 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java @@ -100,14 +100,6 @@ public class Doc_AllocationHdr extends Doc { MAllocationLine line = lines[i]; DocLine_Allocation docLine = new DocLine_Allocation(line, this); - - // Get Payment Conversion Rate - if (line.getC_Payment_ID() != 0) - { - MPayment payment = new MPayment (getCtx(), line.getC_Payment_ID(), getTrxName()); - int C_ConversionType_ID = payment.getC_ConversionType_ID(); - docLine.setC_ConversionType_ID(C_ConversionType_ID); - } // if (log.isLoggable(Level.FINE)) log.fine(docLine.toString()); list.add (docLine); diff --git a/org.adempiere.base/src/org/compiere/acct/FactLine.java b/org.adempiere.base/src/org/compiere/acct/FactLine.java index 76890e035f..45c2bc6318 100644 --- a/org.adempiere.base/src/org/compiere/acct/FactLine.java +++ b/org.adempiere.base/src/org/compiere/acct/FactLine.java @@ -728,7 +728,7 @@ public final class FactLine extends X_Fact_Acct Timestamp convDate = getDateAcct(); - if ( m_doc instanceof Doc_BankStatement || m_doc instanceof Doc_AllocationHdr ) + if ( m_docLine != null && ( m_doc instanceof Doc_BankStatement || m_doc instanceof Doc_AllocationHdr ) ) convDate = m_docLine.getDateConv();