IDEMPIERE-4429 BOM Drop to Invoice is throwing error (#228)

IDEMPIERE-1314 getDocumentInfo methods should return translated String
This commit is contained in:
Carlos Ruiz 2020-08-26 09:49:22 +02:00 committed by GitHub
parent 75dcde96b3
commit 02f4d526dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -1143,7 +1143,12 @@ public class MInvoice extends X_C_Invoice implements DocAction
*/
public String getDocumentInfo()
{
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
MDocType dt;
if (getC_DocType_ID() == 0) {
dt = MDocType.get(getCtx(), getC_DocTypeTarget_ID());
} else {
dt = MDocType.get(getCtx(), getC_DocType_ID());
}
StringBuilder msgreturn = new StringBuilder().append(dt.getNameTrl()).append(" ").append(getDocumentNo());
return msgreturn.toString();
} // getDocumentInfo