@extends('layouts/pos_layout') @section('title', '|'.$moduleTitle) @section('style') @endsection @section('content')
{{ $moduleTitle }}
{!! Form::open(array('url' => '', 'role' => 'form', 'class'=>'form-horizontal form-groups', 'id' => 'purchaseForm')) !!} {!! Form::hidden('edit_data_id', $data->id, ['class' => 'form-control input-sm', 'id' => 'edit_data_id']) !!}
{!! Form::label('billNo', 'Bill No:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('purchase_no', 'PR'.$value = $data->purchase_return_no, ['class' => 'form-control', 'id' => 'purchase_no', 'type' => 'text','readonly','autocomplete'=>'off']) !!}

{!! Form::label('supplier_id', 'Supplier:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::select('supplier_id', $suppliers,$data->supplier_id, ['class' => 'form-control', 'id' => 'supplier_id','placeholder' => 'Select Supplier','required'=>'required']) !!}

{!! Form::label('purchase_return_date', 'Purchase Return Date:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('purchase_return_date', date('d-m-Y', strtotime($data->purchase_return_date)), ['class' => 'form-control','readonly']) !!}

{!! Form::label('branch_id', 'From Branch:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::select('branch_id', $branches,$data->branch_id, ['class' => 'form-control', 'id' => 'branch_id','placeholder' => 'Select Branch','required'=>'required']) !!}

{!! Form::label('total_amount', 'Total Amount:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('total_amount', $data->total_amount, ['class' => 'form-control numeric', 'id' => 'total_amount', 'readonly','min'=>'0']) !!}

{!! Form::label('total_quantity', 'Total Quantity:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::number('total_quantity', $data->total_quantity, ['class' => 'form-control numeric', 'id' => 'total_quantity', 'readonly','min'=>'0']) !!}

{!! Form::label('total_stock', 'Stock:', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::text('total_stock', null, ['class' => 'form-control numeric', 'id' => 'total_stock', 'readonly','min'=>'0']) !!}

{!! Form::label('group_id', 'Group:', ['class' => 'control-label col-sm-12']) !!}
{!! Form::label('category_id', 'Category:', ['class' => 'control-label col-sm-12']) !!}
{!! Form::label('sub_category_id', 'Subcatagory:', ['class' => 'control-label col-sm-12']) !!}
{!! Form::label('model_id', 'Model:', ['class' => 'control-label col-sm-12']) !!}
readonly @php $t_qty = 0; $t_price = 0; @endphp @foreach($data->purchase_return_details as $details) @php $t_qty += $details->quantity; $t_price += $details->cost_price; @endphp @endforeach
Product Name PID/EMEI Number Qty Price Total Remove
Total Quantity {{$t_qty}} Total Amount {{$t_price}}
{!! Form::label('submit', ' ', ['class' => 'col-sm-4 control-label']) !!}
{!! Form::submit('submit', ['id' => 'add', 'class' => 'btn btn-info submit-btn']); !!} Close
{!! Form::close() !!}