@php
$startIndex = ($data->currentPage() - 1) * $data->perPage() + 1;
@endphp
@forelse($data as $key => $detail)
@php
$id = $detail->id;
$totalPrice = 0;
if (isset($stockItems[$id]) && is_object($stockItems[$id])) {
foreach ($stockItems[$id] as $row) {
$price = $row->purchase_price;
$weight = $row->weight;
if ($id > 23) {
$price = $row->stock_purchase_price;
$weight = $row->stock_weight;
}
if ($weight > 0) {
$price = $price / $weight;
}
$totalPrice += $price * $row->quantity;
}
}
@endphp
{{ $startIndex++ }} |
#{{ $detail->id }} |
{{ dateFormat($detail->adjustment_dt, SHOW_DATE2) }} |
{{ numberFormat($totalPrice) }} |
{{ $detail->remarks }} |
|
|
|
|
@empty
{{__('common.no_records')}} |
@endforelse