@extends('layouts.master') @section('css') @endsection @section('title') {{ __('home.recentquotation') }} @endsection @section('page-header') @endsection @section('content') @if (count($errors) > 0)
خطأ
@endif
@php $avtData = App\Models\Avt::find(1); $avtSaleRate = $avtData ? $avtData->AVT : 1; @endphp @foreach ($data as $product) @endforeach
{{ __('home.Invoice_no') }} {{ __('home.clietName') }} {{ __('home.date') }} {{ __('home.branch') }} {{ __('home.total') }} {{ __('home.operations') }}
{{ $product->id }} {{ $product->customer->name }} {{ $product->created_at->format('Y-m-d') }} {{ $product->branch->name }} @php $items = App\Models\offer_price_to_customer_items::where('order_id', $product->id)->get(); $subTotal = 0; $discountTotal = 0; foreach($items as $item) { $subTotal += ($item->PriceWithoudTax * $item->quantity); $discountTotal += $item->discount; } $netPrice = round($subTotal, 2) - round($discountTotal, 2); $totalWithTax = round($netPrice * $avtSaleRate, 2) + $netPrice; @endphp {{ number_format($totalWithTax, 2) }}
@csrf
{{ $data->links() }}
@endsection @section('js') @endsection