{{ __('common.sr-no') }} @if(!isSeller()) {{ __('store.title1') }} @include('up-down') @endif {{ __('add_stock.stock_no') }} @include('up-down') {{ __('add_stock.start_date') }} @include('up-down') {{ __('add_stock.close_date') }} {{ __('add_stock.total_amount') }} {{ __('add_stock.remarks') }} {{ __('common.action') }} @php $startIndex = ($data->currentPage() - 1) * $data->perPage() + 1; @endphp @forelse($data as $key => $detail) @php $id = $detail->id; $totalPrice = $totalPriceBrutto = 0; if (isset($stockItems[$id]) && is_object($stockItems[$id])) { foreach ($stockItems[$id] as $row) { $price = $row->item_price; $weight = $row->weight; $adjId = $row->adjustment_id; $priceBrutto = $row->sale_price_incl; if ($adjId > 62) { $price = $row->sale_price_excl; $weight = $row->stock_weight; } if ($weight > 0) { $price = $price / $weight; $priceBrutto = $priceBrutto / $weight; // divided by weight because netto is also divided by weight in already existed code @author Sonil Kaur 02-08-2024 05:41 PM } $totalPrice += $price * $row->quantity; $totalPriceBrutto += $priceBrutto * $row->quantity; } } @endphp {{ $startIndex++ }} @if ($storeId <= 0) {{ $detail->store_name }} @endif {!! $detail->name !!} ({{ '#' . $detail->id }}) {{ dateFormat($detail->adjustment_dt, DISPLAY_DATETIME3) }} {{ dateFormat($detail->close_dt, DISPLAY_DATETIME3) }} {{ numberFormat($totalPrice, 1, false) . " (" .numberFormat($totalPriceBrutto, 1, false) . ")" }} @if(env('ISLIVE') && $detail->id > 300)   @else   @endif {{ ($detail->is_active == 1) ? 'Active' : 'Closed' }} | @if ($storeId <= 0) | @endif @empty {{__('common.no_records')}} @endforelse @include('pagination', ['data' => $data])