@extends('layouts.app') @section('title', __('lang_v1.import_sales')) @section('content')
@if (session('notification') || !empty($notification))
@if(!empty($notification['msg'])) {{$notification['msg']}} @elseif(session('notification.msg')) {{ session('notification.msg') }} @endif
@endif
@component('components.widget', ['class' => 'box-primary', 'title' => __( 'lang_v1.import_sales' ), 'icon' => 'fa fas fa-download text-primary'])
@slot('tool') @endslot {!! Form::open(['url' => action([\App\Http\Controllers\ImportSalesController::class, 'preview']), 'method' => 'post', 'enctype' => 'multipart/form-data' ]) !!}
{!! Form::label('name', __( 'product.file_to_import' ) . ':') !!} {!! Form::file('sales', ['required' => 'required','class' => 'upload-product-price']); !!}
{!! Form::close() !!} @endcomponent
@component('components.widget', ['class' => 'box-primary', 'title' => __( 'lang_v1.instructions' ), 'icon' => 'fa fas fa-bullhorn text-primary'])
1. @lang('lang_v1.upload_data_in_excel_format')
2. @lang('lang_v1.choose_location_and_group_by')
3. @lang('lang_v1.map_columns_with_respective_sales_fields')
4. @foreach($import_fields as $key => $value) @endforeach
@lang('lang_v1.importable_fields') @lang('lang_v1.instructions')
{{$value['label']}} {{$value['instruction'] ?? ''}}
@endcomponent
@component('components.widget',['class' => 'box-primary', 'title' => __( 'lang_v1.imports' ), 'icon' => 'ni ni-cloud-download-95 text-primary'])
@can('sell.delete') @endcan @foreach($imported_sales_array as $key => $value) @can('sell.delete') @endcan @endforeach
@lang('lang_v1.import_batch') @lang('lang_v1.import_time') @lang('business.created_by') @lang('lang_v1.invoices')@lang('messages.action')
{{$key}} {{@format_datetime($value['import_time'])}} {{$value['created_by']}} {{implode(', ', $value['invoices'])}}

(@lang('sale.total'): {{count($value['invoices'])}})

@endcomponent
@stop @section('javascript') @endsection