@php if ($action == 'edit') { $max_qty_rule = $product->quantity_ordered + floatval($old_product_qty_available[$i]); } else { $max_qty_rule = $product->formatted_qty_available; } $max_qty_msg = __('validation.custom-messages.quantity_not_available', [ 'qty' => $max_qty_rule, 'unit' => $product->unit, ]); $allow_decimal = true; @endphp @isset($loop->iteration) {{ $loop->iteration }} @endisset {{ $product->product_name }}
{{ $product->sub_sku }} @if (session()->get('business.enable_lot_number') == 1 || session()->get('business.enable_product_expiry') == 1) @php $lot_enabled = session()->get('business.enable_lot_number'); $exp_enabled = session()->get('business.enable_product_expiry'); $lot_no_line_id = ''; if (!empty($product->lot_no_line_id)) { $lot_no_line_id = $product->lot_no_line_id; } @endphp @if ($product->enable_stock == 1)
@lang('report.current_stock'): {{ $product->formatted_qty_available }} {{ $product->unit }} @endif @if (!empty($product->lot_numbers)) @endif @endif @php $old_qty = 'text'; if (empty($product->quantity_ordered)) { $old_qty = $product->quantity_ordered; } if (empty($product->quantity_ordered)) { $product->quantity_ordered = 1; } $multiplier = 1; if ($product->unit_allow_decimal != 1) { $allow_decimal = false; } $qty_ordered = $product->quantity_ordered; @endphp @foreach ($sub_units as $key => $value) @if (!empty($product->sub_unit_id) && $product->sub_unit_id == $key) @php $multiplier = $value['multiplier']; $max_qty_rule = $max_qty_rule / $multiplier; $unit_name = $value['name']; $max_qty_msg = __('validation.custom-messages.quantity_not_available', [ 'qty' => $max_qty_rule, 'unit' => $unit_name, ]); if (!empty($product->lot_no_line_id)) { $max_qty_msg = __('lang_v1.quantity_error_msg_in_lot', [ 'qty' => $max_qty_rule, 'unit' => $unit_name, ]); } if ($value['allow_decimal']) { $allow_decimal = true; } @endphp @endif @endforeach @php $qty_ordered = $product->quantity_ordered / $multiplier; @endphp {{-- If edit then transaction sell lines will be present --}} @if (!empty($product->transaction_sell_lines_id)) @endif @if (empty($product->quantity_ordered)) @php $product->quantity_ordered = 1; @endphp @endif unit_allow_decimal == 1) data-decimal=1 @else data-rule-abs_digit="true" data-msg-abs_digit="@lang('lang_v1.decimal_value_not_allowed')" data-decimal=0 @endif data-rule-required="true" data-msg-required="@lang('validation.custom-messages.this_field_is_required')" @if ($product->enable_stock) data-rule-max-value="{{ $max_qty_rule }}" data-msg-max-value="{{ $max_qty_msg }}" data-qty_available="{{ $product->qty_available }}" data-msg_max_default="@lang('validation.custom-messages.quantity_not_available', ['qty'=> $product->formatted_qty_available, 'unit' => $product->unit ])" @endif> @php if ($old_qty == null) { $qty_ordered = 0; } else { $qty_ordered = $qty_ordered; } @endphp @if (!empty($sub_units))
@else {{ $product->unit }} @endif