@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()->parent_id == "0") Confirm @endif

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

Sales Quotation Challan



WTC Quotation No : WTC0{{ $sales_info[0]->sales_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_torder_free = 0; $g_t_total_price = 0; $g_t_damage = 0; $g_t_commission = 0; $g_t_quantity = 0; $g_t_sub_total = 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; $t_quantity = 0; $torder_free = 0; $t_total_price = 0; $t_damage = 0; $t_commission = 0; $t_sub_total = 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; $free = $row->free; $tp_price = $row->tp_price; $commission = $row->commission; $total_value = $product_qty * $tp_price; $commission_tk = ($total_value * $commission)/100; $sub_total = $total_value - $commission_tk; if(isset($product_quantity[$product_id])) { $torder_quantity += $product_qty; $torder_free += $free; $t_total_price += $total_value; $t_commission += $commission_tk; $t_sub_total += $sub_total; echo ''; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ''; } } $g_torder_quantity += $torder_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; $g_t_sub_total = $g_t_total_price - $g_t_commission; @endphp @endforeach
S.L. ID Item Name Unit Quantity Free TP Price Amount Comm. % Comm. Tk. Sub Total
{{ $catrow->department_name }}
'. $i++ .''. $product_id .''. $product_name .''. $pack_type .''. $product_qty .''. $free .''. $tp_price .''. number_format($total_value,2) .''. $commission .''. number_format($commission_tk,2) .''. number_format($sub_total,2) .'
Sub Total = {!! number_format($torder_quantity) !!} {!! number_format($t_quantity) !!} {!! $torder_free !!} {!! number_format($t_total_price,2) !!} {!! number_format($t_commission,2) !!} {!! number_format($t_sub_total,2) !!}
Grand Total = {!! number_format($g_torder_quantity) !!} {!! number_format($g_t_quantity) !!} {{ $g_torder_free }} {{ number_format($g_t_total_price,2) }} {!! number_format($g_t_commission,2) !!} {!! number_format($g_t_sub_total,2) !!}
IN WORDS : {!! numberTowords($g_t_sub_total) !!}
{{-- @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