refactor: inventory adjustments to GL

This commit is contained in:
Ahmed Bouhuolia
2025-01-07 23:00:21 +02:00
parent 1773df1858
commit fdfb766587
12 changed files with 391 additions and 292 deletions

View File

@@ -18,10 +18,8 @@ export class GetInventoryAdjustmentService {
const inventoryAdjustment = await InventoryAdjustment.query()
.findById(inventoryAdjustmentId)
.withGraphFetched('entries.item')
.withGraphFetched('adjustmentAccount');
// Throw not found if the given adjustment transaction not exists.
this.throwIfAdjustmentNotFound(inventoryAdjustment);
.withGraphFetched('adjustmentAccount')
.throwIfNotFound();
return this.transformer.transform(
inventoryAdjustment,