use of com.axelor.apps.base.db.Batch in project axelor-open-suite by axelor.
the class AccountingBatchBankPaymentService method run.
@Override
public Batch run(Model batchModel) throws AxelorException {
Batch batch;
AccountingBatch accountingBatch = (AccountingBatch) batchModel;
if (!Beans.get(AppBankPaymentService.class).isApp("bank-payment")) {
return super.run(accountingBatch);
}
switch(accountingBatch.getActionSelect()) {
case AccountingBatchRepository.ACTION_DIRECT_DEBIT:
batch = directDebit(accountingBatch);
break;
default:
batch = super.run(accountingBatch);
}
return batch;
}
use of com.axelor.apps.base.db.Batch in project axelor-open-suite by axelor.
the class SupplychainBatchService method run.
@Override
public Batch run(Model batchModel) throws AxelorException {
Batch batch;
SupplychainBatch supplychainBatch = (SupplychainBatch) batchModel;
switch(supplychainBatch.getActionSelect()) {
case SupplychainBatchRepository.ACTION_ACCOUNTING_CUT_OFF:
batch = accountingCutOff(supplychainBatch);
break;
case SupplychainBatchRepository.ACTION_INVOICE_OUTGOING_STOCK_MOVES:
batch = invoiceOutgoingStockMoves(supplychainBatch);
break;
case SupplychainBatchRepository.ACTION_INVOICE_ORDERS:
batch = invoiceOrders(supplychainBatch);
break;
default:
throw new AxelorException(TraceBackRepository.CATEGORY_INCONSISTENCY, I18n.get(IExceptionMessage.BASE_BATCH_1), supplychainBatch.getActionSelect(), supplychainBatch.getCode());
}
return batch;
}
use of com.axelor.apps.base.db.Batch in project axelor-open-suite by axelor.
the class AccountingBatchController method actionRealizeFixedAssetLines.
public void actionRealizeFixedAssetLines(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).realizeFixedAssetLines(accountingBatch);
if (batch != null)
response.setFlash(batch.getComments());
response.setReload(true);
}
use of com.axelor.apps.base.db.Batch 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);
}
use of com.axelor.apps.base.db.Batch 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);
}
Aggregations