@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->id }} |
{{ dateFormat($detail->adjustment_dt, DISPLAY_DATETIME3) }} |
{{ numberFormat($totalPrice, 1, false) . " (" .numberFormat($totalPriceBrutto, 1, false) . ")" }} |
{{ $detail->remarks }} |
|
|
@if ($storeId <= 0)
|
@endif
|
@empty
{{__('common.no_records')}} |
@endforelse