@extends('layouts.main') @section('page-title') {{ __('Create Purchase') }} @endsection @section('page-breadcrumb') {{ __('Purchase') }} @endsection @push('scripts') @endpush @php $currancy_symbol = !empty(company_setting('defult_currancy_symbol')) ? company_setting('defult_currancy_symbol') : '$'; @endphp @section('content')
{{ Form::open(['url' => 'purchases', 'enctype' => 'multipart/form-data', 'class' => 'w-100 needs-validation', 'novalidate']) }}
@if (module_is_active('Account'))
{{ Form::label('vender_id', __('Vendor'), ['class' => 'form-label']) }} {{ Form::select('vender_id', $venders, $vendorId, ['class' => 'form-control select', 'id' => 'vender', 'data-url' => route('purchases.vender'), 'required' => 'required']) }} @if (empty($venders->count()))
{{ __('Please create vendor/Client first.') }} {{ __('Create vendor/Client') }}
@endif
@else
{{ Form::label('vender_name', __('Vendor'), ['class' => 'form-label']) }} {{ Form::text('vender_name', null, ['class' => 'form-control ', 'placeholder' => 'Enter vender name', 'required' => 'required']) }}
@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', date('Y-m-d'), ['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')
@endif
{{ __('Items') }}
{{ __('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', '', ['class' => 'form-control quantity', 'required' => 'required', 'placeholder' => __('Qty'), 'required' => 'required','step'=>'0.01']) }}
{{ Form::number('price', '', ['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', '', ['class' => 'form-control discount', 'required' => 'required', 'placeholder' => __('Discount'),'step'=>'0.01']) }} {{ $currancy_symbol }}
0.00
{{ 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 }})
{{ Form::close() }}
@endsection