@extends('admin.layouts.master') @section('title', 'Stock') @section('content')
| Date | Quantity | Invoice | @php $buy=0; @endphp @foreach($purchasedetails as $p)
|---|---|---|
| {{ date("d-M Y", strtotime($p->created_at))}} | {{$p->currentStock}} ({{$p->visible_stock}}) @php $buy+=$p->currentStock; @endphp | {{$p->invoiceNo}} |
| Total | {{$buy}} | |
| Date | Quantity | Invoice | Name | @foreach($sell as $p) @if(Auth::user()->role!=7)
|---|---|---|---|
| {{ date("d-M Y", strtotime($p->created_at))}} | {{$p->currentStock}} @php $sellcount+=$p->currentStock; @endphp | {{$p->invoiceNo}} | {{$retailer[$p->retailerId]}} |
| {{ date("d-M Y", strtotime($p->created_at))}} | {{$p->quantity+$p->return_quantity}} | {{$p->odId}} | {{$p->firstName}} |
@if($p->return_quantity>0)-{{$p->return_quantity}} @endif @php $sellcount+=($p->quantity); @endphp |
Return |
||
| {{ date("d-M Y", strtotime($p->created_at))}} | {{$p->quantity}} @if($p->return_quantity>0)-{{$p->return_quantity}} @endif @php $sellcount+=($p->quantity); @endphp |
{{$p->odId}} | {{$p->firstName}} |
| Total | {{$sellcount}} | ||
| Date | Quantity | Invoice | @php $buyr=0; @endphp @foreach($returndetails as $p)|
|---|---|---|---|
| {{ date("d-M Y", strtotime($p->created_at))}} | {{$p->request_to_return}} @php $buyr+=$p->request_to_return; @endphp | Return |
|
| Total | {{$buyr}} | ||
| Available | @if(Auth::user()->role!=7) @php $buyr = -$buyr; @endphp @endif {{$buy-$sellcount-$buyr}} | ||