Projects:Funds Transfer Hook
This project adds a new hook at the end of the Funds Transfer process
- Issue 34160
- Available from: 17Q1
- Executed when: After all the transactions belonging to a Funds Transfer are created and processed.
- Arguments:
- List<FIN_FinaccTransaction> transactions: A list of all the transactions created by the Funds Transfer process. There are always at least two transactions, representing the transfer amount in both accounts. Two extra transactions can be generated for bank fees in both accounts.
Implementation example
In this example we log information about all transactions created by the Funds Transfer process.
import java.util.List; import org.apache.log4j.Logger; import org.openbravo.advpaymentmngt.FundsTransferPostProcessHook; import org.openbravo.model.financialmgmt.payment.FIN_FinaccTransaction; public class FundsTransferExampleHook implements FundsTransferPostProcessHook { static Logger log4j = Logger.getLogger(FundsTransferExampleHook.class); @Override public void exec(List<FIN_FinaccTransaction> transactions) { // log all transactions for (FIN_FinaccTransaction trans : transactions) { log4j.info("Transaction created by Funds Transfer: " + trans.getIdentifier()); } } }