@extends('layouts.app') @section('title', 'NTTN Links') @section('content')
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif

NTTN Links

Manage NTTN links

Create NTTN Link
Total Quantity

{{ number_format($totalQuantity ?? 0, 2) }}

Total Sell VAT

৳ {{ number_format($totalSellVAT ?? 0, 2) }}

Total Sell Amount

৳ {{ number_format($totalSellAmount ?? 0, 2) }}

Total Cast VAT

৳ {{ number_format($totalCastVAT ?? 0, 2) }}

Total Cast Amount

৳ {{ number_format($totalCastAmount ?? 0, 2) }}

Total Profit/Loss

৳ {{ number_format($totalProfitLoss ?? 0, 2) }}

Reset
NTTN Links List
@if(request('search')) @endif @if(request('status')) @endif @if(request('customer_id')) @endif @if(request('item_id')) @endif
SHOW ENTRIES
@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 Item 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 ?? '-' }} {{ $link->item->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

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