use of com.axelor.apps.bankpayment.db.BankOrder in project axelor-open-suite by axelor.
the class BankOrderController method cancel.
public void cancel(ActionRequest request, ActionResponse response) {
try {
BankOrder bankOrder = request.getContext().asType(BankOrder.class);
bankOrder = Beans.get(BankOrderRepository.class).find(bankOrder.getId());
Beans.get(BankOrderService.class).cancelBankOrder(bankOrder);
response.setReload(true);
} catch (Exception e) {
TraceBackService.trace(response, e);
}
}
use of com.axelor.apps.bankpayment.db.BankOrder in project axelor-open-suite by axelor.
the class BankOrderController method fillSignatoryEbicsUser.
public void fillSignatoryEbicsUser(ActionRequest request, ActionResponse response) {
BankOrder bankOrder = request.getContext().asType(BankOrder.class);
if (bankOrder.getSenderBankDetails() != null) {
EbicsUser ebicsUser = Beans.get(BankOrderService.class).getDefaultEbicsUserFromBankDetails(bankOrder.getSenderBankDetails());
bankOrder.setSignatoryEbicsUser(ebicsUser);
response.setValues(bankOrder);
}
}
use of com.axelor.apps.bankpayment.db.BankOrder in project axelor-open-suite by axelor.
the class BankOrderController method print.
public void print(ActionRequest request, ActionResponse response) throws AxelorException {
BankOrder bankOrder = request.getContext().asType(BankOrder.class);
String name = I18n.get("Bank Order") + " " + bankOrder.getBankOrderSeq();
String fileLink = ReportFactory.createReport(IReport.BANK_ORDER, name + "-${date}").addParam("BankOrderId", bankOrder.getId()).addParam("Locale", ReportSettings.getPrintingLocale(null)).addParam("Timezone", bankOrder.getSenderCompany() != null ? bankOrder.getSenderCompany().getTimezone() : null).generate().getFileLink();
log.debug("Printing " + name);
response.setView(ActionView.define(name).add("html", fileLink).map());
}
use of com.axelor.apps.bankpayment.db.BankOrder in project axelor-open-suite by axelor.
the class BankOrderController method setStatusReject.
public void setStatusReject(ActionRequest request, ActionResponse response) {
BankOrder bankOrder = request.getContext().asType(BankOrder.class);
bankOrder = Beans.get(BankOrderRepository.class).find(bankOrder.getId());
Beans.get(BankOrderService.class).setStatusToRejected(bankOrder);
response.setReload(true);
}
use of com.axelor.apps.bankpayment.db.BankOrder in project axelor-open-suite by axelor.
the class BankOrderController method confirm.
public void confirm(ActionRequest request, ActionResponse response) {
try {
BankOrder bankOrder = request.getContext().asType(BankOrder.class);
bankOrder = Beans.get(BankOrderRepository.class).find(bankOrder.getId());
if (bankOrder != null) {
Beans.get(BankOrderService.class).confirm(bankOrder);
}
} catch (Exception e) {
TraceBackService.trace(response, e);
}
response.setReload(true);
}
Aggregations