@extends('layouts.app') @section('title', 'Edit Product - Pharmacy Management') @section('content') @can('edit_products')

Edit Product

← Back to Products
@csrf @method('PUT')

Promotion (Optional)

@if($product->image) @else @endif
@if(auth()->user()->canAccessAllData() && $branches->count() > 0)

Branch Stock

Manage branch stock quantities.

@php $branchIds = $product->branches->pluck('id')->toArray(); @endphp @foreach($branches as $branch) @php $pivotQty = $product->branches->where('id', $branch->id)->first()?->pivot?->quantity ?? 0; $oldChecked = in_array($branch->id, old('branches', $branchIds)); $oldQty = old('branch_quantities.' . $branch->id, $pivotQty); @endphp @endforeach
@endif
Cancel
@endcan @endsection