Search in sources :

Example 1 with AccountingSituationService

use of com.axelor.apps.account.service.AccountingSituationService in project axelor-open-suite by axelor.

the class AccountingSituationController method createInBankDetailsDomain.

/**
 * return the domain of the field companyInBankDetails in the view.
 *
 * @see AccountingSituationService#createDomainForBankDetails(AccountingSituation, boolean)
 * @param request
 * @param response
 */
public void createInBankDetailsDomain(ActionRequest request, ActionResponse response) {
    AccountingSituation accountingSituation = request.getContext().asType(AccountingSituation.class);
    String domain = Beans.get(AccountingSituationService.class).createDomainForBankDetails(accountingSituation, true);
    if (!domain.equals("")) {
        response.setAttr("companyInBankDetails", "domain", domain);
    } else {
        response.setAttr("companyInBankDetails", "domain", "self.id in (0)");
    }
}
Also used : AccountingSituation(com.axelor.apps.account.db.AccountingSituation) AccountingSituationService(com.axelor.apps.account.service.AccountingSituationService)

Example 2 with AccountingSituationService

use of com.axelor.apps.account.service.AccountingSituationService in project axelor-open-suite by axelor.

the class AccountingSituationController method createOutBankDetailsDomain.

/**
 * return the domain of the field companyOutBankDetails in the view.
 *
 * @see AccountingSituationService#createDomainForBankDetails(AccountingSituation, boolean)
 * @param request
 * @param response
 */
public void createOutBankDetailsDomain(ActionRequest request, ActionResponse response) {
    AccountingSituation accountingSituation = request.getContext().asType(AccountingSituation.class);
    String domain = Beans.get(AccountingSituationService.class).createDomainForBankDetails(accountingSituation, false);
    if (!domain.equals("")) {
        response.setAttr("companyOutBankDetails", "domain", domain);
    } else {
        response.setAttr("companyOutBankDetails", "domain", "self.id in (0)");
    }
}
Also used : AccountingSituation(com.axelor.apps.account.db.AccountingSituation) AccountingSituationService(com.axelor.apps.account.service.AccountingSituationService)

Aggregations

AccountingSituation (com.axelor.apps.account.db.AccountingSituation)2 AccountingSituationService (com.axelor.apps.account.service.AccountingSituationService)2