@extends('layouts.app')
@section('title', __('sale.add_sale'))
@section('content')
@if(!empty($pos_settings['allow_overselling']))
@endif
@if(session('business.enable_rp') == 1)
@endif
@if(is_null($default_location))
@endif
{!! Form::open(['url' => action('SellPosController@store'), 'method' => 'post', 'id' => 'add_sell_form' ]) !!}
@component('components.widget', ['class' => 'box-primary'])
{!! Form::hidden('location_id', !empty($default_location) ? $default_location->id : null , ['id' => 'location_id', 'data-receipt_printer_type' => !empty($default_location->receipt_printer_type) ? $default_location->receipt_printer_type : 'browser', 'data-default_accounts' => !empty($default_location) ? $default_location->default_payment_accounts : '']); !!}
@if(!empty($price_groups))
@if(count($price_groups) > 1)
@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))
@endif
@if(in_array('subscription', $enabled_modules))
{!! Form::checkbox('is_recurring', 1, false, ['class' => 'input-icheck', 'id' => 'is_recurring']); !!} @lang('lang_v1.subscribe')?
@show_tooltip(__('lang_v1.recurring_invoice_help'))
@endif
@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('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'])
@php
$hide_tax = '';
if( session()->get('business.enable_inline_tax') == 0){
$hide_tax = 'hide';
}
@endphp
@lang('sale.product')
@lang('sale.qty')
@if(!empty($pos_settings['inline_service_staff']))
@lang('restaurant.service_staff')
@endif
@lang('sale.price_inc_tax')
@lang('sale.subtotal')
@lang('sale.item'):
0
@lang('sale.total'):
0
@endcomponent
@component('components.widget', ['class' => 'box-primary'])
@php
$max_discount = !is_null(auth()->user()->max_sales_discount_percent) ? auth()->user()->max_sales_discount_percent : '';
//if sale discount is more than user max discount change it to max discount
$sales_discount = $business_details->default_sales_discount;
if($max_discount != '' && $sales_discount > $max_discount) $sales_discount = $max_discount;
@endphp
@lang( 'sale.discount_amount' ): (-)
0
{{session('business.rp_name')}}
@lang('lang_v1.available'): 0
@lang('lang_v1.redeemed_amount'): (-)0
@lang( 'sale.order_tax' ): (+)
0
{!! 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')]); !!}
@if(!empty($pos_settings['amount_rounding_method']) && $pos_settings['amount_rounding_method'] > 0)
(@lang('lang_v1.round_off'): 0 )
@endif
@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')])
@lang('lang_v1.advance_balance'):
{!! Form::hidden('advance_balance', null, ['id' => 'advance_balance', 'data-error-msg' => __('lang_v1.required_advance_balance_not_available')]); !!}
@include('sale_pos.partials.payment_row_form', ['row_index' => 0])
@lang('lang_v1.balance'): 0.00
@endcomponent
@endcan
{!! Form::hidden('is_save_and_print', 0, ['id' => 'is_save_and_print']); !!}
@lang('messages.save')
@lang('lang_v1.save_and_print')
@if(empty($pos_settings['disable_recurring_invoice']))
@include('sale_pos.partials.recurring_invoice_modal')
@endif
{!! Form::close() !!}
@include('contact.create', ['quick_add' => true])
@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