@if (count($combinations[0]) > 0)
| {{ translate('Variant') }} | {{ translate('SKU') }} | {{ translate('Sale Price') }} | {{ translate('Cost Price') }} | {{ translate('Market Price') }} | {{ translate('Quantity') }} | {{ translate('Weight') }} | |
| @php if (($stock = $product->stocks->where('variant', $str)->first()) != null) { $sku = $stock->sku; } else { $sku = $str; } @endphp {!! Form::text('sku_' . $str, $sku, ['required' => 'required', 'class' => 'form-control']) !!} |
@php
if (($stock = $product->stocks->where('variant', $str)->first()) != null) {
$stock_qty = $stock->qty;
$stock_limit = $stock->current_stock_unlimited;
} else {
$stock_qty = 10;
$stock_limit = 0;
}
@endphp
@if ($stock_limit == 1)
{!! Form::number('qty_' . $str, $stock_qty, ['disabled' => 'disabled', 'id' => 'qty_' . $str, 'min' => '0', 'step' => '1', 'required' => 'required', 'class' => 'form-control']) !!}
@else
{!! Form::number('qty_' . $str, $stock_qty, ['id' => 'qty_' . $str, 'min' => '0', 'step' => '1', 'required' => 'required', 'class' => 'form-control']) !!}
@endif
{!! Form::checkbox('current_stock_unlimited_' . $str, null, $stock_limit, ['class' => 'current_stock_unlimited', 'mid' => $str, 'id' => 'Checkboxs_' . $str]) !!}
|
@php
if (($stock = $product->stocks->where('variant', $str)->first()) != null) {
$weight = $stock->weight;
}
if (($stock = $product->stocks->where('variant', $str)->first()) != null) {
$measruing_unit = $stock->measruing_unit;
}
@endphp
{!! Form::number('weight_' . $str, $weight, ['min' => '0', 'step' => '1', 'required' => 'required', 'class' => 'form-control']) !!}
{!! Form::select('measruing_unit_' . $str, ['kg' => 'KG', 'g' => 'G', 'lb' => 'LB'], $measruing_unit, ['class' => 'form-control ']) !!}
|
|