@extends('layouts.admin.master') @section('title', 'Sale Tax Split Detail Report') @section('vendor-style') @endsection @section('vendor-script') @endsection @section('content')
@if(count($errors) > 0) @endif @if($message = Session::get('success')) @endif
@csrf
@if(isset($sales) && count($sales) > 0)
@if(isset($reports['branch']) && !empty($reports['branch'])) Branch: {{ $reports['branch'] }} @endif
Date: {{ $reports['dates'] }} Export To Excell
@php $grandtotal = 0; $totalQuantity = $totalTaxable = $cgstamountTotal = $sgstamountTotal = $igstamountTotal = $freightCoolie = $otherexp = 0; $valExist = array(); @endphp @foreach($sales as $sale) @php $total_tax = ($sale->cgst_amount + $sale->sgst_amount); $totalQuantity = $totalQuantity + $sale->quantity; $totalTaxable = $totalTaxable + $sale->taxable_amount; $cgstamountTotal = $cgstamountTotal + (($sale->sale->tax_type != 'IGST') ? $sale->cgst_amount : '0.00'); $sgstamountTotal = $sgstamountTotal + (($sale->sale->tax_type != 'IGST') ? $sale->sgst_amount : '0.00'); $igstamountTotal = $igstamountTotal + (($sale->sale->tax_type == 'IGST') ? $total_tax : '0.00'); $freightCoolie = $freightCoolie + $sale->sale->freight_coolie; $otherexp = $otherexp + $sale->sale->otherexp; if(!in_array($sale->sale->invoice_no, $valExist)) { $grandtotal = $grandtotal + $sale->sale->grand_total; } @endphp @php $valExist[] = $sale->sale->invoice_no; @endphp @endforeach
Invoice Date Invoice No Type Customer GSTIN/UIN Bill Amount Quantity HSN/SAC Taxable CGST Rate CGST Amount SGST Rate SGST Amount IGST Rate IGST Amount Freight Coolie Other Expense
{{ date('d-m-Y', strtotime($sale->sale->sale_date)) }} {{ $sale->sale->invoice_no }} {{ $sale->sale->bill_type }} {{ $sale->sale->customer->name }} {{ $sale->sale->customer->gstin }} {{ (!in_array($sale->sale->invoice_no, $valExist))?$sale->sale->grand_total:'' }} {{ $sale->quantity }} {{ $sale->product->hsncode }} {{ $sale->taxable_amount }} {{ ($sale->sale->tax_type != 'IGST') ? ($sale->cgst / 2) : '0.00' }} {{ ($sale->sale->tax_type != 'IGST') ? $sale->cgst_amount : '0.00' }} {{ ($sale->sale->tax_type != 'IGST') ? $sale->sgst : '0.00' }} {{ ($sale->sale->tax_type != 'IGST') ? $sale->sgst_amount : '0.00' }} {{ ($sale->sale->tax_type == 'IGST') ? $sale->cgst : '0.00' }} {{ ($sale->sale->tax_type == 'IGST') ? $total_tax : '0.00' }} {{ $sale->sale->freight_coolie }} {{ $sale->sale->otherexp }}
{{ $grandtotal }} {{ $totalQuantity }} {{ $totalTaxable }} {{ $cgstamountTotal }} {{ $sgstamountTotal }} {{ $igstamountTotal }} {{ $freightCoolie }} {{ $otherexp }}
@endif
@endsection