@extends('Reports.template') @php $reportTitle = 'Pharmacy Supplier Payment Report'; @endphp @section('title') {{ $reportTitle }} @endsection @section('ExternalCss') @parent @endsection @section('Content') @php if ($trnStatus === 'P') { $trnStatusMessage = 'Pending'; } elseif ($trnStatus === 'C') { $trnStatusMessage = 'Completed'; } else { $trnStatusMessage = 'ALL'; } @endphp @if ($reportType === 'D') @if ($reportType === 'D') @else @endif @if ($reportType === 'D') @endif @php $createdBy = ''; $trnDetailsCount = 0; @endphp @foreach ($purchaseHeader as $purchaseHeaderKey => $purchaseHeaderData) @if ($trnStatus == 'C') @php $trnDate = explode(',', $purchaseHeaderData->TRN_DATE); $purchaseBillNo = explode(',', $purchaseHeaderData->Purchase_Bill_no); $purchaseBillDate = explode(',', $purchaseHeaderData->Purchase_Bill_date); $billTotal = explode(',', $purchaseHeaderData->Bill_total); $trnDetails = explode('/', $purchaseHeaderData->combined_id_year); $trnType = $trnDetails[0]; $trnFyear = $trnDetails[1]; $trnId = $trnDetails[2]; @endphp @if ($reportType === 'D') @foreach ($paymentDetailsMax as $detailsKey => $detailsValue) @if($detailsKey == $trnId) @php $trnDetailsCount = $trnDetailsCount + 1; @endphp @foreach ($detailsValue as $detailsValueKey => $finalValue) @endforeach @if (count($detailsValue) > 1) @endif @endif @endforeach @endif @if ($purchaseHeaderKey >= $trnDetailsCount || $reportType === 'S') @if($purchaseHeaderData->total != 0) @else @endif @if($purchaseHeaderData->outstanding != 0) @else @endif @endif @else @if ($reportType === 'D') @foreach ($paymentDetailsMax as $trnId => $trnIdDetails) @if($trnId == $purchaseHeaderData->trn_id) @php $trnDetailsCount = $trnDetailsCount + 1; @endphp @if (count($trnIdDetails) > 0) @foreach ($trnIdDetails as $key => $value) @endforeach @if (count($trnIdDetails) > 1) @endif @else @endif @endif @endforeach @endif @if ($purchaseHeaderKey >= $trnDetailsCount || $reportType === 'S') @if($purchaseHeaderData->total_paid != 0) @else @endif @endif @endif @endforeach @php $currentTime = \Carbon\Carbon::now(); @endphp @if ($reportType === 'D')
@if ($businessEntityMasterData[0]->logo != null) Pharmacy Logo @endif @else @endif
{{ $businessEntityMasterData[0]->name }}
{{ $businessEntityMasterData[0]->add1 . ' ' . $businessEntityMasterData[0]->add2 . ' ' . $businessEntityMasterData[0]->city . ' : ' . $businessEntityMasterData[0]->pincode }}
{{ 'Phone : ' . $businessEntityMasterData[0]->tel1 }}
{{ $reportTitle . ' ' }}Period : {{ \Helper::getDisplayDate($fromDate) }} TO {{ \Helper::getDisplayDate($toDate) }}
Voucher No Voucher Date Bill No Bill Date Supplier Name Bill Amount Payment Vou Payment Date Payment Mode Bank Cheque/Ref No RemarksAmount Paid Outstanding
{{ $trnType . "/" . $trnFyear . "/" . $trnId }} {{ $purchaseHeaderData->Bill_Amount_Date }} {{ $purchaseHeaderData->purchase_bill_no }} {{ $purchaseHeaderData->purchase_bill_date }} {{ $purchaseHeaderData->supplier_name }} {{ number_format((float)$purchaseHeaderData->total, 2, '.', ',') }} {{ $finalValue->Payment_Vou_Fyear . '/' . $finalValue->Payment_Vou_No }} {{ \Helper::getDisplayDate($finalValue->Bill_Amount_Date) }} {{ $finalValue->payment_mode }} {{ $finalValue->bank }} {{ $finalValue->cheque_ref_no }} {{ $finalValue->Payment_Remark }} {{ number_format((float)$finalValue->Bill_Amount_Paid, 2, '.', ',') }} @if($purchaseHeaderData->outstanding == 0) 0.00 @else {{ \Helper::customAmountFormat($purchaseHeaderData->outstanding) }} @endif
Total {{ number_format((float)$purchaseHeaderData->total, 2, '.', ',') }} {{ number_format((float)$purchaseHeaderData->total, 2, '.', ',') }} @if($purchaseHeaderData->outstanding == 0) 0.00 @else {{ \Helper::customAmountFormat($purchaseHeaderData->outstanding) }} @endif
{{ $purchaseHeaderData->total }}0.00{{ \Helper::customAmountFormat($purchaseHeaderData->outstanding) }}0.00
{{ $purchaseHeaderData->trn_type . "/" . $purchaseHeaderData->trn_fyear . "/" . $purchaseHeaderData->trn_id }} {{ \Helper::getDisplayDate($purchaseHeaderData->trn_date) }} {{ $purchaseHeaderData->purchase_bill_no }} {{ \Helper::getDisplayDate($purchaseHeaderData->purchase_bill_date) }} {{ $purchaseHeaderData->supplier_name }} {{ number_format((float)$purchaseHeaderData->total, 2, '.', ',') }} {{ $value->Payment_Vou_Fyear . '/' . $value->Payment_Vou_No }} {{ \Helper::getDisplayDate($value->Bill_Amount_Date) }} {{ $value->payment_mode }} {{ $value->bank }} {{ $value->cheque_ref_no }} {{ $value->Payment_Remark }} {{ number_format((float)$value->Bill_Amount_Paid, 2, '.', ',') }} @if($purchaseHeaderData->outstanding == 0) 0.00 @else {{ \Helper::customAmountFormat($purchaseHeaderData->outstanding) }} @endif
Total {{ number_format((float)$purchaseHeaderData->total, 2, '.', ',') }} {{ number_format((float)$purchaseHeaderData->total_paid, 2, '.', ',') }} @if($purchaseHeaderData->outstanding == 0) 0.00 @else {{ \Helper::customAmountFormat($purchaseHeaderData->outstanding) }} @endif
@if($purchaseHeaderData->outstanding == 0) 0.00 @else {{ number_format((float)$purchaseHeaderData->total_paid, 2, '.', ',') }} @endif @if($purchaseHeaderData->outstanding == 0) 0.00 @else {{ \Helper::customAmountFormat($purchaseHeaderData->outstanding) }} @endif
{{ $purchaseHeaderData->total_paid }}0.00 @if($purchaseHeaderData->outstanding == 0) 0.00 @else {{ \Helper::customAmountFormat($purchaseHeaderData->outstanding) }} @endif
@else @endif {{ strtoupper(Session::get('userId')) . ' # ' . $currentTime->format('d/m/Y H:i:s ') }}
Back
@endsection @section('BootstrapModals') @endsection @section('ExternalJs') @endsection