@php $max_qty_rule = $product->qty_available; $formatted_max_quantity = $product->formatted_qty_available; $max_qty_msg = __('validation.custom-messages.quantity_not_available', ['qty'=> $formatted_max_quantity, 'unit' => $product->unit ]); $allow_decimal = true; @endphp @php $ean_code=explode(',',$product->ean_code); @endphp {{$ean_code[0]}}
{{!empty($ean_code[1]?', '.$ean_code[1]:'')}} {{'HSN - '.$product->hsn_code}} {{'Sku - '.$product->sub_sku}} {{$product->product_name}} @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)) @endif @endif @php 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; // $gst_amount = $product->quantity_ordered * ($product->default_purchase_price * $product->tax_amount * 0.01); $product_cost_price = $product->quantity_ordered * ($product->default_purchase_price); $product_basic_price=$product_cost_price /(1+ $product->tax_amount * 0.01); $gst_amount=$product_cost_price-$product_basic_price; // Location Type Condition $cal_type = $product->cal_type; // if($fromLocationType=='store' && $transferLocationType=='store'){ // $selling_price=$product_cost_price; // } // else if($fromLocationType=='store' && $transferLocationType!=='store'){ // $selling_price = round($product->product_mrp / (1+$discountedValue*0.01), 2); // }else{ // $selling_price = round($product->product_mrp / (1+$discountedValue*0.01), 2); // } // End Location Type Condition // Location Type Condition $cal_type = $product->cal_type; if ($fromLocationType == 'store' && $transferLocationType == 'store') { // Store to store transfer, use product cost price as selling price $selling_price = $product_cost_price; } else if ($fromLocationType == 'store' && $transferLocationType !== 'store') { // Store to other type transfer if ($cal_type == 'normal') { // Normal calculation type for discount $selling_price = ($discountedValue > 0) ? $product->product_mrp - (($product->product_mrp * $discountedValue) / 100) : $product->product_mrp; } elseif ($cal_type == 'advance') { // Advanced calculation type $selling_price = round($product->product_mrp / (1 + ($discountedValue * 0.01)), 2); } } else { // Other location types if ($cal_type == 'normal') { // Normal calculation type for discount $selling_price = ($discountedValue > 0) ? $product->product_mrp - (($product->product_mrp * $discountedValue) / 100) : $product->product_mrp; } elseif ($cal_type == 'advance') { // Advanced calculation type $selling_price = round($product->product_mrp / (1 + ($discountedValue * 0.01)), 2); } } @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 > @if(!empty($sub_units)) @else {{$product->unit}} @endif @lang('Weight'): {{@num_format($product->weight ? $qty_ordered * $product->weight :'0')}}{{$product->weight?' Kg':' Kg' }} @if($product->enable_stock == 1) @lang('report.current_stock'): {{$product->formatted_qty_available}} {{ $product->unit }} @endif {{$product->tax_name}}