IDEMPIERE-3961 GL Journal - Switching accounting schema removes PERIOD
This commit is contained in:
parent
aa580a443b
commit
0d8cbeb5bc
|
@ -0,0 +1,10 @@
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- IDEMPIERE-3961 GL Journal - Switching accounting schema removes PERIOD
|
||||||
|
-- May 7, 2019, 5:20:41 PM SGT
|
||||||
|
UPDATE AD_Column SET Callout='org.compiere.model.CalloutGLJournal.acctSchema',Updated=TO_DATE('2019-05-07 17:20:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=1632
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201905071815_IDEMPIERE-3961.sql') FROM dual
|
||||||
|
;
|
|
@ -0,0 +1,7 @@
|
||||||
|
-- IDEMPIERE-3961 GL Journal - Switching accounting schema removes PERIOD
|
||||||
|
-- May 7, 2019, 5:20:41 PM SGT
|
||||||
|
UPDATE AD_Column SET Callout='org.compiere.model.CalloutGLJournal.acctSchema',Updated=TO_TIMESTAMP('2019-05-07 17:20:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=1632
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201905071815_IDEMPIERE-3961.sql') FROM dual
|
||||||
|
;
|
|
@ -294,4 +294,26 @@ public class CalloutGLJournal extends CalloutEngine
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Journal - Acct Schema
|
||||||
|
* Set Currency from C_AcctSchema_ID
|
||||||
|
* @param ctx context
|
||||||
|
* @param WindowNo window no
|
||||||
|
* @param mTab tab
|
||||||
|
* @param mField field
|
||||||
|
* @param value value
|
||||||
|
* @return null or error message
|
||||||
|
*/
|
||||||
|
public String acctSchema(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value)
|
||||||
|
{
|
||||||
|
if (value == null)
|
||||||
|
return "";
|
||||||
|
|
||||||
|
int C_AcctSchema_ID = Env.getContextAsInt(ctx, WindowNo, "C_AcctSchema_ID");
|
||||||
|
MAcctSchema as = MAcctSchema.get (ctx, C_AcctSchema_ID);
|
||||||
|
mTab.setValue("C_Currency_ID", as.getC_Currency_ID());
|
||||||
|
|
||||||
|
return "";
|
||||||
|
}
|
||||||
} // CalloutGLJournal
|
} // CalloutGLJournal
|
||||||
|
|
|
@ -2783,8 +2783,13 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
{
|
{
|
||||||
if (log.isLoggable(Level.FINE)) log.fine(columnName + " changed - "
|
if (log.isLoggable(Level.FINE)) log.fine(columnName + " changed - "
|
||||||
+ dependentField.getColumnName() + " set to null");
|
+ dependentField.getColumnName() + " set to null");
|
||||||
|
Object currentValue = dependentField.getValue();
|
||||||
|
|
||||||
// invalidate current selection
|
// invalidate current selection
|
||||||
setValue(dependentField, null);
|
setValue(dependentField, null);
|
||||||
|
|
||||||
|
if (currentValue != null && mLookup.containsKey(currentValue))
|
||||||
|
setValue(dependentField, currentValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if the field is a Virtual UI Column
|
// if the field is a Virtual UI Column
|
||||||
|
|
Loading…
Reference in New Issue