@include('inventory.print.dynamic.head')
{!! $head !!}
@php $fs = explode(',',$setting->field_show); $fn = explode(',',$setting->field_name); $new_total=[]; $new_net=[]; $trans = $printData['invoice']->use_status != 4 ? $printData['invoice']->transaction : $printData['invoice']->damageTransactions; if ($setting->show_zero_qty != 1) $trans = $trans->where('quantity', '>', 0); $transactions[0] = $trans->where('is_free_or_gift', '!=', 2)->groupBy('dr_cr'); $transactions[1] = $trans->where('is_free_or_gift', 2)->groupBy('dr_cr'); //For gift Item @endphp @for ($x = 0; $x<2; $x++) @foreach ($transactions[$x] as $key=>$data) @php $span = 0; $tspan=0; $tot_dc = 0; @endphp @if($transactions[$x]->count() > 1) @endif @if (in_array(1, $fs)) @php $span++; $tspan++; @endphp @endif @if (in_array(2, $fs)) @php $span++; $tspan++; @endphp @endif @if (in_array(3, $fs)) @php $span++; $tspan++; @endphp @endif @if (in_array(4, $fs)) @php $span++; @endphp @endif @if (in_array(10, $fs)) @php $span++; @endphp @endif @if ($chalan != 1) @if (in_array(5, $fs)) @php $span++; @endphp @endif {{-- @if (store_info()->is_dp == 1) @php $span++; @endphp @endif --}} @if (in_array(13, $fs)) @php $span++; @endphp @endif @if (in_array(6, $fs)) @php $span++; @endphp @endif @if (in_array(7, $fs)) @php $span++; @endphp @endif @endif @php $tot_qty = 0; $total = 0; @endphp @php $i = 0; @endphp @foreach($data as $k=>$item) @if (in_array(1, $fs)) @endif @if (in_array(2, $fs)) @endif @if (in_array(3, $fs)) @endif @if (in_array(4, $fs)) {{-- --}} @endif @if (in_array(10, $fs)) @endif @if ($chalan != 1) @if (in_array(5, $fs)) @endif {{-- @if (store_info()->is_dp == 1) @endif --}} @if (in_array(13, $fs)) @php $t = $price * $item->quantity; @endphp {{-- --}} @endif @if (in_array(6, $fs)) @php $dc = ($price * $item->quantity) * ($item->dc_price/100); @endphp {{-- --}} @endif @if (in_array(7, $fs)) @php $n = ($price * $item->quantity) - (($price * $item->quantity) * ($item->dc_price/100)); @endphp {{-- --}} @endif @endif @php $total += ($price * $item->quantity); @endphp @endforeach @php $discount_total=($printData['invoice']->dc_percentage/100)*$total; $tot_dc += $discount_total; @endphp @if($transactions[$x]->count() > 1) @if ($chalan != 1) {{-- --}} {{-- --}} {{-- --}} @endif @endif