@extends("admin.layouts.app") @section("content")
Sync Stock
{{Form::open(['route'=>"admin.items.sync_post",'files'=>true,'role'=>"form"])}}
{{Form::label("file","Sync File")}} {{Form::file("file",['class'=>'form-control m-input'])}}
{!! Form::close() !!} @if(session()->has('success'))
{{ session()->get('success') }}
@endif @if($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@forelse($sync_batch_activities as $sync_batch_activity) @if($sync_batch_activity->item_id) @php $code = \App\Models\Item::where("id",$sync_batch_activity->item_id)->first()->code @endphp @php $name = \App\Models\Item::where("id",$sync_batch_activity->item_id)->first()->nickname @endphp @php $type = "Item" @endphp @elseif($sync_batch_activity->item_color_id) @php $code = \App\Models\ItemColor::where("id",$sync_batch_activity->item_color_id)->first()->code @endphp @php $name = \App\Models\ItemColor::where("id",$sync_batch_activity->item_color_id)->first()->item?\App\Models\ItemColor::where("id",$sync_batch_activity->item_color_id)->first()->item->name :"" ." - " .\App\Models\ItemColor::where("id",$sync_batch_activity->item_color_id)->first()->color->name@endphp @php $type = "Item Color" @endphp @elseif($sync_batch_activity->accessory_id) @php $code = \App\Models\Accessory::where("id",$sync_batch_activity->accessory_id)->first()->code @endphp @php $name = \App\Models\Accessory::where("id",$sync_batch_activity->accessory_id)->first()->name @endphp @php $type = "Accessory" @endphp @elseif($sync_batch_activity->accessory_color_id) @php $code = \App\Models\AccessoryColor::where("id",$sync_batch_activity->accessory_color_id)->first()->code @endphp @php $name = \App\Models\AccessoryColor::where("id",$sync_batch_activity->accessory_color_id)->first()->accessory->name ." - " .\App\Models\AccessoryColor::where("id",$sync_batch_activity->accessory_color_id)->first()->color->name@endphp @php $type = "Accessory Color" @endphp @else @php $code = \App\Models\UsedItem::where("id",$sync_batch_activity->used_item_id)->first()->code @endphp @php $name = \App\Models\UsedItem::where("id",$sync_batch_activity->used_item_id)->first()->name @endphp @php $type = "Used Item" @endphp @endif @empty @endforelse
Item Code Item Name Item Type Before Qty After Qty Before Stock Status After Stock Status SMS
{{$code}} {{$name}} {{$type}} {{$sync_batch_activity->before_quantity}} {{$sync_batch_activity->after_quantity}} {{$sync_batch_activity->before_stock_status}} {{$sync_batch_activity->after_stock_status}} @if($sync_batch_activity->sync_activity_sms()->count()>0) @else No SMS @endif
{!! $sync_batch_activities->links()!!}
{!! Form::open(['url'=>route("admin.items.sync").'#missing-tab','method'=>"get"]) !!} {!! Form::close() !!} @forelse($missings as $missing) @empty @endforelse
Name Code Balance Type Id Action
{{Form::text("name",request()->get("name"),['class'=>"form-control form-filter input-sm"])}} {{Form::text("code",request()->get("code"),['class'=>"form-control form-filter input-sm"])}} {{Form::checkbox("has-balance",1, request()->get('has-balance', 1))}}
{{ $missing->name }} {{ $missing->code }} {{$missing->stock_balance??'-'}} {{ $missing->model_type?class_basename($missing->model_type):'-' }} {{ $missing->model_id??'-' }}
No data found.
{!! $missings->links() !!}
@endsection @section('scripts') @endsection