@extends('layouts.admin.app') @section('content')

Buy/Sell Report Of: {{$dealear->dealer_name}} - {{$user_type[$dealear->type]}}

@if(!empty($buyProducts[0])) @php $totalPrice = 0; @endphp

Buy Report

@foreach($buyProducts as $key_p => $value_p)
@if(!empty($value_p->product_unit_id))
@php $productPrice = price($value_p->user_id, $value_p->product_unit_id); $totalPrice += $productPrice; @endphp
@endif @if(!empty($value_p->sacnunits)) @foreach($value_p->sacnunits as $key_scan => $value_scan)

{{$value_scan->barcode}}

@php $scanPrice = price($value_scan->user_id, $value_scan->master_unit_id); $totalPrice += $scanPrice; @endphp
@endforeach @endif
@endforeach
@endif @if(!empty($sell_products[0])) @php $totalPrice = 0; @endphp

Sell Report

@foreach($sell_products as $key_p => $value_p)
@if(!empty($value_p->product_unit_id)) @php $productPrice = price($value_p->user_id, $value_p->product_unit_id); $totalPrice += $productPrice; @endphp @endif
@if(!empty($value_p->sacnunits)) @foreach($value_p->sacnunits as $key_scan => $value_scan)

{{$value_scan->barcode}}

@php $scanPrice = price($value_scan->user_id, $value_scan->master_unit_id); $totalPrice += $scanPrice; @endphp
@endforeach @endif
@endforeach
@endif
@section('admin-js') @endsection @endsection