@extends('layouts.app') {{--Important Variables--}} @section('title') {{__('lang.purchase_order_settlements')}} @stop @section('top-bar') @include('includes.top-bar') @stop @section('left-sidebar') @include('includes.left-sidebar') @stop @section('content') @php $type = 'PV'; if($settlement->voucher_type == 'RV') { $type = 'RV'; } @endphp

{{__('lang.edit')}} {{__('lang.settlement')}}

{{ $settlement->voucher_no }}


@include('admin.partials.officialUnofficial',[ 'data'=>[ 'branch_id' => $settlement->branch_id, 'is_official' => $settlement->is_official, 'type' =>'purchase_orders', ]])
{{__('lang.type')}}    
@csrf
@if($type == 'RV') @include('admin.po-settlements.partials.receipt') @else @include('admin.po-settlements.partials.payment') @endif

{{__('lang.purchase_order')}}


@foreach ($settlement['poItems'] as $key => $poItem) @php $po_amount = $poItem->purchaseOrder->totalPOAmount; $paid_amount = $poItem->purchaseOrder->PaymentVoucher->sum('amount') + $poItem->purchaseOrder->po_settlements->sum('paid_amount'); $balance_amount = $po_amount - $paid_amount; @endphp @endforeach
{{__('lang.voucher_no')}} {{__('lang.project')}} {{__('lang.total')}} {{__('lang.paid_amount')}} {{$transaction->systemSettingCurrency()}} {{__('lang.balance_amount')}} {{$transaction->systemSettingCurrency()}} {{__('lang.current_amount')}} {{$transaction->systemSettingCurrency()}}
{{ $poItem->purchaseOrder->purchase_id }} @if($poItem->purchaseOrder->is_official == 0)
({{__('lang.unofficial')}}) @endif
{{ $poItem->purchaseOrder->branch->name }} total_amount == $poItem->paid_amount) ? 'readonly' : '' }} value="{{ ($poItem->paid_amount ) }}" onkeyup="calculation(this)" name="current_po_amount[]" placeholder="{{ $poItem->paid_amount }}"/>
@php $total_po_amount = $settlement['poItems']->sum('paid_amount'); @endphp
{{__('lang.total_po_amount')}} {{$transaction->systemSettingCurrency()}}
{{ $total_po_amount }}
@stop @push('include-css') @endpush @push('include-js') @endpush