use of com.axelor.apps.account.db.AccountingSituation in project axelor-open-suite by axelor.
the class DebtRecoveryService method getDebtRecovery.
public DebtRecovery getDebtRecovery(Partner partner, Company company) throws AxelorException {
AccountingSituationRepository accSituationRepo = Beans.get(AccountingSituationRepository.class);
AccountingSituation accountingSituation = accSituationRepo.all().filter("self.partner = ?1 and self.company = ?2", partner, company).fetchOne();
if (accountingSituation == null) {
throw new AxelorException(accountingSituation, TraceBackRepository.CATEGORY_CONFIGURATION_ERROR, "%s :\n" + I18n.get("Partner") + " %s, " + I18n.get("Company") + " %s : " + I18n.get(IExceptionMessage.DEBT_RECOVERY_1), I18n.get(com.axelor.apps.base.exceptions.IExceptionMessage.EXCEPTION), partner.getName(), company.getName());
}
return accountingSituation.getDebtRecovery();
}
Aggregations