@extends('tenant.layouts.master') @section('breadcrumb') @include('tenant.layouts.breadcrumb', [ 'items' => [ $module == 'pos' ? __('breadcrumb.point_of_sale') : __('breadcrumb.warehouses') => '/warehouses/branches', __('breadcrumb.categories') => route('tenant.' . $module . '.categories-and-items') . '?view=categories', __('breadcrumb.edit') => '#', ], ]) @endsection @section('sidebar') @include('tenant.layouts.sidebar', ['activeItem' => $module . '.categories-and-items']) @endsection @section('style') @endsection @section('content')
@csrf @method('PUT')
@lang('warehouses/categories/create.edit_category_details')
@if ($parent_category)
@endif
@php $selected_brances_ids = $category->connections->pluck('pivot.branch_id')->all(); $selected_branches = $branches->whereIn('id', $selected_brances_ids)->all(); @endphp
@if($parent_category) @endif
@foreach ($selected_branches as $branch)
@foreach ($category_connection_codes as $category_connection_code) @php $selected_account = $category->connections ->filter(function ($item) use ($branch, $category_connection_code) { return $item->pivot->code_id == $category_connection_code->id && $item->pivot->branch_id == $branch->id; }) ->first(); @endphp @endforeach
@lang('warehouses/categories/create.department_name') @lang('warehouses/categories/create.account')
{{ $category_connection_code->label }}
@endforeach
{{-- Accounts section content template [hidden] --}}
@foreach ($category_connection_codes as $category_connection_code) @endforeach
@lang('warehouses/categories/create.department_name') @lang('warehouses/categories/create.account')
{{ $category_connection_code->label }}
@endsection @push('script') @endpush