@extends('layouts.app') @section('title', __('lang_v1.product_discount')) @section('content')

@lang('lang_v1.product_discount'): {{ $product->name }} ({{ $product->sku }})

@lang('lang_v1.quantity_based_discounts')

{!! Form::open(['url' => action([\App\Http\Controllers\ProductController::class, 'saveProductDiscount']), 'method' => 'post', 'id' => 'discount_form']) !!} {!! Form::hidden('product_id', $product->id) !!}
@lang('sale.product'): {{ $product->name }}
@lang('product.sku'): {{ $product->sku }}
@lang('lang_v1.default_selling_price'): @if(!empty($product->variations->first())) {{ $product->variations->first()->sell_price_inc_tax }} @else {{ __('lang_v1.not_applicable') }} @endif

@lang('lang_v1.enable_quantity_based_discounts_for_this_product')
@if($product->type == 'variable')
@lang('lang_v1.note'): @lang('lang_v1.variable_product_prices_will_apply_to_all_variations')
@endif
@if($product->type == 'variable' && !empty($product->variations))
@foreach($product->variations as $variation) @endforeach
@lang('lang_v1.variation') @lang('lang_v1.sub_sku') @lang('lang_v1.default_selling_price') @lang('lang_v1.default_purchase_price')
@if(!empty($variation->product_variation)) {{ $variation->product_variation->name }} - @endif {{ $variation->name }} {{ $variation->sub_sku }} {{ $variation->sell_price_inc_tax }} {{ $variation->dpp_inc_tax }}
@endif
@php $row_count = 0; @endphp @if(!empty($discounts)) @foreach($discounts as $discount) @php $row_count++; @endphp @endforeach @endif
@lang('lang_v1.from_quantity') @lang('lang_v1.to_quantity') @lang('lang_v1.discount_type') @lang('lang_v1.discount_amount')
{!! Form::select('discount_type[]', ['fixed' => __('lang_v1.fixed'), 'percentage' => __('lang_v1.percentage')], $discount->discount_type, ['class' => 'form-control input-sm', 'required']) !!} {!! Form::hidden('discount_id[]', $discount->id) !!}
@lang('messages.cancel')
{!! Form::close() !!}
@stop @section('javascript') @endsection