public class APRM_MatchingUtility extends Object
Constructor and Description |
---|
APRM_MatchingUtility() |
Modifier and Type | Method and Description |
---|---|
static FIN_Reconciliation |
addNewDraftReconciliation(FIN_FinancialAccount financialAccount)
Creates a new draft reconciliation for the given financial account
|
static void |
createAndMatchFinancialTransaction(String strFinancialAccountId,
String strTransactionType,
Date transactionDate,
String strFinBankStatementLineId,
Organization organization,
FIN_FinancialAccount account,
FIN_Payment payment,
String description,
GLItem glItem,
boolean isReceipt,
BigDecimal depositAmt,
BigDecimal paymentAmt,
Currency paymentCurrency,
BigDecimal convertRate,
BigDecimal sourceAmount,
Campaign campaign,
Project project,
ABCActivity activity,
SalesRegion salesRegion,
Product product,
BusinessPartner businessPartner,
UserDimension1 user1,
UserDimension2 user2,
Costcenter costcenter,
FIN_BankStatementLine bankStatementLine,
VariablesSecureApp vars,
ConnectionProvider conn,
boolean throwException)
Creates a new financial transaction from the given parameters.
|
static org.codehaus.jettison.json.JSONArray |
createMessageInProcessView(String messageSearchKey,
String msgType,
Object... messageParams)
Returns a JSONArray with a message to be shown in the process view
|
static void |
fixMixedLine(FIN_FinaccTransaction mixedLine)
Fix wrong financial transaction of a reconciliation
|
static void |
fixMixedLines(FIN_Reconciliation reconciliation)
Fix wrong financial transactions of a reconciliation.
|
static FIN_BankStatementLine |
getLockedBSL(String id) |
static org.hibernate.ScrollableResults |
getPendingToBeMatchedBankStatementLines(String strFinancialAccountId,
String strReconciliationId)
Get the bank statement lines that are not yet matched to a transaction for the given financial
account.
|
static boolean |
matchBankStatementLine(FIN_BankStatementLine _bankStatementLine,
FIN_FinaccTransaction transaction,
FIN_Reconciliation reconciliation,
String matchLevel,
boolean throwException)
Match a bank statement line with a financial account transaction.
|
static int |
matchBankStatementLine(FIN_BankStatementLine _bankStatementLine,
List<String> transactionIds,
FIN_Reconciliation reconciliation,
String matchLevel,
boolean throwException)
Improved version of
matchBankStatementLine(FIN_BankStatementLine, FIN_FinaccTransaction, FIN_Reconciliation, String, boolean)
which can handle a list of transactions for the same bank statement line. |
static OBError |
processReconciliation(String strAction,
FIN_Reconciliation reconciliation)
Process to process a reconciliation
|
static OBError |
processTransaction(VariablesSecureApp vars,
ConnectionProvider conn,
String strAction,
FIN_FinaccTransaction transaction)
It calls the Transaction Process for the given transaction and action.
|
static void |
removePayment(VariablesSecureApp vars,
ConnectionProvider conn,
FIN_Payment payment)
Removes a payment
|
static void |
removeTransaction(VariablesSecureApp vars,
ConnectionProvider conn,
FIN_FinaccTransaction transaction)
Removes a financial account transaction
|
static void |
unmatch(FIN_BankStatementLine _bsline)
Remove the match of a bank statement line with a transaction
|
static boolean |
updateReconciliation(FIN_Reconciliation reconciliation,
FIN_FinancialAccount financialAccount,
boolean process)
Updates the dates of a given reconciliation and if the process parameter is true it processes
the reconciliation
|
public static void fixMixedLines(FIN_Reconciliation reconciliation)
reconciliation
- The reconciliation whose lines are to be fixedpublic static void fixMixedLine(FIN_FinaccTransaction mixedLine)
mixedLine
- The financial transaction to be fixedpublic static OBError processReconciliation(String strAction, FIN_Reconciliation reconciliation) throws Exception
strAction
- String with the action of the process. {P, D, R}reconciliation
- Reconciliation that needs to be processedException
public static FIN_BankStatementLine getLockedBSL(String id)
public static int matchBankStatementLine(FIN_BankStatementLine _bankStatementLine, List<String> transactionIds, FIN_Reconciliation reconciliation, String matchLevel, boolean throwException)
matchBankStatementLine(FIN_BankStatementLine, FIN_FinaccTransaction, FIN_Reconciliation, String, boolean)
which can handle a list of transactions for the same bank statement line.
The Bank statement line will be automatically split (and linked) as many times as transactions
are selected.
Session is cleared after every 100 transaction.public static boolean matchBankStatementLine(FIN_BankStatementLine _bankStatementLine, FIN_FinaccTransaction transaction, FIN_Reconciliation reconciliation, String matchLevel, boolean throwException)
splitBankStatementLine(FIN_Reconciliation, FIN_BankStatementLine, FIN_FinaccTransaction)
public static void unmatch(FIN_BankStatementLine _bsline)
_bsline
- Bank Statement Line to be unmatched from a transactionpublic static void removeTransaction(VariablesSecureApp vars, ConnectionProvider conn, FIN_FinaccTransaction transaction)
vars
- VariablesSecureApp with the session data.conn
- ConnectionProvider with the connection being used.transaction
- Financial Account Transaction to be removedpublic static void removePayment(VariablesSecureApp vars, ConnectionProvider conn, FIN_Payment payment)
vars
- VariablesSecureApp with the session data.conn
- ConnectionProvider with the connection being used.payment
- Payment to be removedpublic static OBError processTransaction(VariablesSecureApp vars, ConnectionProvider conn, String strAction, FIN_FinaccTransaction transaction) throws Exception
vars
- VariablesSecureApp with the session data.conn
- ConnectionProvider with the connection being used.strAction
- String with the action of the process. {P, D, R}transaction
- FIN_FinaccTransaction that needs to be processed.Exception
public static org.hibernate.ScrollableResults getPendingToBeMatchedBankStatementLines(String strFinancialAccountId, String strReconciliationId)
public static FIN_Reconciliation addNewDraftReconciliation(FIN_FinancialAccount financialAccount)
public static boolean updateReconciliation(FIN_Reconciliation reconciliation, FIN_FinancialAccount financialAccount, boolean process)
public static org.codehaus.jettison.json.JSONArray createMessageInProcessView(String messageSearchKey, String msgType, Object... messageParams) throws org.codehaus.jettison.json.JSONException
messageSearchKey
- String with the message to translate (see
OBMessageUtils.translateError(String)
msgType
- error, warning, success, infomessageParams
- parameters to be applied to the message text using
String.format(String, Object...)
org.codehaus.jettison.json.JSONException
public static void createAndMatchFinancialTransaction(String strFinancialAccountId, String strTransactionType, Date transactionDate, String strFinBankStatementLineId, Organization organization, FIN_FinancialAccount account, FIN_Payment payment, String description, GLItem glItem, boolean isReceipt, BigDecimal depositAmt, BigDecimal paymentAmt, Currency paymentCurrency, BigDecimal convertRate, BigDecimal sourceAmount, Campaign campaign, Project project, ABCActivity activity, SalesRegion salesRegion, Product product, BusinessPartner businessPartner, UserDimension1 user1, UserDimension2 user2, Costcenter costcenter, FIN_BankStatementLine bankStatementLine, VariablesSecureApp vars, ConnectionProvider conn, boolean throwException) throws Exception
Exception