Package org.compiere.model
Class MConversionRateUtil
- java.lang.Object
-
- org.compiere.model.MConversionRateUtil
-
public final class MConversionRateUtil extends Object
- Author:
- Teo Sarca, SC ARHIPAC SERVICE SRL
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BigDecimal
convertBase(SetGetModel model, String DateName, String SourceAmtName, String AmtName, String changedColumnName)
Convert an amount to base currency and update model fields (CurrencyRate, "AmtName").static String
getErrorMessage(Properties ctx, String adMessage, int currencyFromID, int currencyToID, int convertionTypeID, Timestamp date, String trxName)
Return the message to show when no exchange rate is found
-
-
-
Method Detail
-
convertBase
public static BigDecimal convertBase(SetGetModel model, String DateName, String SourceAmtName, String AmtName, String changedColumnName)
Convert an amount to base currency and update model fields (CurrencyRate, "AmtName").- Parameters:
model
-DateName
- conversion date field nameSourceAmtName
- source amount field nameAmtName
- converted amount field name (optional); if null then the converted amount field will not be updatedchangedColumnName
- the column that has changed (the controller); optional- Returns:
- converted amount or null if error
-
getErrorMessage
public static String getErrorMessage(Properties ctx, String adMessage, int currencyFromID, int currencyToID, int convertionTypeID, Timestamp date, String trxName)
Return the message to show when no exchange rate is found
-
-