@extends('layouts.app') @section('title', __('lang_v1.pick_list')) @section('content')

@lang('lang_v1.pick_list') {{ $so->invoice_no }} — {{ optional($so->contact)->name }}

@lang('lang_v1.sales_order'): {{ $so->invoice_no }} @lang('lang_v1.so_stage_' . $stage)

@lang('lang_v1.purchase_order'):
{{ $store_po ? $store_po->ref_no : '-' }}
@lang('business.store'):
{{ optional($so->contact)->name }}
@lang('lang_v1.order_date'):
{{ @format_date($so->transaction_date) }}
@lang('lang_v1.so_stage_approved'):
{{ @format_date($so->approved_at) }}
@if($can_pick) {!! Form::open(['route' => ['supplier.incoming-order.pick', $so->id], 'method' => 'post']) !!} @endif

@lang('lang_v1.so_pick_help')

@foreach($lines as $i => $line) @endforeach
# @lang('lang_v1.bin') @lang('business.product') @lang('lang_v1.requested_qty') @lang('lang_v1.approved_qty') @lang('lang_v1.picked_qty')
{{ $i + 1 }} {{ $line->bin_code ?: '-' }} {{ optional($line->product)->name }} @if(optional($line->variations)->name && optional($line->variations)->name !== 'DUMMY')
{{ $line->variations->name }} @endif
{{ @num_format($line->so_quantity_requested ?? $line->quantity) }} {{ @num_format($line->quantity) }} @if($can_pick) {{-- Defaults to the approved qty: the common case is a full pick, so the operator only edits exceptions. --}} {!! Form::text('picked_qty['.$line->id.']', @num_format($line->so_quantity_picked > 0 ? $line->so_quantity_picked : $line->quantity), [ 'class' => 'form-control input-sm input_number text-right', 'required', ]) !!} @else {{ @num_format($line->so_quantity_picked) }} @endif
@if($can_pick) @endif
@if($can_pick) {!! Form::close() !!} @endif
@endsection