@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.select_vendor')}} {{ App\Models\Common::showHeads(App\Models\IncomeExpenseHead::where('id', $settlement->vendor_id)->vendor()->first()) }} {{__('lang.vendor')}} {{__('lang.select_project')}} @foreach ($branches as $branch) id == $settlement->branch_id) selected @endif>{{ $branch->name }} @endforeach {{__('lang.project')}} {{__('lang.type')}} {{__('lang.payment_voucher')}} {{__('lang.receipt_voucher')}} @csrf @if($type == 'RV') @include('admin.po-settlements.partials.receipt') @else @include('admin.po-settlements.partials.payment') @endif {{__('lang.purchase_order')}} {{__('lang.voucher_no')}} {{__('lang.project')}} {{__('lang.total')}} {{__('lang.paid_amount')}} {{$transaction->systemSettingCurrency()}} {{__('lang.balance_amount')}} {{$transaction->systemSettingCurrency()}} {{__('lang.current_amount')}} {{$transaction->systemSettingCurrency()}} @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 {{ $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 }}"/> @endforeach @php $total_po_amount = $settlement['poItems']->sum('paid_amount'); @endphp {{__('lang.total_po_amount')}} {{$transaction->systemSettingCurrency()}} {{ $total_po_amount }} {{__('lang.update')}} @stop @push('include-css') @endpush @push('include-js') @endpush