use of com.axelor.apps.base.db.Batch 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);
}
use of com.axelor.apps.base.db.Batch 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);
}
use of com.axelor.apps.base.db.Batch 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);
}
use of com.axelor.apps.base.db.Batch in project axelor-open-suite by axelor.
the class AccountingBatchController method actionCreditTransfer.
public void actionCreditTransfer(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).creditTransfer(accountingBatch);
response.setFlash(batch.getComments());
response.setReload(true);
}
use of com.axelor.apps.base.db.Batch in project axelor-open-suite by axelor.
the class BaseBatchController method run.
// WS
/**
* Lancer le batch à travers un web service.
*
* @param request
* @param response
* @throws AxelorException
*/
public void run(ActionRequest request, ActionResponse response) throws AxelorException {
Batch batch = Beans.get(BaseBatchService.class).run((String) request.getContext().get("code"));
Map<String, Object> mapData = new HashMap<String, Object>();
mapData.put("anomaly", batch.getAnomaly());
response.setData(mapData);
}
Aggregations