@extends('admin.layouts.app') @section('content')

{{ $pageTitle }}

@can('admin_store_discounts_create') {{ trans('admin/main.add_new') }} @endcan
@foreach($discounts as $discount) @endforeach
{{ trans('admin/main.title') }} {{ trans('update.product') }} {{ trans('admin/main.percentage') }} {{ trans('admin/main.start_date') }} {{ trans('admin/main.end_date') }} {{ trans('admin/main.usable_times') }} {{ trans('admin/main.status') }} {{ trans('admin/main.actions') }}
{{ $discount->name }} {{ $discount->product->title }} {{ $discount->percent ? $discount->percent . '%' : '-' }} {{ dateTimeFormat($discount->start_date, 'Y/m/d h:i:s') }} {{ dateTimeFormat($discount->end_date, 'Y/m/d h:i:s') }} @if(!empty($discount->count))
{{ $discount->count }}
{{ trans('admin/main.remain') }} : {{ $discount->discountRemain() }}
@else {{ trans('update.unlimited') }} @endif
{{ trans('admin/main.'.$discount->status) }} @can('admin_store_discounts_edit') @endcan @can('admin_store_discounts_delete') @include('admin.includes.delete_button',['url' => getAdminPanelUrl().'/store/discounts/'. $discount->id.'/delete','btnClass' => '']) @endcan
@endsection