@extends('Reports.template') @section('title') @php $reportTitle = 'Purchase Scheme Amount Report'; @endphp {{$reportTitle}} @endsection @section('ExternalCss') @parent @endsection @section('Content') @php if ($billType === 'P') { $billTypeTitle = "Cash"; } else if ($billType === 'C') { $billTypeTitle = "Credit"; } else if ($billType === 'B') { $billTypeTitle = "Both"; } if ($trnStatus === 'P') { $trnStatusMessage = "Partial"; } else if ($trnStatus === 'T') { $trnStatusMessage = "Cancelled"; } else if ($trnStatus === 'C') { $trnStatusMessage = "Completed"; } else { $trnStatusMessage = "ALL"; } @endphp @if($reportType === 'B') @endif @php $oldPhTrnType = ''; $oldPhTrnId = ''; $createdBy = ''; $headerSr = 1; $transactionSr = 1; $datetime = 0; $totalQty = 0; $remark = ''; $totalFreeQty = 0; $totalAmount = 0; $strike = 'noStrike'; $symbol = ''; $summaryBills = 0; $summaryGrossTotal = 0; $summaryDiscount = 0; $summaryNetTaxableAmt = 0; $summaryCgstAmt = 0; $summarySgstAmt = 0; $summaryIgstAmt = 0; $summaryInvoiceAmt = 0; $summarySchAmt = 0; $summaryTcsAmt = 0; $summaryRoundOff = 0; $summaryTotal = 0; @endphp @foreach ($productTransactionData as $key =>$productTransaction) @if($productTransaction->ph_trn_id != $oldPhTrnId || $productTransaction->ph_trn_type != $oldPhTrnType) @if($totalQty != 0) @if($reportType === 'B') @endif @endif @php $transactionSr = 1; $totalQty = 0; $remark = ''; $datetime = 0; $totalFreeQty = 0; $totalAmount = 0; $strike = 'noStrike'; $symbol = ''; @endphp @if($productTransaction->ph_trn_status == 'T') @php $strike = 'strike'; @endphp @elseif($productTransaction->ph_trn_status == 'P') @php $symbol = '*'; @endphp @endif @if($productTransaction->trn_type == "P") @php $phGrossTotal = $productTransaction->ph_gross_total; $phDiscountAmt = $productTransaction->ph_discount_amt; $phNetTaxableAmt = $productTransaction->ph_net_taxable_amt; $phCgstAmt = $productTransaction->ph_cgst_amt; $phSgstAmt = $productTransaction->ph_sgst_amt; $phIgstAmt = $productTransaction->ph_igst_amt; $phInvoiceAmt = $productTransaction->ph_invoice_amt; $phSchAmount = $productTransaction->ph_sch_amount; $phTcsAmount = $productTransaction->ph_tcs_amount; $phRoundOff = $productTransaction->ph_round_off; $phTotal = $productTransaction->ph_total; @endphp @else @php $phGrossTotal = -1 * $productTransaction->ph_gross_total; $phDiscountAmt = -1 * $productTransaction->ph_discount_amt; $phNetTaxableAmt = -1 * $productTransaction->ph_net_taxable_amt; $phCgstAmt = -1 * $productTransaction->ph_cgst_amt; $phSgstAmt = -1 * $productTransaction->ph_sgst_amt; $phIgstAmt = -1 * $productTransaction->ph_igst_amt; $phInvoiceAmt = -1 * $productTransaction->ph_invoice_amt; $phSchAmount = -1 * $productTransaction->ph_sch_amount; $phTcsAmount = -1 * $productTransaction->ph_tcs_amount; $phRoundOff = -1 * $productTransaction->ph_round_off; $phTotal = -1 * $productTransaction->ph_total; @endphp @endif @endif @if($reportType === 'B') @php $refTrnNo = 0; @endphp @if($productTransaction->trn_type != "P" && $productTransaction->ref_trn_id != 0) @php $refTrnNo = "P" . $productTransaction->ref_trn_id; @endphp @endif @endif @php $createdBy = strtoupper($productTransaction->ph_created_by); $totalQty += $productTransaction->quantity; $remark = $productTransaction->ph_remarks; $totalFreeQty += $productTransaction->free_quantity; $totalAmount += $productTransaction->total; $datetime =$productTransaction->created_date; $oldPhTrnType = $productTransaction->ph_trn_type; $oldPhTrnId = $productTransaction->ph_trn_id; @endphp @endforeach @if($reportType === 'B') @endif @foreach ($productSummary as $key =>$summary) @if($summary->trn_type == "P") @php $footerHeading = "Total Purchase Bills : " @endphp @else @php $footerHeading = "Total Purchase Return Bills : " @endphp @endif @php $summaryBills += $summary->Bills; $summaryGrossTotal += $summary->gross_total; $summaryDiscount += $summary->discount; $summaryNetTaxableAmt += $summary->net_taxable_amt; $summaryCgstAmt += $summary->cgst_amt; $summarySgstAmt += $summary->sgst_amt; $summaryIgstAmt += $summary->igst_amt; $summaryInvoiceAmt += $summary->invoice_amt; $summarySchAmt += $summary->sch_amount; $summaryTcsAmt += $summary->tcs_amount; $summaryRoundOff += $summary->round_off; $summaryTotal += $summary->total; @endphp @endforeach @if(!empty($productSummary)) @endif @php $currentTime = \Carbon\Carbon::now(); @endphp
@if($businessEntityMasterData[0]->logo != null) Pharmacy Logologo )}}"/> @endif
{{ $businessEntityMasterData[0]->name }}
{{$businessEntityMasterData[0]->add1. " " .$businessEntityMasterData[0]->add2 ." ".$businessEntityMasterData[0]->city." : " .$businessEntityMasterData[0]->pincode }}
{{"Phone : ".$businessEntityMasterData[0]->tel1}}
{{$reportTitle." "}} Store : {{$storeName}} Period : {{\Helper::getDisplayDate($fromDate)}} TO {{\Helper::getDisplayDate($toDate)}}
Vou No Vou Date Supp Bill No Supp Bill Date Credit Bill Supp Name Gross Disc Net Taxable CGST SGST IGST Invoice  Sch Amt  TCS Amt R. Off Net Amount
Sr  Name Mfg Category Unit Ref No. Qty FQty    Batch Exp Sch Amt MRP Rate Disc% Net Rate Taxable GST% GST Amount
@if($remark != '') Remarks : {{$remark}} @endif Total Qty : {{ \Helper::zeroValueToNbspSpace($totalQty)}} {{\Helper::zeroValueToNbspSpace($totalFreeQty)}}  {{"Created By : "}} @if($createdBy) {{$createdBy ." ".Carbon\Carbon::parse($datetime)->format('d-m-Y h:i:s')}} @endif
{{ $symbol }} {{ $productTransaction->trn_type. "/". $productTransaction->trn_fyear. "/".$productTransaction->ph_trn_id }} {{ \Helper::getDisplayDate($productTransaction->ph_trn_date) }} {{ $productTransaction->ph_purchase_bill_no }} {{ \Helper::getDisplayDate($productTransaction->ph_purchase_bill_date) }} @if($productTransaction->is_credit_bill == "Y"){{ "Yes" }}@else{{ "No" }}@endif {{ $productTransaction->supplier_name }} {{ \Helper::customAmountFormat($phGrossTotal) }} {{ \Helper::customAmountFormat($phDiscountAmt) }} {{ \Helper::customAmountFormat($phNetTaxableAmt) }} {{ \Helper::customAmountFormat($phCgstAmt) }} {{ \Helper::customAmountFormat($phSgstAmt) }} {{ \Helper::customAmountFormat($phIgstAmt) }} {{ \Helper::customAmountFormat($phInvoiceAmt) }}  {{ \Helper::customAmountFormat($phSchAmount) }}  {{ \Helper::customAmountFormat($phTcsAmount) }} {{ \Helper::customAmountFormat($phRoundOff) }} {{ \Helper::customAmountFormat($phTotal) }}
{{$transactionSr++}} {{ \Helper::zeroValueToNbspSpace($productTransaction->product_name) }} {{ \Helper::zeroValueToNbspSpace(strtoupper($productTransaction->manufacturer_code)) }} {{ \Helper::zeroValueToNbspSpace($productTransaction->category_abbrev) }} {{ \Helper::zeroValueToNbspSpace($productTransaction->unit_abbrev) }} {{ \Helper::zeroValueToNbspSpace($refTrnNo) }} {{ \Helper::zeroValueToNbspSpace($productTransaction->quantity) }} {{ \Helper::zeroValueToNbspSpace($productTransaction->free_quantity) }}  {{ \Helper::zeroValueToNbspSpace($productTransaction->batch_no) }} {{ \Helper::getMonthYearFromDate($productTransaction->batch_exp) }} {{ \Helper::customAmountFormat($productTransaction->sch_amt) }} {{ \Helper::customAmountFormat($productTransaction->mrp) }} {{ \Helper::customAmountFormat($productTransaction->price) }} {{ \Helper::customAmountFormat($productTransaction->discount) }} {{ \Helper::customAmountFormat($productTransaction->net_rate) }} {{ \Helper::customAmountFormat($productTransaction->taxable_amt) }} {{ \Helper::customAmountFormat(floatval($productTransaction->sgst_percentage) + floatval($productTransaction->cgst_percentage) + floatval($productTransaction->igst_percentage)) }} {{ \Helper::customAmountFormat(floatval($productTransaction->sgst_value) + floatval($productTransaction->cgst_value) + floatval($productTransaction->igst_value)) }} {{ \Helper::customAmountFormat($productTransaction->total) }}
@if($remark != '') Remarks : {{$remark}} @endif Total Qty : {{ \Helper::zeroValueToNbspSpace($totalQty)}} {{\Helper::zeroValueToNbspSpace($totalFreeQty)}}  {{"Created By : "}} @if($createdBy) {{$createdBy ." ".Carbon\Carbon::parse($datetime)->format('d-m-Y h:i:s')}} @endif
{{$footerHeading." ".\Helper::zeroValueToNbspSpace($summary->Bills)}} {{\Helper::customAmountFormat($summary->gross_total)}} {{\Helper::customAmountFormat($summary->discount)}} {{\Helper::customAmountFormat($summary->net_taxable_amt)}} {{\Helper::customAmountFormat($summary->cgst_amt)}} {{\Helper::customAmountFormat($summary->sgst_amt)}} {{\Helper::customAmountFormat($summary->igst_amt)}} {{\Helper::customAmountFormat($summary->invoice_amt)}} {{\Helper::customAmountFormat($summary->sch_amount)}} {{\Helper::customAmountFormat($summary->tcs_amount)}} {{\Helper::customAmountFormat($summary->round_off)}} {{\Helper::customAmountFormat($summary->total)}}
Total Bills : {{\Helper::zeroValueToNbspSpace($summaryBills)}} {{\Helper::customAmountFormat($summaryGrossTotal)}} {{\Helper::customAmountFormat($summaryDiscount)}} {{\Helper::customAmountFormat($summaryNetTaxableAmt)}} {{\Helper::customAmountFormat($summaryCgstAmt)}} {{\Helper::customAmountFormat($summarySgstAmt)}} {{\Helper::customAmountFormat($summaryIgstAmt)}} {{\Helper::customAmountFormat($summaryInvoiceAmt)}} {{\Helper::customAmountFormat($summarySchAmt)}} {{\Helper::customAmountFormat($summaryTcsAmt)}} {{\Helper::customAmountFormat($summaryRoundOff)}} {{\Helper::customAmountFormat($summaryTotal)}}
Partially save {{ strtoupper(Session::get('userId'))." # ".$currentTime->format('d/m/Y H:i:s ')}}
Back
@endsection @section('BootstrapModals') @endsection @section('ExternalJs') @endsection