diff --git a/org.adempiere.base/src/org/compiere/model/MInvoice.java b/org.adempiere.base/src/org/compiere/model/MInvoice.java index 1be6a7be87..2b5e4f9c4f 100644 --- a/org.adempiere.base/src/org/compiere/model/MInvoice.java +++ b/org.adempiere.base/src/org/compiere/model/MInvoice.java @@ -1733,10 +1733,16 @@ public class MInvoice extends X_C_Invoice implements DocAction m_processMsg = "@NoAccountOrgCurrency@"; return DocAction.STATUS_Invalid; } - - MDocType[] doctypes = MDocType.getOfDocBaseType(getCtx(), MDocType.DOCBASETYPE_ARReceipt); + + String docBaseType = ""; + if (isSOTrx()) + docBaseType=MDocType.DOCBASETYPE_ARReceipt; + else + docBaseType=MDocType.DOCBASETYPE_APPayment; + + MDocType[] doctypes = MDocType.getOfDocBaseType(getCtx(), docBaseType); if (doctypes == null || doctypes.length == 0) { - m_processMsg = "No document type for AR Receipt"; + m_processMsg = "No document type "; return DocAction.STATUS_Invalid; } MDocType doctype = null;