@extends('layouts.app') @section('title', 'NTTN Links for ' . $nttnItem->name) @section('content')
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif

NTTN Links for: {{ $nttnItem->name }}

All links associated with this NTTN Item

Back to Items List Create NTTN Link
Reset
NTTN Links List for {{ $nttnItem->name }}
@forelse($nttnLinks as $link) @php $totalSellAmount = ($link->sell_rate + ($link->sell_rate * $link->sell_vat / 100)) * $link->quantity; $totalCastAmount = ($link->cast_rate + ($link->cast_rate * $link->cast_vat / 100)) * $link->quantity; $profitLoss = $totalSellAmount - $totalCastAmount; @endphp @empty @endforelse @if($nttnLinks->count() > 0) @php $totalQuantity = 0; $totalSellVAT = 0; $totalSellAmount = 0; $totalCastVAT = 0; $totalCastAmount = 0; $totalProfitLoss = 0; foreach($nttnLinks as $link) { $totalQuantity += $link->quantity; $totalSellVAT += ($link->sell_rate * $link->sell_vat / 100) * $link->quantity; $totalSellAmount += ($link->sell_rate + ($link->sell_rate * $link->sell_vat / 100)) * $link->quantity; $totalCastVAT += ($link->cast_rate * $link->cast_vat / 100) * $link->quantity; $totalCastAmount += ($link->cast_rate + ($link->cast_rate * $link->cast_vat / 100)) * $link->quantity; } $totalProfitLoss = $totalSellAmount - $totalCastAmount; @endphp @endif
ID Link Name Customer Quantity Sell Rate Sell VAT Total Sell VAT Total Sell Amount Cast Rate Cast VAT Total Cast VAT Total Cast Amount Profit & Loss Status Actions
{{ $link->id }} {{ $link->link_name }} {{ $link->customer->company_name ?? $link->customer->name ?? '-' }} {{ number_format($link->quantity, 2) }} ৳ {{ number_format($link->sell_rate, 2) }} {{ number_format($link->sell_vat, 2) }}% ৳ {{ number_format(($link->sell_rate * $link->sell_vat / 100) * $link->quantity, 2) }} ৳ {{ number_format(($link->sell_rate + ($link->sell_rate * $link->sell_vat / 100)) * $link->quantity, 2) }} ৳ {{ number_format($link->cast_rate, 2) }} {{ number_format($link->cast_vat, 2) }}% ৳ {{ number_format(($link->cast_rate * $link->cast_vat / 100) * $link->quantity, 2) }} ৳ {{ number_format(($link->cast_rate + ($link->cast_rate * $link->cast_vat / 100)) * $link->quantity, 2) }} ৳ {{ number_format($profitLoss, 2) }} @if($link->status == 'active') Active @else Inactive @endif
@csrf @method('DELETE')

No NTTN links found for this item

Total: {{ number_format($totalQuantity, 2) }} - - ৳ {{ number_format($totalSellVAT, 2) }} ৳ {{ number_format($totalSellAmount, 2) }} - - ৳ {{ number_format($totalCastVAT, 2) }} ৳ {{ number_format($totalCastAmount, 2) }} ৳ {{ number_format($totalProfitLoss, 2) }} -
{{ $nttnLinks->links() }}
@endsection