@extends('backend.layouts.master') @section('section-title', 'Stock Adjust') @section('page-title', 'Adjust Stock List') @if (check_permission('stock-adjust.create')) @section('action-button') Add Stock Adjust @endsection @endif @push('css') @endpush @section('content')
{{--
@php $products = App\Models\Product::get(); @endphp
Reset Print
--}}
@forelse($adjust_stocks as $key => $data) @php $adjust_items = App\Models\AdjustStockItem::where( 'adjust_id', $data->id, )->get(); $userBranchId = auth()->user()->branch_id; $filterBranchId = session('branch_filter_id', null); $receive = false; $cancel = false; if ($userBranchId == 1) { if ($filterBranchId) { if ( $filterBranchId == $data->to_branch_id || $filterBranchId == $data->from_branch_id ) { $receive = true; $cancel = true; } } else { } } else { if ($userBranchId == $data->to_branch_id) { $receive = true; $cancel = true; } if ($userBranchId == $data->from_branch_id) { $cancel = true; } } @endphp {{-- delete modal --}} @csrf @method('DELETE') @empty @endforelse
SL# Date Branch Adjust No Product Item(s) Stock Status Create By Action
{{ $key + 1 }} {{ $data->date }} {{ $data->branch?->name }} {{ $data->adjust_no }} @foreach ($adjust_items as $item) @php $product = App\Models\Product::where( 'id', $item->product_id, )->first(); if ($product->unit->related_unit == null) { $qty = $item->main_qty; } else { $qty = 0; } @endphp
  • {{ $item->product?->name }} @if($item->product_variation_id != null) ({{ $item->product_variation->color?->color }}-{{ $item->product_variation->size?->size }}) @endif (@if ($item->product->unit?->related_unit == null) {{ $item->main_qty . ' ' . $item->product->unit?->name }} @else {{ $item->main_qty . ' ' . $item->product->unit->name . ' ' . $item->sub_qty . ' ' . $item->product->unit->related_unit->name }} @endif)
@endforeach
@if ($data->stock_status == 0) Stock Out @elseif($data->stock_status == 1) Stock In @endif {{ $data->user?->name }}
Data Not Found
{{ $adjust_stocks->onEachSide(1)->links() }}
@endsection