diff --git a/app/Http/Controllers/Assets/BulkAssetsController.php b/app/Http/Controllers/Assets/BulkAssetsController.php index 1d5f189af0..40ccc09ae3 100644 --- a/app/Http/Controllers/Assets/BulkAssetsController.php +++ b/app/Http/Controllers/Assets/BulkAssetsController.php @@ -292,12 +292,18 @@ class BulkAssetsController extends Controller * make sense (for example, changing the status ID to something incompatible with * its checkout status. */ + // purchase_cost and order_number are intentionally not bulk-editable. + // Assets carry no currency column, so bulk-writing purchase_cost on + // rows that trace back to an Order can silently diverge from + // order_items.price and misrepresent the currency of the original + // purchase. Removing them from both the "should we build an update + // array" trigger AND from the conditionallyAddItem chain below + // prevents both UI-form and hand-crafted-POST callers from setting + // them via bulk edit. Single-asset edit still allows both. if (($request->filled('name')) || ($request->filled('purchase_date')) || ($request->filled('expected_checkin')) - || ($request->filled('purchase_cost')) || ($request->filled('supplier_id')) - || ($request->filled('order_number')) || ($request->filled('warranty_months')) || ($request->filled('rtd_location_id')) || ($request->filled('requestable')) @@ -332,7 +338,6 @@ class BulkAssetsController extends Controller $this->conditionallyAddItem('name') ->conditionallyAddItem('purchase_date') ->conditionallyAddItem('expected_checkin') - ->conditionallyAddItem('order_number') ->conditionallyAddItem('requestable') ->conditionallyAddItem('supplier_id') ->conditionallyAddItem('warranty_months') diff --git a/resources/views/hardware/bulk.blade.php b/resources/views/hardware/bulk.blade.php index 52bd40a2a1..95191571e0 100755 --- a/resources/views/hardware/bulk.blade.php +++ b/resources/views/hardware/bulk.blade.php @@ -167,19 +167,13 @@ input_div_class="col-md-9 col-md-offset-3" /> - {{-- Purchase cost with tenant-currency prefix addon. The - row component's built-in input_group_addon only carries - an icon, not free text, so this stays as slot:input. --}} - - - {{ $snipeSettings->default_currency }} - - - + {{-- purchase_cost and order_number are intentionally not + bulk-editable here. Assets have no currency column, so + bulk-writing purchase_cost on rows that trace back to an + Order can silently diverge from order_items.price and + misrepresent the currency of the original purchase. The + single-asset edit form still exposes both, and the + controller enforces this omission on the POST side too. --}} - {{-- Order number --}} - - - {{-- Warranty months with unit-suffix addon. Same reason as - purchase_cost — free-text addon needs slot:input. --}} + {{-- Warranty months with unit-suffix addon. Free-text addon + needs slot:input. --}}