@include('inventory.print.dynamic.head')
{!! $head !!}
@php $comission = $printData['invoice']->dp_commission; if ($setting->show_zero_qty != 1) $transactions = $printData['invoice']->transactions->where('quantity', '>', 0); if ($is_dp == 1 && $printData['invoice']->party->depot_id) { $comission = request()->pd ? $printData['invoice']->dp_commission : ($printData['invoice']->party->depot_id ? $printData['invoice']->party->commission : $printData['invoice']->dc_percentage); } @endphp @if (!request()->chalan) {{-- --}} @endif @php $nets = []; @endphp @forelse ($transactions as $key=> $item) @php if (!request()->chalan) { // if ($item->is_free_or_gift == 1) { // $price = 0; // } else if(request()->pd || !$printData['invoice']->party->depot_id) { // $price = $item->avg_price; // } else if ($printData['invoice']->party->depot_id && $item->product->fixed_commission) { // $price = round(($item->tp_price/(100+$comission))*100, 2); // } if ($item->is_free_or_gift == 1) { $price = 0; } else if(request()->pd || !$printData['invoice']->party->depot_id) { $price = $item->avg_price; } else if ($printData['invoice']->party->depot_id) { if ($item->product->fixed_commission < 0) { $com = $comission; } else { $com = $item->product->fixed_commission; } $price = round(($item->tp_price/(100+$com))*100, 2); } $nets[$key] = $price*$item->quantity; $price*=$item->product->unit_quantity; } @endphp @if (!request()->chalan) {{-- --}} @endif @empty @endforelse @if (!request()->chalan) @endif
{{-- @if (!request()->chalan)
@php $tot_net = array_sum($nets); @endphp
   @if($tot_net < 0)(Minus)@endif {{ ucwords(getNumberInWords(number_format(abs($tot_net), 2, '.', '') )) }} {{ ($printData['currency'] ? $printData['currency']->name : '') }} only.
@endif --}}
{!! $foot !!}
@include('inventory.print.dynamic.foot')