IDEMPIERE-5787 Print Dunning Letters doesn't work with multi-language (#1918)
This commit is contained in:
parent
2db4184a5d
commit
a0f1793719
|
@ -34,6 +34,8 @@ import org.compiere.print.MPrintFormat;
|
|||
import org.compiere.print.ReportEngine;
|
||||
import org.compiere.util.AdempiereUserError;
|
||||
import org.compiere.util.EMail;
|
||||
import org.compiere.util.Language;
|
||||
import org.compiere.util.Util;
|
||||
|
||||
/**
|
||||
* Dunning Letter Print
|
||||
|
@ -171,8 +173,13 @@ public class DunningPrint extends SvrProcess
|
|||
StringBuilder msginfo = new StringBuilder().append(bp.getName()).append(", Amt=").append(entry.getAmt());
|
||||
info.setDescription(msginfo.toString());
|
||||
ReportEngine re = null;
|
||||
if (format != null)
|
||||
if (format != null) {
|
||||
Language lang = client.getLanguage();
|
||||
if (!Util.isEmpty(bp.getAD_Language()))
|
||||
lang = Language.getLanguage(bp.getAD_Language());
|
||||
format.setLanguage(lang);
|
||||
re = new ReportEngine(getCtx(), format, query, info);
|
||||
}
|
||||
boolean printed = false;
|
||||
if (p_EMailPDF)
|
||||
{
|
||||
|
|
|
@ -38,6 +38,8 @@ import org.compiere.process.ProcessInfoParameter;
|
|||
import org.compiere.process.SvrProcess;
|
||||
import org.compiere.util.AdempiereUserError;
|
||||
import org.compiere.util.EMail;
|
||||
import org.compiere.util.Language;
|
||||
import org.compiere.util.Util;
|
||||
|
||||
/**
|
||||
* Dunning Letter Print
|
||||
|
@ -178,8 +180,13 @@ public class DunningPrint extends SvrProcess
|
|||
StringBuilder msginfo = new StringBuilder().append(bp.getName()).append(", Amt=").append(entry.getAmt());
|
||||
info.setDescription(msginfo.toString());
|
||||
ReportEngine re = null;
|
||||
if (format != null)
|
||||
if (format != null) {
|
||||
Language lang = client.getLanguage();
|
||||
if (!Util.isEmpty(bp.getAD_Language()))
|
||||
lang = Language.getLanguage(bp.getAD_Language());
|
||||
format.setLanguage(lang);
|
||||
re = new ReportEngine(getCtx(), format, query, info);
|
||||
}
|
||||
boolean printed = false;
|
||||
if (p_EMailPDF)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue