@extends('layouts.app')
@section('title', __('sale.edit_sale'))
@section('content')
@if(!empty($pos_settings['allow_overselling']))
@endif
@if(session('business.enable_rp') == 1)
@endif
@php
$custom_labels = json_decode(session('business.custom_labels'), true);
@endphp
{!! Form::open(['url' => action('SellPosController@update', ['id' => $transaction->id ]), 'method' => 'put', 'id' => 'edit_sell_form', 'files' => true ]) !!}
{!! Form::hidden('location_id', $transaction->location_id, ['id' => 'location_id', 'data-receipt_printer_type' => !empty($location_printer_type) ? $location_printer_type : 'browser']); !!}
@component('components.widget', ['class' => 'box-solid'])
@if(!empty($transaction->selling_price_group_id))
@endif
@if(in_array('types_of_service', $enabled_modules) && !empty($transaction->types_of_service))
@if(!empty($transaction->types_of_service))
@include('types_of_service.pos_form_modal', ['types_of_service' => $transaction->types_of_service])
@endif
@endif
@if(in_array('subscription', $enabled_modules))
@show_tooltip(__('lang_v1.recurring_invoice_help'))
@endif
@lang('lang_v1.billing_address'):
{!! $transaction->contact->contact_address ?? '' !!}
@lang('lang_v1.shipping_address'):
{!! $transaction->contact->supplier_business_name ?? '' !!},
{!! $transaction->contact->name ?? '' !!},
{!!$transaction->contact->shipping_address ?? '' !!}
@if(!empty($commission_agent))
{!! Form::label('commission_agent', __('lang_v1.commission_agent') . ':') !!}
{!! Form::select('commission_agent',
$commission_agent, $transaction->commission_agent, ['class' => 'form-control select2']); !!}
@endif
@php
if($transaction->status == 'draft' && $transaction->is_quotation == 1){
$status = 'quotation';
} else if ($transaction->status == 'draft' && $transaction->sub_status == 'proforma') {
$status = 'proforma';
} else {
$status = $transaction->status;
}
@endphp
{!! Form::label('status', __('sale.status') . ':*') !!}
{!! Form::select('status', ['final' => __('sale.final'), 'draft' => __('sale.draft'), 'quotation' => __('lang_v1.quotation'), 'proforma' => __('lang_v1.proforma')], $status, ['class' => 'form-control select2', 'placeholder' => __('messages.please_select'), 'required']); !!}
@if($transaction->status == 'draft')
{!! 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')]); !!}
@endif
@can('edit_invoice_number')
{!! Form::label('invoice_no', __('sale.invoice_no') . ':') !!}
{!! Form::text('invoice_no', $transaction->invoice_no, ['class' => 'form-control', 'placeholder' => __('sale.invoice_no')]); !!}
@endcan
@php
$custom_field_1_label = !empty($custom_labels['sell']['custom_field_1']) ? $custom_labels['sell']['custom_field_1'] : '';
$is_custom_field_1_required = !empty($custom_labels['sell']['is_custom_field_1_required']) && $custom_labels['sell']['is_custom_field_1_required'] == 1 ? true : false;
$custom_field_2_label = !empty($custom_labels['sell']['custom_field_2']) ? $custom_labels['sell']['custom_field_2'] : '';
$is_custom_field_2_required = !empty($custom_labels['sell']['is_custom_field_2_required']) && $custom_labels['sell']['is_custom_field_2_required'] == 1 ? true : false;
$custom_field_3_label = !empty($custom_labels['sell']['custom_field_3']) ? $custom_labels['sell']['custom_field_3'] : '';
$is_custom_field_3_required = !empty($custom_labels['sell']['is_custom_field_3_required']) && $custom_labels['sell']['is_custom_field_3_required'] == 1 ? true : false;
$custom_field_4_label = !empty($custom_labels['sell']['custom_field_4']) ? $custom_labels['sell']['custom_field_4'] : '';
$is_custom_field_4_required = !empty($custom_labels['sell']['is_custom_field_4_required']) && $custom_labels['sell']['is_custom_field_4_required'] == 1 ? true : false;
@endphp
@if(!empty($custom_field_1_label))
@php
$label_1 = $custom_field_1_label . ':';
if($is_custom_field_1_required) {
$label_1 .= '*';
}
@endphp
{!! Form::label('custom_field_1', $label_1 ) !!}
{!! Form::text('custom_field_1', $transaction->custom_field_1, ['class' => 'form-control','placeholder' => $custom_field_1_label, 'required' => $is_custom_field_1_required]); !!}
@endif
@if(!empty($custom_field_2_label))
@php
$label_2 = $custom_field_2_label . ':';
if($is_custom_field_2_required) {
$label_2 .= '*';
}
@endphp
{!! Form::label('custom_field_2', $label_2 ) !!}
{!! Form::text('custom_field_2', $transaction->custom_field_2, ['class' => 'form-control','placeholder' => $custom_field_2_label, 'required' => $is_custom_field_2_required]); !!}
@endif
@if(!empty($custom_field_3_label))
@php
$label_3 = $custom_field_3_label . ':';
if($is_custom_field_3_required) {
$label_3 .= '*';
}
@endphp
{!! Form::label('custom_field_3', $label_3 ) !!}
{!! Form::text('custom_field_3', $transaction->custom_field_3, ['class' => 'form-control','placeholder' => $custom_field_3_label, 'required' => $is_custom_field_3_required]); !!}
@endif
@if(!empty($custom_field_4_label))
@php
$label_4 = $custom_field_4_label . ':';
if($is_custom_field_4_required) {
$label_4 .= '*';
}
@endphp
{!! Form::label('custom_field_4', $label_4 ) !!}
{!! Form::text('custom_field_4', $transaction->custom_field_4, ['class' => 'form-control','placeholder' => $custom_field_4_label, 'required' => $is_custom_field_4_required]); !!}
@endif
@if(in_array('tables' ,$enabled_modules) || in_array('service_staff' ,$enabled_modules))
@endif
@endcomponent
@component('components.widget', ['class' => 'box-solid'])
@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.unit_price')
|
@lang('receipt.discount')
|
@lang('sale.tax')
|
@lang('sale.price_inc_tax')
|
@lang('sale.subtotal')
|
|
@foreach($sell_details as $sell_line)
@include('sale_pos.product_row', ['product' => $sell_line, 'row_count' => $loop->index, 'tax_dropdown' => $taxes, 'sub_units' => !empty($sell_line->unit_details) ? $sell_line->unit_details : [], 'action' => 'edit', 'is_direct_sell' => true ])
@endforeach
@lang('sale.item'):
0
@lang('sale.total'):
0
|
@endcomponent
@component('components.widget', ['class' => 'box-solid'])
@php
$max_discount = !is_null(auth()->user()->max_sales_discount_percent) ? auth()->user()->max_sales_discount_percent : '';
@endphp
@lang( 'sale.discount_amount' ):(-)
0
{{session('business.rp_name')}}
@lang('lang_v1.available'): {{$redeem_details['points'] ?? 0}}
@lang('lang_v1.redeemed_amount'): (-){{@num_format($transaction->rp_redeemed_amount)}}
@lang( 'sale.order_tax' ):(+)
{{$transaction->tax_amount}}
{!! Form::label('sell_note',__('sale.sell_note') . ':') !!}
{!! Form::textarea('sale_note', $transaction->additional_notes, ['class' => 'form-control', 'rows' => 3]); !!}
@endcomponent
@component('components.widget', ['class' => 'box-solid'])
{!! Form::label('shipping_details', __('sale.shipping_details')) !!}
{!! Form::textarea('shipping_details',$transaction->shipping_details, ['class' => 'form-control','placeholder' => __('sale.shipping_details') ,'rows' => '3', 'cols'=>'30']); !!}
{!! Form::label('shipping_address', __('lang_v1.shipping_address')) !!}
{!! Form::textarea('shipping_address', $transaction->shipping_address, ['class' => 'form-control','placeholder' => __('lang_v1.shipping_address') ,'rows' => '3', 'cols'=>'30']); !!}
{!! Form::label('shipping_status', __('lang_v1.shipping_status')) !!}
{!! Form::select('shipping_status',$shipping_statuses, $transaction->shipping_status, ['class' => 'form-control','placeholder' => __('messages.please_select')]); !!}
{!! Form::label('delivered_to', __('lang_v1.delivered_to') . ':' ) !!}
{!! Form::text('delivered_to', $transaction->delivered_to, ['class' => 'form-control','placeholder' => __('lang_v1.delivered_to')]); !!}
@php
$shipping_custom_label_1 = !empty($custom_labels['shipping']['custom_field_1']) ? $custom_labels['shipping']['custom_field_1'] : '';
$is_shipping_custom_field_1_required = !empty($custom_labels['shipping']['is_custom_field_1_required']) && $custom_labels['shipping']['is_custom_field_1_required'] == 1 ? true : false;
$shipping_custom_label_2 = !empty($custom_labels['shipping']['custom_field_2']) ? $custom_labels['shipping']['custom_field_2'] : '';
$is_shipping_custom_field_2_required = !empty($custom_labels['shipping']['is_custom_field_2_required']) && $custom_labels['shipping']['is_custom_field_2_required'] == 1 ? true : false;
$shipping_custom_label_3 = !empty($custom_labels['shipping']['custom_field_3']) ? $custom_labels['shipping']['custom_field_3'] : '';
$is_shipping_custom_field_3_required = !empty($custom_labels['shipping']['is_custom_field_3_required']) && $custom_labels['shipping']['is_custom_field_3_required'] == 1 ? true : false;
$shipping_custom_label_4 = !empty($custom_labels['shipping']['custom_field_4']) ? $custom_labels['shipping']['custom_field_4'] : '';
$is_shipping_custom_field_4_required = !empty($custom_labels['shipping']['is_custom_field_4_required']) && $custom_labels['shipping']['is_custom_field_4_required'] == 1 ? true : false;
$shipping_custom_label_5 = !empty($custom_labels['shipping']['custom_field_5']) ? $custom_labels['shipping']['custom_field_5'] : '';
$is_shipping_custom_field_5_required = !empty($custom_labels['shipping']['is_custom_field_5_required']) && $custom_labels['shipping']['is_custom_field_5_required'] == 1 ? true : false;
@endphp
@if(!empty($shipping_custom_label_1))
@php
$label_1 = $shipping_custom_label_1 . ':';
if($is_shipping_custom_field_1_required) {
$label_1 .= '*';
}
@endphp
{!! Form::label('shipping_custom_field_1', $label_1 ) !!}
{!! Form::text('shipping_custom_field_1', !empty($transaction->shipping_custom_field_1) ? $transaction->shipping_custom_field_1 : null, ['class' => 'form-control','placeholder' => $shipping_custom_label_1, 'required' => $is_shipping_custom_field_1_required]); !!}
@endif
@if(!empty($shipping_custom_label_2))
@php
$label_2 = $shipping_custom_label_2 . ':';
if($is_shipping_custom_field_2_required) {
$label_2 .= '*';
}
@endphp
{!! Form::label('shipping_custom_field_2', $label_2 ) !!}
{!! Form::text('shipping_custom_field_2', !empty($transaction->shipping_custom_field_2) ? $transaction->shipping_custom_field_2 : null, ['class' => 'form-control','placeholder' => $shipping_custom_label_2, 'required' => $is_shipping_custom_field_2_required]); !!}
@endif
@if(!empty($shipping_custom_label_3))
@php
$label_3 = $shipping_custom_label_3 . ':';
if($is_shipping_custom_field_3_required) {
$label_3 .= '*';
}
@endphp
{!! Form::label('shipping_custom_field_3', $label_3 ) !!}
{!! Form::text('shipping_custom_field_3', !empty($transaction->shipping_custom_field_3) ? $transaction->shipping_custom_field_3 : null, ['class' => 'form-control','placeholder' => $shipping_custom_label_3, 'required' => $is_shipping_custom_field_3_required]); !!}
@endif
@if(!empty($shipping_custom_label_4))
@php
$label_4 = $shipping_custom_label_4 . ':';
if($is_shipping_custom_field_4_required) {
$label_4 .= '*';
}
@endphp
{!! Form::label('shipping_custom_field_4', $label_4 ) !!}
{!! Form::text('shipping_custom_field_4', !empty($transaction->shipping_custom_field_4) ? $transaction->shipping_custom_field_4 : null, ['class' => 'form-control','placeholder' => $shipping_custom_label_4, 'required' => $is_shipping_custom_field_4_required]); !!}
@endif
@if(!empty($shipping_custom_label_5))
@php
$label_5 = $shipping_custom_label_5 . ':';
if($is_shipping_custom_field_5_required) {
$label_5 .= '*';
}
@endphp
{!! Form::label('shipping_custom_field_5', $label_5 ) !!}
{!! Form::text('shipping_custom_field_5', !empty($transaction->shipping_custom_field_5) ? $transaction->shipping_custom_field_5 : null, ['class' => 'form-control','placeholder' => $shipping_custom_label_5, 'required' => $is_shipping_custom_field_5_required]); !!}
@endif
@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
@endcomponent
{!! Form::hidden('is_save_and_print', 0, ['id' => 'is_save_and_print']); !!}
@if(in_array('subscription', $enabled_modules))
@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