IDEMPIERE-2283 Print format - footer hardcoded idempiere instead installation name / based on patch from Nicolas Micoud (nmicoud)

This commit is contained in:
Carlos Ruiz 2015-01-29 08:34:19 -05:00
parent 1eae9f71bc
commit d7a63afd54
2 changed files with 9 additions and 3 deletions

View File

@ -42,7 +42,7 @@ public class MSysConfig extends X_AD_SysConfig
/**
*
*/
private static final long serialVersionUID = -1248226696518701944L;
private static final long serialVersionUID = 7367738851235987225L;
public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION";
public static final String ALERT_SEND_ATTACHMENT_AS_XLS = "ALERT_SEND_ATTACHMENT_AS_XLS";
@ -118,6 +118,7 @@ public class MSysConfig extends X_AD_SysConfig
public static final String RecentItems_MaxShown = "RecentItems_MaxShown";
public static final String REPORT_SWAP_MAX_ROWS = "REPORT_SWAP_MAX_ROWS";
public static final String SHIPPING_DEFAULT_WEIGHT_PER_PACKAGE = "SHIPPING_DEFAULT_WEIGHT_PER_PACKAGE";
public static final String STANDARD_REPORT_FOOTER_TRADEMARK_TEXT = "STANDARD_REPORT_FOOTER_TRADEMARK_TEXT";
public static final String START_VALUE_BPLOCATION_NAME = "START_VALUE_BPLOCATION_NAME";
public static final String SWING_LOGIN_ALLOW_REMEMBER_ME = "SWING_LOGIN_ALLOW_REMEMBER_ME";
public static final String SWING_OVERRIDE_TEXT_AREA_BEHAVIOUR = "SWING_OVERRIDE_TEXT_AREA_BEHAVIOUR";

View File

@ -59,6 +59,7 @@ import org.compiere.model.MLookupCache;
import org.compiere.model.MQuery;
import org.compiere.model.MRole;
import org.compiere.model.MSession;
import org.compiere.model.MSysConfig;
import org.compiere.model.MTable;
import org.compiere.model.MZoomCondition;
import org.compiere.model.PO;
@ -1819,8 +1820,12 @@ public final class Env
* @return trademark text for standard report footer
*/
public static String getStandardReportFooterTrademarkText() {
String s = Env.getContext(Env.getCtx(), STANDARD_REPORT_FOOTER_TRADEMARK_TEXT);
return Util.isEmpty(s) ? Adempiere.ADEMPIERE_R : s;
String s = MSysConfig.getValue(MSysConfig.STANDARD_REPORT_FOOTER_TRADEMARK_TEXT, Env.getAD_Client_ID(Env.getCtx()));
if (Util.isEmpty(s))
s = Env.getContext(Env.getCtx(), STANDARD_REPORT_FOOTER_TRADEMARK_TEXT);
if (Util.isEmpty(s))
s = Adempiere.ADEMPIERE_R;
return s;
}
public static int getZoomWindowID(MQuery query)