@extends('layouts.app') @section('title', __('sale.add_sale')) @section('content')

@lang('sale.add_sale')

@if(is_null($default_location))
{!! Form::select('select_location_id', $business_locations, null, ['class' => 'form-control input-sm', 'placeholder' => __('lang_v1.select_location'), 'id' => 'select_location_id', 'required', 'autofocus'], $bl_attributes); !!} @show_tooltip(__('tooltip.sale_location'))
@endif {!! Form::open(['url' => action('SellPosController@store'), 'method' => 'post', 'id' => 'add_sell_form' ]) !!}
{!! Form::hidden('location_id', $default_location, ['id' => 'location_id', 'data-receipt_printer_type' => isset($bl_attributes[$default_location]['data-receipt_printer_type']) ? $bl_attributes[$default_location]['data-receipt_printer_type'] : 'browser']); !!}
{!! Form::label('contact_id', __('contact.customer') . ':*') !!}
{!! Form::select('contact_id', [], null, ['class' => 'form-control mousetrap', 'id' => 'customer_id', 'placeholder' => 'Enter Customer name / phone', 'required']); !!}
@if(!empty($commission_agent))
{!! Form::label('commission_agent', __('lang_v1.commission_agent') . ':') !!} {!! Form::select('commission_agent', $commission_agent, null, ['class' => 'form-control select2']); !!}
@endif
{!! Form::label('transaction_date', __('sale.sale_date') . ':*') !!}
{!! Form::text('transaction_date', @format_date('now'), ['class' => 'form-control', 'readonly', 'required']); !!}
{!! Form::label('status', __('sale.status') . ':*') !!} {!! Form::select('status', ['final' => __('sale.final'), 'draft' => __('sale.draft'), 'quotation' => __('lang_v1.quotation')], null, ['class' => 'form-control select2', 'placeholder' => __('messages.please_select'), 'required']); !!}
{!! Form::text('search_product', null, ['class' => 'form-control mousetrap', 'id' => 'search_product', 'placeholder' => __('lang_v1.search_product_placeholder'), 'disabled' => is_null($default_location)? true : false, 'autofocus' => is_null($default_location)? false : true, ]); !!}
@php $hide_tax = ''; if( session()->get('business.enable_inline_tax') == 0){ $hide_tax = 'hide'; } @endphp
@lang('sale.product') @lang('sale.qty') @lang('sale.unit_price') @lang('sale.tax') @lang('sale.price_inc_tax') @lang('sale.subtotal')
@lang('sale.total'): 0
{!! Form::label('discount_type', __('sale.discount_type') . ':*' ) !!}
{!! Form::select('discount_type', ['fixed' => __('lang_v1.fixed'), 'percentage' => __('lang_v1.percentage')], 'percentage' , ['class' => 'form-control','placeholder' => __('messages.please_select'), 'required', 'data-default' => 'percentage']); !!}
{!! Form::label('discount_amount', __('sale.discount_amount') . ':*' ) !!}
{!! Form::text('discount_amount', @num_format($business_details->default_sales_discount), ['class' => 'form-control input_number', 'data-default' => $business_details->default_sales_discount]); !!}

@lang( 'sale.discount_amount' ):(-) 0
{!! Form::label('tax_rate_id', __('sale.order_tax') . ':*' ) !!}
{!! Form::select('tax_rate_id', $taxes['tax_rates'], $business_details->default_sales_tax, ['placeholder' => __('messages.please_select'), 'class' => 'form-control', 'data-default'=> $business_details->default_sales_tax], $taxes['attributes']); !!}
@lang( 'sale.order_tax' ):(+) 0
@lang('sale.total_payable'): 0
{!! Form::label('sell_note',__('sale.sell_note')) !!} {!! Form::textarea('sale_note', null, ['class' => 'form-control', 'rows' => 3]); !!}
{!! Form::close() !!}
@stop @section('javascript') @endsection