@extends('admin.layouts.app') @section('title', 'Return Report') @push('styles') @endpush @section('container')

Product Return Statement

@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif
@error('supplier')

{{ $message }}

@enderror
@error('product')

{{ $message }}

@enderror
@error('start_date')

{{ $message }}

@enderror
@error('end_date')

{{ $message }}

@enderror
@if(count($stocks)>0)

Product Return Statement

Supplier: {{ $selected_supplier->name }}

Product: {{ $selected_product->name }}

@php $totalReturn = 0; $totalReturnAdjustment = 0; $balance = 0; @endphp @foreach ($stocks as $key => $data) @php if($data->warehouse_id==5){ $totalReturn += $data->stock_in; $balance += $data->stock_in; } if($data->warehouse_id==3){ $totalReturnAdjustment = $data->stock_in; $balance -= $data->stock_in; } @endphp @endforeach
SL Date Invoice No. Return Quantity Return Adjustment Quantity Balance
{{ $loop->iteration }} {{ date('d-m-Y',strtotime($data->date)) }} @if($data->order->order_type == 'RETURN') {{ $data->order->purchase_no??'' }} @elseif($data->order->order_type == 'RETURNADJUSTMENT') {{ $data->order->purchase_no??'' }} @endif @if($data->warehouse_id==5){{ $data->stock_in }}@endif @if($data->warehouse_id==3){{ $data->stock_in }}@endif {{ $balance }}
Total {{ $totalReturn }} {{ $totalReturnAdjustment }} {{ $balance }}
@endif
@endsection @push('scripts') @endpush