@php
$product_name = $product->product_name . ' ' . $product->sub_sku ;
if(!empty($product->brand)){ $product_name .= ' ' . $product->brand ;}
@endphp
@if(auth()->user()->can('edit_product_price_from_sale_screen') || auth()->user()->can('edit_product_discount_from_sale_screen') )
{!! $product_name !!}
@else
{!! $product_name !!}
@endif
@php
$hide_tax = 'hide';
if(session()->get('business.enable_inline_tax') == 1){
$hide_tax = '';
}
$tax_id = $product->tax_id;
$item_tax = !empty($product->item_tax) ? $product->item_tax : 0;
$unit_price_inc_tax = $product->sell_price_inc_tax;
if($hide_tax == 'hide'){
$tax_id = null;
$unit_price_inc_tax = $product->default_sell_price;
}
@endphp
@include('sale_pos.partials.row_edit_product_price_modal')
@if(in_array('modifiers' , $enabled_modules))
@if(!empty($product->product_ms))
@include('restaurant.product_modifier_set.modifier_for_product', array('edit_modifiers' => true, 'row_count' => $loop->index, 'product_ms' => $product->product_ms ) )
@endif
@endif
@php
$max_qty_rule = $product->qty_available;
$max_qty_msg = __('validation.custom-messages.quantity_not_available', ['qty'=> $product->formatted_qty_available, 'unit' => $product->unit ]);
@endphp
@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(!empty($product->lot_numbers))
transaction_sell_lines_id)) disabled @endif>
@lang('lang_v1.lot_n_expiry')
@foreach($product->lot_numbers as $lot_number)
@php
$selected = "";
if($lot_number->purchase_line_id == $lot_no_line_id){
$selected = "selected";
$max_qty_rule = $lot_number->qty_available;
$max_qty_msg = __('lang_v1.quantity_error_msg_in_lot', ['qty'=> $lot_number->qty_formated, 'unit' => $product->unit ]);
}
$expiry_text = '';
if($exp_enabled == 1 && !empty($lot_number->exp_date)){
if( \Carbon::now()->gt(\Carbon::createFromFormat('Y-m-d', $lot_number->exp_date)) ){
$expiry_text = '(' . __('report.expired') . ')';
}
}
@endphp
@if(!empty($lot_number->lot_number) && $lot_enabled == 1){{$lot_number->lot_number}} @endif @if($lot_enabled == 1 && $exp_enabled == 1) - @endif @if($exp_enabled == 1 && !empty($lot_number->exp_date)) @lang('product.exp_date'): {{@format_date($lot_number->exp_date)}} @endif {{$expiry_text}}
@endforeach
@endif
@endif
{{-- 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-decimal=0 data-rule-abs_digit="true" data-msg-abs_digit="@lang('lang_v1.decimal_value_not_allowed')" @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-qty_available="{{$product->qty_available}}" data-msg-max-value="{{$max_qty_msg}}" data-msg_max_default="@lang('validation.custom-messages.quantity_not_available', ['qty'=> $product->formatted_qty_available, 'unit' => $product->unit ])" @endif >
{{$product->unit}}
user()->can('edit_product_price_from_sale_screen')) readonly @endif @if(!empty($pos_settings['enable_msp'])) data-rule-min-value="{{$unit_price_inc_tax}}" data-msg-min-value="{{__('lang_v1.minimum_selling_price_error_msg', ['price' => @num_format($unit_price_inc_tax)])}}" @endif>
@php
$subtotal_type = !empty($pos_settings['is_pos_subtotal_editable']) ? 'text' : 'hidden';
@endphp
{{$product->quantity_ordered*$unit_price_inc_tax}}