@extends('layouts.dashboard') @section('pagehead', $userDetails[0]->company_name . ' Bills') @section('bredcrumb-item-link',url('/home/billing')) @section('bredcrumb-item','All Bills') @section('content')
@include('layouts.notification')
@foreach($data as $key => $bill) @php $gTotal = ($bill->rate * $bill->pageNumber->name) - ($bill->rate * $bill->pageNumber->name * $bill->discount)/100; $billingNumber = \App\Models\BillingNumber::first(); @endphp
{{$userDetails[0]->address . ' ' . $userDetails[0]->state . ' ' . $userDetails[0]->city }} {{ __('FY-' . date('Y',strtotime($bill->show_financial_year->start_date)) . '-' . date('Y',strtotime($bill->show_financial_year->end_date)) )}}
{{strtoupper(str_replace("_",'-',$bill->month)) . ' ' . $bill->created_at->format('Y') . ' | Issue Number:' . $bill->issueNumber->name }}
Bill No {{ $billingNumber->billing_number . $bill->id . '/' . $billingNumber->billing_year}}

Brand : {{ $bill->brand->brand_name }}

@php $find = (str_contains($bill->page_id, ',')) @endphp @if($find) @php $val = \App\Models\PageMaster::whereIn('id', explode(',',$bill->page_id))->get(); $count = count($val); $options = []; foreach($val as $key => $value){ $delimeter = ''; if($key < $count - 1){ $delimeter .= ','; } $options[] = $value->name . $delimeter; } @endphp

Page : {{implode($options)}}

@else @php $val = \App\Models\PageMaster::find($bill->page_id)->first(); @endphp

Page : {{$val->name}}

@endif

Currency : {{ $bill->currency->name }}

HSN: {{ $bill->hsn->name }}

Color: {{ $bill->color->name }}

Rate : {{ $bill->rate }}

Discount : {{ $bill->discount . __('%') }}

SGST : {{ $bill->sgst . __('%') }}

SGST Value : {{ ($gTotal * $bill->sgst)/100 }}

No. of Pages : {{ $bill->pageNumber->name }}

Discount Value : {{ ($bill->rate * $bill->pageNumber->name * $bill->discount)/100 }}

CGST : {{ $bill->cgst . __('%') }}

CGST Value : {{ ($gTotal * $bill->cgst)/100 }}

GTOTAL : {{ number_format((float)$bill->rate * $bill->pageNumber->name , 2, '.', '') }}

Price After Discount : {{ number_format((float)$gTotal, 2, '.', '') }}

IGST : {{ $bill->igst == 0 ? $bill->igst : $bill->igst . __('%') }}

IGST Value : {{ ($gTotal * $bill->igst)/100 }}

GTOTAL With Taxes : {{number_format((float)$gTotal + ($gTotal * $bill->sgst)/100 + ($gTotal * $bill->cgst)/100 + ($gTotal * $bill->igst)/100, 2, '.', '')}}

@endforeach
@endsection