@extends('layouts.master') @section('styles') @endsection @section('content')
| Title | Criteria | Discount Type | Discount Value | @foreach($data['distributors'] as $distributor){{$distributor->distributor_name}} | @endforeach||||
|---|---|---|---|---|---|---|---|---|
| Total Bills | Gross Sale | Trade Discount Value | Other Discount Value | Net Revenue | @endforeach||||
| {{$discount->discount_name}} | {{$discount->discount_criteria}} | {{$discount->discount_type}} | {{$discount->merchant_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{{$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}} | @endforeach