@extends('layouts.main') @section('page-title') {{ __('Edit Purchase') }} @endsection @section('breadcrumb') {{ __('Purchase') }} @endsection @push('scripts') {{-- Load Billing types based on Account type --}} @endpush @php $currancy_symbol = !empty(company_setting('defult_currancy_symbol')) ? company_setting('defult_currancy_symbol') : '$'; @endphp @section('content')
{{ Form::model($purchase, ['route' => ['purchases.update', $purchase->id], 'method' => 'PUT', 'enctype' => 'multipart/form-data', 'class' => 'w-100 needs-validation', 'novalidate']) }}
@if (module_is_active('Account'))
{{ Form::label('vender_name', __('Vendor'), ['class' => 'form-label']) }}
{{ Form::text('vender_name', null, ['class' => 'form-control ', 'placeholder' => 'Enter vender name']) }}
@else
{{ Form::label('vender_name', __('Vendor'), ['class' => 'form-label']) }} {{ Form::text('vender_name', null, ['class' => 'form-control ', 'placeholder' => 'Enter vender name', 'required' => 'required']) }}
@endif
@if (module_is_active('Account') && module_is_active('Taskly'))
{{ $errors->first('billing_type') }}
@endif
{{ Form::label('warehouse_id', __('Warehouse'), ['class' => 'form-label']) }} {{ Form::select('warehouse_id', $warehouse, null, ['class' => 'form-control select', 'required' => 'required']) }}
{{ Form::label('category_id', __('Category'), ['class' => 'form-label']) }} {{ Form::select('category_id', $category, null, ['class' => 'form-control select', 'required' => 'required']) }}
{{ Form::label('purchase_date', __('Purchase Date'), ['class' => 'form-label']) }} {{ Form::date('purchase_date', null, ['class' => 'form-control ', 'required' => 'required']) }}
{{ Form::label('purchase_number', __('Purchase Number'), ['class' => 'form-label']) }}
@if (module_is_active('CustomField') && !$customFields->isEmpty())
@include('custom-field::formBuilder', [ 'fildedata' => $purchase->customField, ])
@endif
{{ __('Items') }}
{{ Form::hidden('id', null, ['class' => 'form-control id']) }}
{{ __('Item Type') }} {{ __('Items') }} {{ __('Quantity') }} {{ __('Price') }} {{ __('Tax') }} (%) {{ __('Discount') }} {{ __('Amount') }}
{{ __('After discount & tax') }}
{{ Form::select('product_type', $product_type, null, ['class' => 'form-control product_type ', 'required' => 'required', 'placeholder' => '--']) }}
{{ Form::number('quantity', null, ['class' => 'form-control quantity', 'required' => 'required', 'placeholder' => __('Qty'), 'required' => 'required','step'=>'0.01']) }}
{{ Form::number('price', null, ['class' => 'form-control price', 'required' => 'required', 'placeholder' => __('Price'), 'required' => 'required','step'=>'0.01']) }} {{ $currancy_symbol }}
{{ Form::hidden('tax', '', ['class' => 'form-control tax']) }} {{ Form::hidden('itemTaxPrice', '', ['class' => 'form-control itemTaxPrice']) }} {{ Form::hidden('itemTaxRate', '', ['class' => 'form-control itemTaxRate']) }}
{{ Form::number('discount', null, ['class' => 'form-control discount', 'required' => 'required', 'placeholder' => __('Discount'),'step'=>'0.01']) }} {{ $currancy_symbol }}
0.00 @permission('purchase product delete')
@endpermission
{{ Form::textarea('description', null, ['class' => 'form-control pro_description', 'rows' => '2', 'placeholder' => __('Description')]) }}
        {{ __('Sub Total') }} ({{ $currancy_symbol }}) 0.00
        {{ __('Discount') }} ({{ $currancy_symbol }}) 0.00
        {{ __('Tax') }} ({{ $currancy_symbol }}) 0.00
          {{ __('Total Amount') }} ({{ $currancy_symbol }}) 0.00
{{ Form::close() }}
@endsection