@extends('layouts.layout-horizontal') @section('title', 'Mass Update Cost Price') @section('css') @endsection @section('content')
Loading {{ $products->count() }} of {{ $products->total() }} products...
Search and pagination are handled by the server.
Mass Update Cost Price
@if($q !== '' || $missing) Clear @endif
Back
@if(session('success')) @endif
@csrf
Select an existing HSN to auto-fill its latest tax, or type a new HSN.
@foreach(array_keys($hsnTaxOptions ?? []) as $hsn) @endforeach
@forelse($products as $i => $p) @php $currentTax = $p->latestTaxRate?->percentage; $currentTaxStr = $currentTax !== null ? rtrim(rtrim(number_format((float)$currentTax, 2, '.', ''), '0'), '.') : ''; @endphp @empty @endforelse
# Product ID Name HSN Current Cost Price New Cost Price Current Tax % New Tax %
{{ ($products->firstItem() ?? 1) + $i }} {{ $p->product_id }} {{ $p->name }} {{ $p->mrp ? number_format($p->mrp, 2) : '-' }} {{ $currentTax !== null ? rtrim(rtrim(number_format((float)$currentTax, 2, '.', ''), '0'), '.') . '%' : '-' }} @if($p->latestTaxRate)
since {{ \Carbon\Carbon::parse($p->latestTaxRate->starts_at)->format('d-M-Y') }}
@endif
No products found.
Showing {{ $products->firstItem() ?? 0 }}-{{ $products->lastItem() ?? 0 }} of {{ $products->total() }}
{{ $products->links() }}
@endsection @section('scripts') @endsection