feat(inventory): add refunded_units to inventory model and update related services

This commit is contained in:
2026-09-16 15:00:28 -03:00
parent f8a3296821
commit 353fd34db2
7 changed files with 137 additions and 1 deletions

View File

@@ -65,9 +65,10 @@ class TenantTransactionResetService
DB::table('inventories')
->whereIn('id', $scope['inventory_ids'])
->update([
'real_stock' => DB::raw('real_stock + sold_units'),
'real_stock' => DB::raw('real_stock + sold_units - refunded_units'),
'reserved_stock' => 0,
'sold_units' => 0,
'refunded_units' => 0,
]);
return $summary;