Search in sources :

Example 11 with BankReconciliation

use of com.axelor.apps.bankpayment.db.BankReconciliation in project axelor-open-suite by axelor.

the class BankReconciliationController method validate.

public void validate(ActionRequest request, ActionResponse response) {
    try {
        BankReconciliation bankReconciliation = request.getContext().asType(BankReconciliation.class);
        Beans.get(BankReconciliationValidateService.class).validate(Beans.get(BankReconciliationRepository.class).find(bankReconciliation.getId()));
        response.setReload(true);
    } catch (Exception e) {
        TraceBackService.trace(response, e);
    }
}
Also used : BankReconciliationValidateService(com.axelor.apps.bankpayment.service.bankreconciliation.BankReconciliationValidateService) BankReconciliation(com.axelor.apps.bankpayment.db.BankReconciliation)

Example 12 with BankReconciliation

use of com.axelor.apps.bankpayment.db.BankReconciliation in project axelor-open-suite by axelor.

the class BankReconciliationController method compute.

public void compute(ActionRequest request, ActionResponse response) {
    try {
        BankReconciliation bankReconciliation = request.getContext().asType(BankReconciliation.class);
        Beans.get(BankReconciliationService.class).compute(Beans.get(BankReconciliationRepository.class).find(bankReconciliation.getId()));
        response.setReload(true);
    } catch (Exception e) {
        TraceBackService.trace(response, e);
    }
}
Also used : BankReconciliationService(com.axelor.apps.bankpayment.service.bankreconciliation.BankReconciliationService) BankReconciliation(com.axelor.apps.bankpayment.db.BankReconciliation)

Example 13 with BankReconciliation

use of com.axelor.apps.bankpayment.db.BankReconciliation in project axelor-open-suite by axelor.

the class BankReconciliationController method setCashAccountDomain.

public void setCashAccountDomain(ActionRequest request, ActionResponse response) {
    BankReconciliation bankReconciliation = request.getContext().asType(BankReconciliation.class);
    String cashAccountIds = null;
    if (EntityHelper.getEntity(bankReconciliation).getBankDetails() != null) {
        cashAccountIds = Beans.get(BankReconciliationService.class).getCashAccountDomain(bankReconciliation);
    }
    if (Strings.isNullOrEmpty(cashAccountIds)) {
        response.setAttr("cashAccount", "domain", "self.id IN (0)");
    } else {
        response.setAttr("cashAccount", "domain", "self.id IN(" + cashAccountIds + ")");
    }
}
Also used : BankReconciliation(com.axelor.apps.bankpayment.db.BankReconciliation)

Example 14 with BankReconciliation

use of com.axelor.apps.bankpayment.db.BankReconciliation in project axelor-open-suite by axelor.

the class BankReconciliationController method loadBankStatement.

public void loadBankStatement(ActionRequest request, ActionResponse response) {
    try {
        BankReconciliation bankReconciliation = request.getContext().asType(BankReconciliation.class);
        Beans.get(BankReconciliationService.class).loadBankStatement(Beans.get(BankReconciliationRepository.class).find(bankReconciliation.getId()));
        response.setReload(true);
    } catch (Exception e) {
        TraceBackService.trace(response, e);
    }
}
Also used : BankReconciliationService(com.axelor.apps.bankpayment.service.bankreconciliation.BankReconciliationService) BankReconciliation(com.axelor.apps.bankpayment.db.BankReconciliation)

Example 15 with BankReconciliation

use of com.axelor.apps.bankpayment.db.BankReconciliation in project axelor-open-suite by axelor.

the class BankReconciliationController method setJournal.

public void setJournal(ActionRequest request, ActionResponse response) {
    BankReconciliation bankReconciliation = request.getContext().asType(BankReconciliation.class);
    Journal journal = null;
    if (EntityHelper.getEntity(bankReconciliation).getBankDetails() != null) {
        journal = Beans.get(BankReconciliationService.class).getJournal(bankReconciliation);
    }
    response.setValue("journal", journal);
}
Also used : Journal(com.axelor.apps.account.db.Journal) BankReconciliation(com.axelor.apps.bankpayment.db.BankReconciliation)

Aggregations

BankReconciliation (com.axelor.apps.bankpayment.db.BankReconciliation)16 BankReconciliationService (com.axelor.apps.bankpayment.service.bankreconciliation.BankReconciliationService)5 BankReconciliationValidateService (com.axelor.apps.bankpayment.service.bankreconciliation.BankReconciliationValidateService)2 Company (com.axelor.apps.base.db.Company)2 Context (com.axelor.rpc.Context)2 LocalDate (java.time.LocalDate)2 Account (com.axelor.apps.account.db.Account)1 Journal (com.axelor.apps.account.db.Journal)1 Move (com.axelor.apps.account.db.Move)1 MoveLine (com.axelor.apps.account.db.MoveLine)1 BankReconciliationLine (com.axelor.apps.bankpayment.db.BankReconciliationLine)1 BankStatement (com.axelor.apps.bankpayment.db.BankStatement)1 BankReconciliationLineRepository (com.axelor.apps.bankpayment.db.repo.BankReconciliationLineRepository)1 BankReconciliationRepository (com.axelor.apps.bankpayment.db.repo.BankReconciliationRepository)1 BankReconciliationCreateService (com.axelor.apps.bankpayment.service.bankreconciliation.BankReconciliationCreateService)1 BankDetails (com.axelor.apps.base.db.BankDetails)1 Currency (com.axelor.apps.base.db.Currency)1 Partner (com.axelor.apps.base.db.Partner)1 Transactional (com.google.inject.persist.Transactional)1 BigDecimal (java.math.BigDecimal)1