@if(!empty($buyProducts[0]))
@php
$totalPrice = 0;
@endphp
@foreach($buyProducts as $key_p => $value_p)
@if(!empty($value_p->product_unit_id))
@endforeach
@endif
@endforeach
@endif
@if(!empty($sell_products[0]))
@php
$totalPrice = 0;
@endphp
@foreach($sell_products as $key_p => $value_p)
{{$value_p->product_master_code}} :
@if(!empty($value_p->product_unit_id))
@php
$productPrice = price($value_p->user_id, $value_p->product_unit_id);
$totalPrice += $productPrice;
@endphp
Price = {{$productPrice}} *:
@endif
@if(!empty($value_p->sacnunits))
@foreach($value_p->sacnunits as $key_scan => $value_scan)
Price = {{$scanPrice}} :
@endforeach
@endif
@endforeach
Total Price = {{$totalPrice}}
@endif
Buy Report
@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; @endphpSell Report
{{$value_scan->barcode}}
@php $scanPrice = price($value_scan->user_id, $value_scan->master_unit_id); $totalPrice += $scanPrice; @endphp