| java.lang.Object org.ofbiz.order.finaccount.FinAccountHelper
FinAccountHelper | public class FinAccountHelper (Code) | | A package of methods for improving efficiency of financial accounts services
|
Method Summary | |
public static BigDecimal | addFirstEntryAmount(BigDecimal initialValue, List transactions, String fieldName, int decimals, int rounding) | public static boolean | checkFinAccountNumber(String number) | public static String | generateRandomFinNumber(GenericDelegator delegator, int length, boolean isId) | public static BigDecimal | getAvailableBalance(String finAccountId, Timestamp asOfDateTime, GenericDelegator delegator) | public static BigDecimal | getBalance(String finAccountId, Timestamp asOfDateTime, GenericDelegator delegator) | public static GenericValue | getFinAccountFromCode(String finAccountCode, GenericDelegator delegator) | public static String | getNewFinAccountCode(int codeLength, GenericDelegator delegator) | public static boolean | validateFinAccount(GenericValue finAccount) | public static boolean | validatePin(GenericDelegator delegator, String finAccountId, String pinNumber) |
char_pool | static char[] char_pool(Code) | | |
decimals | public static int decimals(Code) | | A word on precision: since we're just adding and subtracting, the interim figures should have one more decimal place of precision than the final numbers.
|
defaultPinRequired | final public static boolean defaultPinRequired(Code) | | |
giftCertFinAccountTypeId | final public static String giftCertFinAccountTypeId(Code) | | |
rounding | public static int rounding(Code) | | |
addFirstEntryAmount | public static BigDecimal addFirstEntryAmount(BigDecimal initialValue, List transactions, String fieldName, int decimals, int rounding) throws GenericEntityException(Code) | | A convenience method which adds transactions.get(0).get(fieldName) to initialValue, all done in BigDecimal to decimals and rounding
Parameters: initialValue - Parameters: transactions - Parameters: fieldName - Parameters: decimals - Parameters: rounding - throws: GenericEntityException - |
checkFinAccountNumber | public static boolean checkFinAccountNumber(String number)(Code) | | |
generateRandomFinNumber | public static String generateRandomFinNumber(GenericDelegator delegator, int length, boolean isId) throws GenericEntityException(Code) | | Parameters: delegator - Parameters: length - length of the number to generate (up to 19 digits) Parameters: isId - to be used as an ID (will check the DB to make sure it doesn't already exist) String generated number throws: GenericEntityException - |
getNewFinAccountCode | public static String getNewFinAccountCode(int codeLength, GenericDelegator delegator) throws GenericEntityException(Code) | | Returns a unique randomly generated account code for FinAccount.finAccountCode composed of uppercase letters and numbers
Parameters: codeLength - length of code in number of characters Parameters: delegator - throws: GenericEntityException - |
validatePin | public static boolean validatePin(GenericDelegator delegator, String finAccountId, String pinNumber)(Code) | | Validates a FinAccount's PIN number
Parameters: delegator - Parameters: finAccountId - Parameters: pinNumber - true if the bin is valid |
|
|