Search in sources :

Example 11 with AccountingBatch

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

the class AccountingBatchController method actionCloseAnnualAccounts.

public void actionCloseAnnualAccounts(ActionRequest request, ActionResponse response) {
    AccountingBatch accountingBatch = request.getContext().asType(AccountingBatch.class);
    accountingBatch = Beans.get(AccountingBatchRepository.class).find(accountingBatch.getId());
    Batch batch = Beans.get(AccountingBatchService.class).closeAnnualAccounts(accountingBatch);
    if (batch != null)
        response.setFlash(batch.getComments());
    response.setReload(true);
}
Also used : Batch(com.axelor.apps.base.db.Batch) AccountingBatch(com.axelor.apps.account.db.AccountingBatch) AccountingBatch(com.axelor.apps.account.db.AccountingBatch) AccountingBatchService(com.axelor.apps.account.service.batch.AccountingBatchService)

Example 12 with AccountingBatch

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

the class AccountingBatchController method actionDoubtfulCustomer.

/**
 * Lancer le batch de détermination des créances douteuses
 *
 * @param request
 * @param response
 */
public void actionDoubtfulCustomer(ActionRequest request, ActionResponse response) {
    AccountingBatch accountingBatch = request.getContext().asType(AccountingBatch.class);
    Batch batch = null;
    batch = Beans.get(AccountingBatchService.class).doubtfulCustomer(Beans.get(AccountingBatchRepository.class).find(accountingBatch.getId()));
    if (batch != null)
        response.setFlash(batch.getComments());
    response.setReload(true);
}
Also used : Batch(com.axelor.apps.base.db.Batch) AccountingBatch(com.axelor.apps.account.db.AccountingBatch) AccountingBatch(com.axelor.apps.account.db.AccountingBatch) AccountingBatchRepository(com.axelor.apps.account.db.repo.AccountingBatchRepository)

Example 13 with AccountingBatch

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

the class AccountingBatchController method actionDebtRecovery.

/**
 * Lancer le batch de relance
 *
 * @param request
 * @param response
 */
public void actionDebtRecovery(ActionRequest request, ActionResponse response) {
    AccountingBatch accountingBatch = request.getContext().asType(AccountingBatch.class);
    Batch batch = null;
    if (accountingBatch.getActionSelect() == AccountingBatchRepository.ACTION_DEBT_RECOVERY) {
        batch = Beans.get(AccountingBatchService.class).debtRecovery(Beans.get(AccountingBatchRepository.class).find(accountingBatch.getId()));
    }
    if (batch != null)
        response.setFlash(batch.getComments());
    response.setReload(true);
}
Also used : Batch(com.axelor.apps.base.db.Batch) AccountingBatch(com.axelor.apps.account.db.AccountingBatch) AccountingBatch(com.axelor.apps.account.db.AccountingBatch) AccountingBatchRepository(com.axelor.apps.account.db.repo.AccountingBatchRepository)

Example 14 with AccountingBatch

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

the class AccountingBatchController method actionReimbursement.

/**
 * Lancer le batch de remboursement
 *
 * @param request
 * @param response
 */
public void actionReimbursement(ActionRequest request, ActionResponse response) {
    AccountingBatch accountingBatch = request.getContext().asType(AccountingBatch.class);
    AccountingBatchService accountingBatchService = Beans.get(AccountingBatchService.class);
    AccountingBatchRepository accountingBatchRepository = Beans.get(AccountingBatchRepository.class);
    Batch batch = null;
    if (accountingBatch.getReimbursementTypeSelect() == AccountingBatchRepository.REIMBURSEMENT_TYPE_EXPORT) {
        batch = accountingBatchService.reimbursementExport(accountingBatchRepository.find(accountingBatch.getId()));
    } else if (accountingBatch.getReimbursementTypeSelect() == AccountingBatchRepository.REIMBURSEMENT_TYPE_IMPORT) {
        batch = accountingBatchService.reimbursementImport(accountingBatchRepository.find(accountingBatch.getId()));
    }
    if (batch != null)
        response.setFlash(batch.getComments());
    response.setReload(true);
}
Also used : Batch(com.axelor.apps.base.db.Batch) AccountingBatch(com.axelor.apps.account.db.AccountingBatch) AccountingBatch(com.axelor.apps.account.db.AccountingBatch) AccountingBatchService(com.axelor.apps.account.service.batch.AccountingBatchService) AccountingBatchRepository(com.axelor.apps.account.db.repo.AccountingBatchRepository)

Example 15 with AccountingBatch

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

the class AccountingBatchController method actionAccountingCustomer.

/**
 * Lancer le batch de calcul du compte client
 *
 * @param request
 * @param response
 */
public void actionAccountingCustomer(ActionRequest request, ActionResponse response) {
    AccountingBatch accountingBatch = request.getContext().asType(AccountingBatch.class);
    Batch batch = null;
    batch = Beans.get(AccountingBatchService.class).accountCustomer(Beans.get(AccountingBatchRepository.class).find(accountingBatch.getId()));
    if (batch != null)
        response.setFlash(batch.getComments());
    response.setReload(true);
}
Also used : Batch(com.axelor.apps.base.db.Batch) AccountingBatch(com.axelor.apps.account.db.AccountingBatch) AccountingBatch(com.axelor.apps.account.db.AccountingBatch) AccountingBatchRepository(com.axelor.apps.account.db.repo.AccountingBatchRepository)

Aggregations

AccountingBatch (com.axelor.apps.account.db.AccountingBatch)21 Batch (com.axelor.apps.base.db.Batch)11 AxelorException (com.axelor.exception.AxelorException)9 AccountingBatchRepository (com.axelor.apps.account.db.repo.AccountingBatchRepository)5 AccountingBatchService (com.axelor.apps.account.service.batch.AccountingBatchService)5 BankDetails (com.axelor.apps.base.db.BankDetails)5 LocalDate (java.time.LocalDate)4 Partner (com.axelor.apps.base.db.Partner)3 ArrayList (java.util.ArrayList)3 InvoicePayment (com.axelor.apps.account.db.InvoicePayment)2 PaymentScheduleLine (com.axelor.apps.account.db.PaymentScheduleLine)2 Reimbursement (com.axelor.apps.account.db.Reimbursement)2 BankOrder (com.axelor.apps.bankpayment.db.BankOrder)2 Company (com.axelor.apps.base.db.Company)2 IOException (java.io.IOException)2 JAXBException (javax.xml.bind.JAXBException)2 DatatypeConfigurationException (javax.xml.datatype.DatatypeConfigurationException)2 Pair (org.apache.commons.lang3.tuple.Pair)2 Account (com.axelor.apps.account.db.Account)1 AccountManagement (com.axelor.apps.account.db.AccountManagement)1