Skip to content

Commit

Permalink
Refactor code by class MSetup and InitialClientSetup #1
Browse files Browse the repository at this point in the history
  • Loading branch information
dixonmartinez committed Jun 2, 2022
1 parent cffae0c commit 4248c5c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions org.adempiere.base/src/org/compiere/model/MSetup.java
Original file line number Diff line number Diff line change
Expand Up @@ -1619,21 +1619,23 @@ protected MBank addBank(int i, String name, String routingNo, String switchCode,
return bank;
}

protected MBankAccount addBankAccount(MBank bank, String accountNo, int currency_ID, String accountType, String trxName) {
protected MBankAccount addBankAccount(MBank bank, String name, String accountNo, int currency_ID, String accountType, String trxName) {
MBankAccount bankAccount = new MBankAccount(m_ctx, 0, trxName);
bankAccount.setC_Bank_ID(bank.getC_Bank_ID());
bankAccount.setAccountNo(accountNo);
bankAccount.setC_Currency_ID(currency_ID);
bankAccount.setBankAccountType(accountType);
bankAccount.setName(name);
bankAccount.saveEx();
return bankAccount;
}

protected void addBankAccountDoc(MBankAccount bankAccount, String name, String paymentRule, String trxName) {
protected void addBankAccountDoc(MBankAccount bankAccount, String name, String paymentRule, int currentNext, String trxName) {
X_C_BankAccountDoc bankAccountDoc = new X_C_BankAccountDoc(m_ctx, 0, trxName);
bankAccountDoc.setC_BankAccount_ID(bankAccount.getC_BankAccount_ID());
bankAccountDoc.setName(name);
bankAccountDoc.setPaymentRule(paymentRule);
bankAccountDoc.setCurrentNext(currentNext);
bankAccountDoc.saveEx();
}
} // MSetup

0 comments on commit 4248c5c

Please sign in to comment.