public String rate(Properties ctx,int WindowNo,GridTab mTab,GridField mField,Object value){
  if (value == null)   return "";
  Integer Currency_ID=(Integer)mTab.getValue("C_Currency_ID");
  int C_Currency_ID=Currency_ID.intValue();
  Integer ConversionType_ID=(Integer)mTab.getValue("C_ConversionType_ID");
  int C_ConversionType_ID=ConversionType_ID.intValue();
  Timestamp DateAcct=(Timestamp)mTab.getValue("DateAcct");
  if (DateAcct == null)   DateAcct=new Timestamp(System.currentTimeMillis());
  int C_AcctSchema_ID=Env.getContextAsInt(ctx,WindowNo,"C_AcctSchema_ID");
  MAcctSchema as=MAcctSchema.get(ctx,C_AcctSchema_ID);
  int AD_Client_ID=Env.getContextAsInt(ctx,WindowNo,"AD_Client_ID");
  int AD_Org_ID=Env.getContextAsInt(ctx,WindowNo,"AD_Org_ID");
  BigDecimal CurrencyRate=MConversionRate.getRate(C_Currency_ID,as.getC_Currency_ID(),DateAcct,C_ConversionType_ID,AD_Client_ID,AD_Org_ID);
  log.fine("rate = " + CurrencyRate);
  if (CurrencyRate == null)   CurrencyRate=Env.ZERO;
  mTab.setValue("CurrencyRate",CurrencyRate);
  return "";
}

public String rate ( Properties ctx , int WindowNo , GridTab mTab , GridField mField , Object value ) { if ( value == null ) return "" ; Integer Currency_ID = ( Integer ) mTab . getValue ( "C_Currency_ID" ) ; int C_Currency_ID = Currency_ID . intValue ( ) ; Integer ConversionType_ID = ( Integer ) mTab . getValue ( "C_ConversionType_ID" ) ; int C_ConversionType_ID = ConversionType_ID . intValue ( ) ; Timestamp DateAcct = ( Timestamp ) mTab . getValue ( "DateAcct" ) ; if ( DateAcct == null ) DateAcct = new Timestamp ( System . currentTimeMillis ( ) ) ; int C_AcctSchema_ID = Env . getContextAsInt ( ctx , WindowNo , "C_AcctSchema_ID" ) ; MAcctSchema as = MAcctSchema . get ( ctx , C_AcctSchema_ID ) ; int AD_Client_ID = Env . getContextAsInt ( ctx , WindowNo , "AD_Client_ID" ) ; int AD_Org_ID = Env . getContextAsInt ( ctx , WindowNo , "AD_Org_ID" ) ; BigDecimal CurrencyRate = MConversionRate . getRate ( C_Currency_ID , as . getC_Currency_ID ( ) , DateAcct , C_ConversionType_ID , AD_Client_ID , AD_Org_ID ) ; log . fine ( "rate = " + CurrencyRate ) ; if ( CurrencyRate == null ) CurrencyRate = Env . ZERO ; mTab . setValue ( "CurrencyRate" , CurrencyRate ) ; return "" ; }
journal / line - rate . set currencyrate from dateacct , c_conversiontype_id , c_currency_id
