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

@lang('lang_v1.edit_stock_transfer')

{!! Form::open(['url' => action('StockTransferController@update', [$sell_transfer->id]), 'method' => 'put', 'id' => 'stock_transfer_form' ]) !!}
{!! Form::label('transaction_date', __('messages.date') . ':*') !!}
{!! Form::text('transaction_date', @format_datetime($sell_transfer->transaction_date), ['class' => 'form-control', 'readonly', 'required']); !!}
{!! Form::label('ref_no', __('purchase.ref_no').':') !!} {!! Form::text('ref_no', $sell_transfer->ref_no, ['class' => 'form-control', 'readonly']); !!}
{!! Form::label('status', __('sale.status').':*') !!} @show_tooltip(__('lang_v1.completed_status_help')) {!! Form::select('status', $statuses, $sell_transfer->status, ['class' => 'form-control select2', 'placeholder' => __('messages.please_select'), 'required', 'id' => 'status']); !!}
{!! Form::label('location_id', __('lang_v1.location_from').':*') !!} {!! Form::select('location_id', $business_locations, $sell_transfer->location_id, ['class' => 'form-control select2', 'placeholder' => __('messages.please_select'), 'id' => 'location_id', 'disabled']); !!}
{!! Form::label('transfer_location_id', __('lang_v1.location_to').':*') !!} {!! Form::select('transfer_location_id', $business_locations, $purchase_transfer->location_id, ['class' => 'form-control select2', 'placeholder' => __('messages.please_select'), 'id' => 'transfer_location_id', 'disabled']); !!}

{{ __('stock_adjustment.search_products') }}

{!! Form::text('search_product', null, ['class' => 'form-control', 'id' => 'search_product_for_srock_adjustment', 'placeholder' => __('stock_adjustment.search_product')]); !!}
@php $product_row_index = 0; $subtotal = 0; @endphp @foreach($products as $product) @include('stock_transfer.partials.product_table_row', ['product' => $product, 'row_index' => $loop->index]) @php $product_row_index = $loop->index + 1; $subtotal += ($product->quantity_ordered*$product->last_purchased_price); @endphp @endforeach
@lang('sale.product') @lang('sale.qty') @lang('sale.subtotal')
@lang('stock_adjustment.total_amount'): {{@num_format($subtotal)}}
{!! Form::label('shipping_charges', __('lang_v1.shipping_charges') . ':') !!} {!! Form::text('shipping_charges', @num_format($sell_transfer->shipping_charges), ['class' => 'form-control input_number', 'placeholder' => __('lang_v1.shipping_charges')]); !!}
{!! Form::label('additional_notes',__('purchase.additional_notes')) !!} {!! Form::textarea('additional_notes', $sell_transfer->additional_notes, ['class' => 'form-control', 'rows' => 3]); !!}
{!! Form::close() !!}
@stop @section('javascript') @endsection