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

@lang('sale.add_sale')

@if(!empty($pos_settings['allow_overselling'])) @endif @if(session('business.enable_rp') == 1) @endif @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' ]) !!}
@component('components.widget', ['class' => 'box-primary']) {!! 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']); !!} @if(!empty($price_groups)) @if(count($price_groups) > 1)
@php reset($price_groups); @endphp {!! Form::hidden('hidden_price_group', key($price_groups), ['id' => 'hidden_price_group']) !!} {!! Form::select('price_group', $price_groups, null, ['class' => 'form-control select2', 'id' => 'price_group']); !!} @show_tooltip(__('lang_v1.price_group_help_text'))
@else @php reset($price_groups); @endphp {!! Form::hidden('price_group', key($price_groups), ['id' => 'price_group']) !!} @endif @endif {!! Form::hidden('default_price_group', null, ['id' => 'default_price_group']) !!} @if(in_array('types_of_service', $enabled_modules) && !empty($types_of_service))
{!! Form::select('types_of_service_id', $types_of_service, null, ['class' => 'form-control', 'id' => 'types_of_service_id', 'style' => 'width: 100%;', 'placeholder' => __('lang_v1.select_types_of_service')]); !!} {!! Form::hidden('types_of_service_price_group', null, ['id' => 'types_of_service_price_group']) !!} @show_tooltip(__('lang_v1.types_of_service_help'))

@lang('lang_v1.price_group'):

@endif @if(in_array('subscription', $enabled_modules))
@show_tooltip(__('lang_v1.recurring_invoice_help'))
@endif
{!! Form::label('contact_id', __('contact.customer') . ':*') !!}
{!! Form::select('contact_id', [], null, ['class' => 'form-control mousetrap', 'id' => 'customer_id', 'placeholder' => 'Enter Customer name / phone', 'required']); !!}
{!! Form::label('pay_term_number', __('contact.pay_term') . ':') !!} @show_tooltip(__('tooltip.pay_term'))
{!! Form::number('pay_term_number', $walk_in_customer['pay_term_number'], ['class' => 'form-control width-40 pull-left', 'placeholder' => __('contact.pay_term')]); !!} {!! Form::select('pay_term_type', ['months' => __('lang_v1.months'), 'days' => __('lang_v1.days')], $walk_in_customer['pay_term_type'], ['class' => 'form-control width-60 pull-left','placeholder' => __('messages.please_select')]); !!}
@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', $default_datetime, ['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::label('invoice_scheme_id', __('invoice.invoice_scheme') . ':') !!} {!! Form::select('invoice_scheme_id', $invoice_schemes, $default_invoice_schemes->id, ['class' => 'form-control select2', 'placeholder' => __('messages.please_select')]); !!}
@if(in_array('tables' ,$enabled_modules) || in_array('service_staff' ,$enabled_modules))
@endif @endcomponent @component('components.widget', ['class' => 'box-primary'])
{!! 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
@if(!empty($pos_settings['inline_service_staff'])) @endif
@lang('sale.product') @lang('sale.qty') @lang('restaurant.service_staff') @lang('sale.price_inc_tax') @lang('sale.subtotal')
@lang('sale.item'): 0      @lang('sale.total'): 0
@endcomponent @component('components.widget', ['class' => 'box-primary'])
{!! 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

{{session('business.rp_name')}}

{!! Form::label('rp_redeemed_modal', __('lang_v1.redeemed') . ':' ) !!}
{!! Form::number('rp_redeemed_modal', 0, ['class' => 'form-control direct_sell_rp_input', 'data-amount_per_unit_point' => session('business.redeem_amount_per_unit_rp'), 'min' => 0, 'data-max_points' => 0, 'data-min_order_total' => session('business.min_order_total_for_redeem') ]); !!}

@lang('lang_v1.available'): 0

@lang('lang_v1.redeemed_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
{!! Form::label('shipping_details', __('sale.shipping_details')) !!}
{!! Form::textarea('shipping_details',null, ['class' => 'form-control','placeholder' => __('sale.shipping_details') ,'rows' => '1', 'cols'=>'30']); !!}
{!! Form::label('shipping_address', __('lang_v1.shipping_address')) !!}
{!! Form::textarea('shipping_address',null, ['class' => 'form-control','placeholder' => __('lang_v1.shipping_address') ,'rows' => '1', 'cols'=>'30']); !!}
{!!Form::label('shipping_charges', __('sale.shipping_charges'))!!}
{!!Form::text('shipping_charges',@num_format(0.00),['class'=>'form-control input_number','placeholder'=> __('sale.shipping_charges')]);!!}
{!! Form::label('shipping_status', __('lang_v1.shipping_status')) !!} {!! Form::select('shipping_status',$shipping_statuses, null, ['class' => 'form-control','placeholder' => __('messages.please_select')]); !!}
{!! Form::label('delivered_to', __('lang_v1.delivered_to') . ':' ) !!} {!! Form::text('delivered_to', null, ['class' => 'form-control','placeholder' => __('lang_v1.delivered_to')]); !!}
@lang('sale.total_payable'): 0
{!! Form::label('sell_note',__('sale.sell_note')) !!} {!! Form::textarea('sale_note', null, ['class' => 'form-control', 'rows' => 3]); !!}
@endcomponent
@can('sell.payments') @component('components.widget', ['class' => 'box-primary', 'id' => "payment_rows_div", 'title' => __('purchase.add_payment')])
@include('sale_pos.partials.payment_row_form', ['row_index' => 0])
@lang('lang_v1.balance'): 0.00
@endcomponent @endcan
@if(empty($pos_settings['disable_recurring_invoice'])) @include('sale_pos.partials.recurring_invoice_modal') @endif {!! Form::close() !!}
@include('sale_pos.partials.configure_search_modal') @stop @section('javascript') @if(in_array('tables' ,$enabled_modules) || in_array('modifiers' ,$enabled_modules) || in_array('service_staff' ,$enabled_modules)) @endif @endsection