@extends('layouts.master') @section('styles') @endsection @section('content')

Report Management

Export Excel

Trade Discount Report

@foreach($data['distributors'] as $distributor) @endforeach @foreach($data['distributors'] as $distributor) @endforeach @if (collect($data['discounts'])->count()>0) @foreach($data['discounts'] as $discount) @foreach($data['distributors'] as $distributor) @php $item = collect($data['result'])->where('distributor_id',$distributor->distributor_id)->where('merchant_discount',$discount->merchant_discount)->first(); @endphp @endforeach @endforeach @endif
Title Criteria Discount Type Discount Value{{$distributor->distributor_name}}
Total Bills Gross Sale Trade Discount Value Other Discount Value Net Revenue
{{$discount->discount_name}} {{$discount->discount_criteria}} {{$discount->discount_type}} {{$discount->merchant_discount}}{{$item ? number_format($item->total_bill):0}} {{$item ? number_format($item->gross_value,2):0}} {{$item ? number_format($item->total_trade_discount,2):0}} {{$item ? number_format(($item->gross_value-$item->total_trade_discount)-$item->net_value,2):0}} {{$item ? number_format($item->net_value,2):0}}
@endsection @section('scripts') @endsection