fix(InventoryValuation): inventory valuation report.

This commit is contained in:
a.bouhuolia
2021-03-29 15:19:35 +02:00
parent 5184365d2a
commit 5f573c095e
4 changed files with 58 additions and 99 deletions

View File

@@ -43,13 +43,6 @@ export default class ExchangeRatesController extends BaseController {
asyncMiddleware(this.editExchangeRate.bind(this)),
this.handleServiceError
);
router.delete(
'/bulk',
[...this.exchangeRatesIdsSchema],
this.validationResult,
asyncMiddleware(this.bulkDeleteExchangeRates.bind(this)),
this.handleServiceError
);
router.delete(
'/:id',
[...this.exchangeRateIdSchema],
@@ -192,31 +185,6 @@ export default class ExchangeRatesController extends BaseController {
}
}
/**
* Deletes the given exchange rates in bulk.
* @param {Request} req
* @param {Response} res
* @param {NextFunction} next
*/
async bulkDeleteExchangeRates(
req: Request,
res: Response,
next: NextFunction
) {
const { tenantId } = req;
const { ids: exchangeRateIds } = req.query;
try {
await this.exchangeRatesService.deleteBulkExchangeRates(
tenantId,
exchangeRateIds
);
return res.status(200).send();
} catch (error) {
next(error);
}
}
/**
* Handle service errors.
* @param {Error} error