@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