feat(inventory): add refunded_units to inventory model and update related services
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user