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);
}
}
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);
}
}
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 + ")");
}
}
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);
}
}
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);
}
Aggregations