@extends('layouts.app') @section('link') @endsection @section('content')

{{__('texte.documents_arr.edit_input.revision_of')}} {{ $doc_type->title }} {{__('texte.documents_arr.edit_input.number')}} {{$document->number}}

{{ method_field('PATCH') }} {{ csrf_field() }}
@if ($errors->has('documentable_type')) {{ $errors->first('documentable_type') }} @endif
@if ($errors->has('client')) {{ $errors->first('client') }} @endif
@if ($errors->has('object')) {{ $errors->first('object') }} @endif
@if ($errors->has('supplier')) {{ $errors->first('supplier') }} @endif
@if ($errors->has('date')) {{ $errors->first('date') }} @endif
@if ($errors->has('note')) {{ $errors->first('note') }} @endif
@if ($errors->has('storage')) {{ $errors->first('storage') }} @endif
@if ($errors->has('product')) {{ $errors->first('product') }} @endif
@foreach($document->rows as $row) @endforeach
{{__('texte.documents_arr.edit_input.title')}} {{__('texte.documents_arr.edit_input.measure')}} {{__('texte.documents_arr.edit_input.expiry_date')}}
{{$row->product->name}} {{$row->quantity/($row->measure==0 ? 1 : ($row->measure==1 ? $row->product->package_count : $row->product->pallet_count))}} {{$row->measure==0 ? ($row->product->unit!=3 ? __('texte.units_arr')[$row->product->unit] : 'Брой') : ($row->measure==1 ? $row->product->package->name : 'Палет')}} {{$row->batch}} {{$row->expiring_date!=null ? date('d.m.Y',strtotime($row->expiring_date)) : ''}}
@if ($errors) {{ $errors->first() }} @endif
@endsection