@extends('layouts.app') @section('title') {{'Sales Quotation Details'}} @endsection @section('content') @include('layouts.numbertowords')
Sales Quotation Details Back to List

@if ($sales_info[0]->status == 0 && Auth::user()->parents == "0") Confirm @endif

@if (Session::has('msg'))
{{ Session::get('msg') }}
@endif
@include('layouts.head')

Sales Quotation Challan



WTC Quotation No : WTC0{{ $sales_info[0]->id }}
Quotation Date : {{date('d-m-Y', strtotime($sales_info[0]->txn_date)) }}
Customer Name : {{ $sales_info[0]->supplier_id }} - {{ $sales_info[0]->name }}
Contact Person : {{ $sales_info[0]->person_name }}
Address : {{ $sales_info[0]->address }}
Mobile No. : {{ $sales_info[0]->mobile }}
@php $i = 1; $total = 0; $g_torder_quantity = 0; $g_treturns_quantity = 0; $g_t_quantity = 0; $g_torder_free = 0; $g_t_total_price = 0; $g_t_damage = 0; $g_t_commission = 0; @endphp @foreach($department_info as $catrow) @php unset($product_quantity); $product_id = explode(',',$catrow->product_id); $product_qty = explode(',',$catrow->product_qty); foreach ($product_id as $k => $v) { $product_quantity[$v] = $product_qty[$k]; } @endphp @php $torder_quantity = 0; $treturns_quantity = 0; $t_quantity = 0; $torder_free = 0; $t_total_price = 0; $t_damage = 0; $t_commission = 0; foreach($product_info as $row) { $product_id = $row->product_id; $product_name = $row->product_name; $pack_type = $row->pack_type; $product_qty = $row->quantity; $returns = $row->returns; $free = $row->free; $tp_price = $row->tp_price; $damage = $row->damage; $commission = $row->commission; $total = $product_qty - $returns; $total_value = $total * $tp_price; if(isset($product_quantity[$product_id])) { $torder_quantity += $product_qty; $treturns_quantity += $returns; $t_quantity += $total; $torder_free += $free; $t_total_price += $total_value; $t_damage += $damage; $t_commission += $commission; echo ''; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ''; } } $g_torder_quantity += $torder_quantity; $g_treturns_quantity += $treturns_quantity; $g_t_quantity += $t_quantity; $g_torder_free += $torder_free; $g_t_total_price += $t_total_price; $g_t_damage += $t_damage; $g_t_commission += $t_commission; @endphp @endforeach
S.L. ID Item Name Unit Quantity Returns Sales Quantity Free Sales Price Total Damage Comm. %
{{ $catrow->department_name }}
'. $i++ .''. $product_id .''. $product_name .''. $pack_type .''. $product_qty .''. $returns .''. $total .''. $free .''. $tp_price .''. $total_value .''. $damage .''. $commission .'
Sub Total = {!! number_format($torder_quantity) !!} {!! number_format($treturns_quantity) !!} {!! number_format($t_quantity) !!} {!! $torder_free !!} {!! number_format($t_total_price,2) !!} {!! number_format($t_damage) !!} {!! number_format($t_commission) !!}
Grand Total = {!! number_format($g_torder_quantity) !!} {!! number_format($g_treturns_quantity) !!} {!! number_format($g_t_quantity) !!} {{ $g_torder_free }} {{ number_format($g_t_total_price,2) }} {!! number_format($g_t_damage) !!} {!! number_format($g_t_commission) !!}
IN WORDS : {!! numberTowords($g_t_total_price) !!}
@php $i=0; $t_due = 0; @endphp @foreach($due_info as $row) @php $i++; $t_due += $row->amount; @endphp @endforeach
S.L. ID Party Name Due Amount
{{ $i }} {{ $row->id }} {{ $row->name }} {{ number_format($row->amount,2) }}
Total = {{ number_format($t_due,2) }}
IN WORDS : {!! numberTowords($t_due) !!}
@php $i=0; $t_cost = 0; @endphp @foreach($cost_info as $row) @php $i++; $t_cost += $row->cost_amount; @endphp @endforeach
S.L. Cost Details Cost Amount
{{ $i }} {{ $row->values }} {{ number_format($row->cost_amount,2) }}
Total = {{ number_format($t_cost,2) }}
IN WORDS : {!! numberTowords($t_cost) !!}
@php $payable =$g_t_total_price - ($t_cost + $t_due + $g_t_commission) ; $total = $t_cost + $t_due + $payable + $g_t_commission; @endphp
Debit (Tk.) Credit (Tk.)
S.L. Details Amount S.L. Details Amount
1 Due Amount {{ number_format($t_due,2) }} 1 Sales Amount {{ number_format($g_t_total_price,2) }}
2 Cost Amount {{ number_format($t_cost,2) }} 2 - 0
3 Product Commission {{ number_format($g_t_commission,2) }} 3 - 0
4 Payable Amount {{ number_format($payable,2) }} 4 - 0
Total = {{ number_format($total,2) }} Total = {{ number_format($g_t_total_price,2) }}
Payable Amount : {!! number_format($payable,2) !!}
IN WORDS : @if($payable>=0) {!! numberTowords($payable) !!} @else Sorry! The amount is minus = {!! ($payable) !!} @endif
@endsection