@extends('layouts.master') @section('css') @endsection @section('title') معاينة طباعة فاتورة مشتريات @stop @section('content')

{{ Nameen }}

{{ describtionen }}

ST: {{ STen }}

VAT: {{ Taxen }}

@php $logo = camplogo; @endphp logo

{{ Namear }}

{{ describtionar }}

س.ت: {{ STen }}

الرقم الضريبي: { Taxar }}

فاتورة مشتريات
Purchase Invoice

{{__('home.Invoice_no')}} {{$data['resource_purchases']->orderId}}
{{__('home.paymentmethod')}} @php $pay = $data['pay']; $methods = [ 'Cash' => __('report.cash'), 'Shabka' => __('report.shabka'), 'Bank_transfer' => __('home.Bank_transfer'), 'Credit' => __('report.credit') ]; echo $methods[$pay] ?? $pay; @endphp
{{ __('home.date') }} {{$data['resource_purchases']->created_at}}
{{ __('home.entersuppliername') }} {{$data['supllierdata']->name}}
{{ __('home.tax_number') }} {{$data['supllierdata']->TaxـNumber}}
@php $i = 0; $totalWithoutTax = 0; $totalVatAmount = 0; @endphp @foreach ($data['productsdata'] as $product) @if($product->numberofpice != 0) @php $i++; $rowSubtotal = $product->purchasingـprice * $product->numberofpice; $rowVat = $rowSubtotal * ($product->avtValue ?? 0); $totalWithoutTax += $rowSubtotal; $totalVatAmount += $rowVat; @endphp @endif @endforeach
# {{ __('home.productNo') }} {{ __('home.product') }} {{__('home.quantity')}} {{__('home.price')}} {{__('home.addedValue')}} {{__('home.total')}}
{{ $i }} {{ $product->productData->Product_Code ?? '-' }} {{ $product->product_name }} {{ number_format($product->numberofpice, 2) }} {{ number_format($product->purchasingـprice, 2) }} {{ number_format($rowVat, 2) }} {{ number_format($rowSubtotal + $rowVat, 2) }}
@if($data['resource_purchases']->exchange_rate > 0) @endif @if($data['resource_purchases']->exchange_rate > 0) @endif
{{ __('home.the amount') }} {{ __('home.discount') }} {{ __('home.addedValue') }} {{ __('home.shipping fee') }} {{ __('home.total') }} (SAR){{ __('home.total_price_foreign_currancy') }}
{{ number_format($totalWithoutTax, 2) }} {{ number_format($data['resource_purchases']->discount, 2) }} {{ number_format($totalVatAmount, 2) }} {{ number_format($data['resource_purchases']['shipping fee'], 2) }} {{ number_format($data['resource_purchases']->In_debt + $data['resource_purchases']['shipping fee'], 2) }} {{ number_format($data['resource_purchases']->grandTotalForeign, 2) }}
@endsection @section('js') @endsection