use of com.axelor.apps.bankpayment.service.invoice.payment.InvoicePaymentValidateServiceBankPayImpl in project axelor-open-suite by axelor.
the class BankOrderServiceImpl method validatePayment.
@Override
@Transactional(rollbackOn = { Exception.class })
public void validatePayment(BankOrder bankOrder) throws AxelorException {
List<InvoicePayment> invoicePaymentList = invoicePaymentRepo.findByBankOrder(bankOrder).fetch();
InvoicePaymentValidateServiceBankPayImpl invoicePaymentValidateServiceBankPayImpl = Beans.get(InvoicePaymentValidateServiceBankPayImpl.class);
for (InvoicePayment invoicePayment : invoicePaymentList) {
if (invoicePayment != null && invoicePayment.getStatusSelect() != InvoicePaymentRepository.STATUS_VALIDATED && invoicePayment.getInvoice() != null) {
if (bankOrderLineOriginService.existBankOrderLineOrigin(bankOrder, invoicePayment.getInvoice())) {
invoicePaymentValidateServiceBankPayImpl.validateFromBankOrder(invoicePayment, true);
}
}
}
}
Aggregations