Merge a03437121c3f
This commit is contained in:
commit
ee52fd68f3
|
@ -16,6 +16,7 @@ import org.adempiere.pipo2.ElementHandler;
|
|||
import org.adempiere.pipo2.PIPOContext;
|
||||
import org.adempiere.pipo2.PackOut;
|
||||
import org.adempiere.pipo2.PoExporter;
|
||||
import org.compiere.model.MLanguage;
|
||||
import org.compiere.model.MTable;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Env;
|
||||
|
@ -52,6 +53,10 @@ public class CommonTranslationHandler extends AbstractElementHandler implements
|
|||
throw new SAXException();
|
||||
|
||||
String language = getStringValue(element, "AD_Language");
|
||||
MLanguage lang = MLanguage.get(ctx.ctx, language);
|
||||
// skip if not system installed language
|
||||
if (! lang.isSystemLanguage())
|
||||
return;
|
||||
|
||||
if (log.isLoggable(Level.INFO)) log.info(elementValue+" "+getStringValue(element, "Name"));
|
||||
|
||||
|
|
|
@ -386,8 +386,13 @@ public final class AEnv
|
|||
zoomQuery.addRestriction(column, MQuery.EQUAL, value);
|
||||
zoomQuery.setRecordCount(1); // guess
|
||||
}
|
||||
int windowId = lookup.getZoom(zoomQuery);
|
||||
zoom(windowId, zoomQuery);
|
||||
if (value instanceof Integer && ((Integer) value).intValue() >= 0 && zoomQuery != null && zoomQuery.getZoomTableName() != null) {
|
||||
int tableId = MTable.getTable_ID(zoomQuery.getZoomTableName());
|
||||
zoom(tableId, ((Integer) value).intValue());
|
||||
} else {
|
||||
int windowId = lookup.getZoom(zoomQuery);
|
||||
zoom(windowId, zoomQuery);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -23,6 +23,7 @@ import org.compiere.model.GridTab;
|
|||
import org.compiere.model.MRole;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
import org.compiere.util.Env;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -52,9 +53,21 @@ public abstract class PaymentFormOnCredit extends PaymentForm {
|
|||
/**
|
||||
* Load Payment Terms
|
||||
*/
|
||||
String ad_language = Env.getAD_Language(Env.getCtx());
|
||||
boolean isBaseLanguage = Env.isBaseLanguage(ad_language, "C_PaymentTerm");
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (isBaseLanguage) {
|
||||
sb.append("SELECT p.C_PaymentTerm_ID, p.Name FROM C_PaymentTerm p")
|
||||
.append(" WHERE p.IsActive='Y' ORDER BY p.Name");
|
||||
} else {
|
||||
sb.append("SELECT p.C_PaymentTerm_ID, pt.Name FROM C_PaymentTerm p")
|
||||
.append(" JOIN C_PaymentTerm_Trl pt ON (p.C_PaymentTerm_ID=pt.C_PaymentTerm_ID AND pt.AD_Language='")
|
||||
.append(ad_language).append("')")
|
||||
.append(" WHERE p.IsActive='Y' ORDER BY p.Name");
|
||||
}
|
||||
|
||||
String SQL = MRole.getDefault().addAccessSQL(
|
||||
"SELECT C_PaymentTerm_ID, Name FROM C_PaymentTerm WHERE IsActive='Y' ORDER BY Name",
|
||||
"C_PaymentTerm", MRole.SQL_NOTQUALIFIED, MRole.SQL_RO);
|
||||
sb.toString(), "p", MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO);
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
try
|
||||
|
|
Loading…
Reference in New Issue