@extends('user.layout.report_layout') @section('report_body')
@component('components.project_headline') @endcomponent

{{$title}}

@if(isset($mohajon_setup))

মহাজনের নাম : {{$mohajon_setup->name}}

ঠিকানা : {{$mohajon_setup->address}}

এরিয়া : {{$mohajon_setup->area}}

@endif

তারিখ শুরু : {{$request->date_from}}

তারিখ শেষ : {{$request->date_to}}

@php $count = 1; $total_purchase = 0; $total_lav = 0; $total_loss = 0; @endphp @php $countRow = count($purchase); @endphp @if($countRow > 0) @foreach($purchase as $p) @php $arod_chotha_info_count = isset($p->arod_chotha_info) ? $p->arod_chotha_info->first() : null; $arod_chotha_qty = isset($p->arod_chotha_entry) ? $p->arod_chotha_entry->sum('sales_qty') : 0; @endphp @if($p->weight != 0 || $p->rate != 0 && $p->purchase_type == 1 || $arod_chotha_info_count && $arod_chotha_qty == $p->quantity) @if($p->purchase_type == 1) @else @endif @php $total_amount = 0; $purchase_amount = 0; $cost_amount = 0; $total_mohajon_commission = 0; $sales_qty = 0; $sales_amount = 0; if($p->purchase_type == 1) { $purchase_amount += $p->weight * $p->rate; $purchase_amount += $p->labour_cost; $purchase_amount += $p->other_cost; $purchase_amount += $p->truck_cost; $purchase_amount += $p->van_cost; $purchase_amount += $p->tohori_cost; $sales = $p->ponno_sales_entry; foreach($sales as $s) { $sales_qty += $s->sales_qty; $sales_amount += $s->sales_weight * $s->sales_rate; $purchase_amount += $p->mohajon_commission * $s->sales_weight; } } else if($p->purchase_type == 2) { $arod_chotha_info = $p->arod_chotha_info; $chotha_count = isset($p->arod_chotha_entry) ? $p->arod_chotha_entry->sum('sales_qty') : 0; $arod_chotha = isset($p->arod_chotha_entry) ? $p->arod_chotha_entry : null; if($arod_chotha_info && $chotha_count == $p->quantity) { foreach($arod_chotha as $a) { $purchase_amount += $a->sales_weight * $a->sales_rate; $total_mohajon_commission += $p->mohajon_commission * $a->sales_weight; } $cost_amount += $arod_chotha_info->labour_cost; $cost_amount += $arod_chotha_info->other_cost; $cost_amount += $arod_chotha_info->truck_cost; $cost_amount += $arod_chotha_info->van_cost; $cost_amount += $arod_chotha_info->tohori_cost; $cost_amount += $total_mohajon_commission; $sales = $p->ponno_sales_entry; $old_mohajon_commission = 0; foreach($sales as $s) { $sales_qty += $s->sales_qty; $sales_amount += $s->sales_weight * $s->sales_rate; $old_mohajon_commission += $p->mohajon_commission * $s->sales_weight; } $ponno_cost = $p->ponno_purchase_cost_entry; $labour_cost = 0; $other_cost = 0; $truck_cost = 0; $van_cost = 0; $tohori_cost = 0; foreach($ponno_cost as $v) { if($v->cost_name == 1){ $labour_cost += $v->taka; }else if($v->cost_name == 2){ $other_cost += $v->taka; }else if($v->cost_name == 3){ $truck_cost += $v->taka; }else if($v->cost_name == 4){ $van_cost += $v->taka; }else if($v->cost_name == 5){ $tohori_cost += $v->taka; } } $cost_amount -= $p->labour_cost + $labour_cost; $cost_amount -= $p->other_cost + $other_cost; $cost_amount -= $p->truck_cost + $truck_cost; $cost_amount -= $p->van_cost + $van_cost; $cost_amount -= $p->tohori_cost + $tohori_cost; $cost_amount -= $old_mohajon_commission; } } $total_amount = $sales_amount - $purchase_amount; @endphp @if($total_amount >= 0) @php $total_lav += $total_amount ; @endphp @else @php $total_loss -= $total_amount; @endphp @endif @endif @endforeach @php $all_total = $total_lav - $total_loss; @endphp @if($all_total >= 0) @else @endif @else @endif @endsection
ক্রমিক গ্রহণ ইনভোয়েস গ্রহনের ধরণ গাড়ি নং পন্যের নাম মার্কা গ্রহণ সংখ্যা মোট ক্রয় বিক্রয় সংখ্যা মোট বিক্রয় লাভ লস
{{$count++}}{{$p->id}}{{$p->id}} কমিশন/{{$p->mohajon_setup->name}} {{$p->gari_no}} {{$p->ponno_setup->ponno_name}} {{$p->ponno_marka_setup->ponno_marka}} {{$p->quantity}}{{ intval($purchase_amount) }} {{ $sales_qty }} {{ intval($sales_amount) }}{{ intval($total_amount) }} -- {{ intval($total_amount) * -1 }}
আপনার মোট লাভ হয়েছে : {{number_format($all_total)}} টাকাআপনার মোট লস হয়েছে : {{number_format($all_total * -1)}} টাকা
রেকর্ড পাওয়া যায়নি