@can('offer.create')
{!! Form::open(['url' => action([\App\Http\Controllers\OfferController::class, 'update'], [$offerData->id]), 'method' => 'put', 'id' => 'offer_form' ]) !!}
{!! Form::label('offer_type', __( 'lang_v1.select_offer_type' ) . ':*') !!}
{!! Form::select('offer_type', [''=> 'Select Offer Type', '1'=> 'Individual Item', '2'=> 'Bill Amount', '3' => 'Based On Qty' ], isset($offer_type) ? $offer_type : '', ['onchange' => 'javascript:onChange(this.value)', 'class' => 'form-control select2', 'id' => 'unit_id']); !!}
{!! Form::label('offer_for', 'Offer For:*') !!}
{!! Form::select('offer_for', ['' => 'Select offer for','1'=> 'All Stores', '2'=> 'Specific Store'], $offerData->offer_for, ['onchange' => "javascript:($(this).val() == 2) ? $('#divStore').show() : $('#divStore').hide();", 'class' => 'form-control select2', 'id' => 'offer_for']); !!}
offer_for == 2) style="display:block" @endif>
{!! Form::label('location_id', 'Store Name:*') !!}
{!! Form::select('location_id', $locations, $offerData->business_for, ['placeholder' => __('messages.please_select'), 'class' => 'form-control select2']); !!}
{!! Form::label('name', 'Offer Name:*') !!}
{!! Form::text('name', $offerData->name, ['class' => 'form-control', 'required', 'placeholder' => 'Name' ]); !!}
{!! Form::label('min_purchase', 'Min Purchase:*') !!}
{!! Form::text('min_purchase[]', null, ['id' => 'min_purchase', 'placeholder' => 'Min Purchase','class' => 'form-control input_number']); !!}
{!! Form::label('max_purchase', 'Max Purchase:*') !!}
{!! Form::text('max_purchase[]', null, ['id' => 'max_purchase', 'placeholder' => 'Max Purchase','class' => 'form-control input_number']); !!}
{{----
{!! Form::label('discount', 'Discount:*') !!}
{!! Form::text('discount[]', null, ['id' => 'discount', 'class' => 'form-control input_number', 'placeholder' => 'Discount']); !!}
----}}
{{----Free and Discount Section ----}}
{!! Form::label('offer_type_check', 'Offer Type') !!}
{!! Form::checkbox('free_qty', 1, false, ['id' => 'free_qty','class' => 'input-icheck']); !!}
{!! Form::label('free_qty', 'Free Qty') !!}
{!! Form::checkbox('discount', 1, false, ['id' => 'discount','class' => 'input-icheck']); !!}
{!! Form::label('discount', 'Discount') !!}
{{-------------Start Free Qty Tab-----}}
{!! Form::label('item_free_qty', 'Free Qty') !!}
{!! Form::text('item_free_qty[]', 0, ['id' => "item_free_qty",'class' => 'form-control input_number']); !!}
{!! Form::label('free_item_id', __('report.products') . ':') !!}
{!! Form::select('free_item_id[]', [], null, ['id' => "free_item_id", 'class' => 'form-control']); !!}
{{-------------End Free Qty Tab-----}}
{{------------------Start Discount Tab-----}}
| Discount Amount |
{!! Form::text('discount[]', null, ['id' => 'discountAmt', 'class' => 'form-control input_number', 'placeholder' => 'Discount']); !!}
|
{{--------End of Free And Discount Section -------}}
{!! Form::label('offer_start_date', 'Offers Start Date:*') !!}
{!! Form::text('offer_start_date', $start_date, ['class' => 'form-control', 'required', 'placeholder' => __( 'lang_v1.starts_at' ),'required' => 'required']); !!}
{!! Form::label('offer_end_date', 'Offers End Date:*') !!}
{!! Form::text('offer_end_date', $end_date, ['class' => 'form-control', 'required', 'placeholder' => __( 'lang_v1.ends_at' ),'required' => 'required']); !!}
{!! Form::label('status', 'Status') !!}
{!! Form::checkbox('status', 1, $offerData->status == 1 ? true : '', ['class' => 'input-icheck']); !!} @lang('lang_v1.is_active')