@extends("layouts.admin.app") @section("page-title") {{__("Dashboard")}} @endSection @section("content")
{{"Last Update"}} {{$voucher['created_at']['new']}}
{{__("Voucher Info:")}}
{{__("number") . ":" }} @if (isset($voucher['number'])) {{$origin_voucher["number"] }} {{$voucher['number']['new']}} @else {{$origin_voucher["number"] }} @endif
{{__("date") . ":"}} @if (isset($voucher['date'])) {{$origin_voucher["date"] }} {{$voucher['date']['new']}} @else {{$origin_voucher["date"] }} @endif
{{__("classification") . ":"}} @if (isset($voucher['classification_id'])) {{$origin_voucher->classification->name }} {{$temp_voucher->classification->name}} @else {{$origin_voucher->classification->name }} @endif
{{__("client-name") . ":"}} @if (isset($voucher['client_id'])) {{$origin_voucher->client->{\Illuminate\Support\Facades\App::getLocale()."_name"} }} {{$temp_voucher->client->{\Illuminate\Support\Facades\App::getLocale()."_name"} }} @else {{$origin_voucher->client->{\Illuminate\Support\Facades\App::getLocale()."_name"} }} @endif
{{__("representative-name") . ":"}} @if (isset($voucher['representative_id'])) {{$origin_voucher->representative->name }} {{$temp_voucher->representative->name}} @else {{$origin_voucher->representative->name }} @endif
{{__("purchase-order-number") . ":"}} @if (isset($voucher['purchase_order_number'])) {{$origin_voucher["purchase_order_number"] }} {{$voucher['purchase_order_number']['new']}} @else {{$origin_voucher["purchase_order_number"] }} @endif
{{__("store") . ":"}} @if (isset($voucher['store_id'])) {{$origin_voucher->store->name }} {{$temp_voucher->store->name }} @else {{$origin_voucher->store->name }} @endif
{{__("Voucher Details Info:")}}
@php $total_quantity = 0;$count=0;$total_price=0; @endphp @if(count($voucher_detail["new"])) @foreach($voucher_detail["new"] as $key => $details) @php $count = ++$key; $countSubItems= 0; @endphp @php $total_quantity+= $details->quantity; $total_price+= ($details->price * $details->quantity); @endphp @endforeach @endif @foreach($voucher_detail["edited"] as $key => $details) {{-- @if(isset($details["result"]["is_changed"]))--}} @php if (isset($details["result"]["attributes"]["quantity"]) && isset($details["result"]["attributes"]["price"])) { $priceWithTotal = $details["result"]["attributes"]["quantity"]["new"] * $details["result"]["attributes"]["price"]["new"]; } else { $priceWithTotal = $details["voucher_details"]->price * $details["voucher_details"]->quantity; } $total_price+= $priceWithTotal; @endphp @php $total_quantity+= $details["voucher_details"]->quantity @endphp @endforeach
# {{__('code')}} {{__('item')}} {{__('unit')}} {{__('quantity')}} {{__('unit-price')}} {{__('total')}} {{__('notes')}} {{__('Sub Items')}}
{{$key}} {{__("New")}} {{$details->item->getItemCode()}} {{$details->item->name}} {{$details->item->unit->unit_name}} {{$details->quantity}} {{$details->price . " SAR"}} {{$details->price * $details->quantity}} {{$details->notes}}
{{++$count}} @if (count($details["result"])) @if(isset($details["result"]["attributes"]["quantity"])) @if($details["result"]["attributes"]["quantity"]["new"] == 0) {{"Deleted"}} @else {{"Edited"}} @endif @else {{"Edited"}} @endif @else {{"No Change"}} @endif {{$details["voucher_details"]->item->getItemCode()}} {{$details["voucher_details"]->item->name}} {{$details["voucher_details"]->item->unit->unit_name}} @if (isset($details["result"]["attributes"]["quantity"])) {{$details["result"]["attributes"]["quantity"]["old"] }} {{$details["result"]["attributes"]["quantity"]["new"]}} @else {{$details["voucher_details"]->quantity}}@endif @if (isset($details["result"]["attributes"]["price"])) {{$details["result"]["attributes"]["price"]["old"] }} {{$details["result"]["attributes"]["price"]["new"]}} @else {{$details["voucher_details"]->price }} @endif {{" SAR" }} @if (isset($details["result"]["attributes"]["quantity"]) && isset($details["result"]["attributes"]["price"])) {{$details["result"]["attributes"]["quantity"]["old"] * $details["result"]["attributes"]["price"]["old"] }} {{$priceWithTotal}} @else{{$priceWithTotal}}@endif @if (isset($details["result"]["attributes"]["notes"])) {{$details["result"]["attributes"]["notes"]["old"] }} {{$details["result"]["attributes"]["notes"]["new"]}} @else {{$details["voucher_details"]->notes}}@endif
@php $tax1 = $total_price * $tax; $result = $total_price + $tax1; @endphp
{{__("Total Quantity")}} {{$total_quantity}}
{{__("Total Price")}} {{$total_price}}
{{ __('Total Price After Add Tax Value') }} ({{ ($tax * 100) . '%' }}) {{ $result }}
{{__("Note")}} @if (isset($voucher['notes'])) {{$origin_voucher["notes"] }} {{$voucher['notes']['new']}} @else {{$origin_voucher["notes"] }}@endif
request()->id,"temp_id"=>request()->temp_id,"is_analyse"=>request()->is_analyse])}}" method="GET">
@endsection @section("scripts") @endsection