Search in sources :

Example 16 with PaymentVoucher

use of com.axelor.apps.account.db.PaymentVoucher in project axelor-open-suite by axelor.

the class PaymentVoucherController method reloadPaymentVoucher.

public void reloadPaymentVoucher(ActionRequest request, ActionResponse response) {
    try {
        PaymentVoucher contextPaymentVoucher = request.getContext().asType(PaymentVoucher.class);
        PaymentVoucher paymentVoucher = Beans.get(PaymentVoucherRepository.class).find(contextPaymentVoucher.getId());
        if (paymentVoucher != null) {
            Beans.get(PaymentVoucherLoadService.class).reloadElementToPayList(paymentVoucher, contextPaymentVoucher);
        }
        response.setReload(true);
    } catch (Exception e) {
        TraceBackService.trace(response, e);
    }
}
Also used : PaymentVoucherRepository(com.axelor.apps.account.db.repo.PaymentVoucherRepository) PaymentVoucherLoadService(com.axelor.apps.account.service.payment.paymentvoucher.PaymentVoucherLoadService) PaymentVoucher(com.axelor.apps.account.db.PaymentVoucher) AxelorException(com.axelor.exception.AxelorException)

Aggregations

PaymentVoucher (com.axelor.apps.account.db.PaymentVoucher)16 AxelorException (com.axelor.exception.AxelorException)8 PaymentVoucherLoadService (com.axelor.apps.account.service.payment.paymentvoucher.PaymentVoucherLoadService)5 MoveLine (com.axelor.apps.account.db.MoveLine)3 PaymentMode (com.axelor.apps.account.db.PaymentMode)3 BankDetails (com.axelor.apps.base.db.BankDetails)3 BigDecimal (java.math.BigDecimal)3 LocalDate (java.time.LocalDate)3 Invoice (com.axelor.apps.account.db.Invoice)2 Journal (com.axelor.apps.account.db.Journal)2 PayVoucherDueElement (com.axelor.apps.account.db.PayVoucherDueElement)2 Company (com.axelor.apps.base.db.Company)2 Partner (com.axelor.apps.base.db.Partner)2 InterbankCodeLine (com.axelor.apps.account.db.InterbankCodeLine)1 InvoicePayment (com.axelor.apps.account.db.InvoicePayment)1 Move (com.axelor.apps.account.db.Move)1 PayVoucherElementToPay (com.axelor.apps.account.db.PayVoucherElementToPay)1 PaymentVoucherRepository (com.axelor.apps.account.db.repo.PaymentVoucherRepository)1 PaymentModeService (com.axelor.apps.account.service.payment.PaymentModeService)1 PaymentVoucherConfirmService (com.axelor.apps.account.service.payment.paymentvoucher.PaymentVoucherConfirmService)1