@foreach ($inventoryVouchers as $inventoryVoucher)

DELIVERY CHALLAN

{{ $from != null ? $from : $company->name }}

{{ $from_address != null ? $from_address : $company->address }}

{{--

PH:{{ $company->phone }}

GST:{{ $company->gst }}       State:{{ $company->state }} --}}
Invoice No    @if ($do_no != null) {{ $do_no }} @else {{ $inventoryVoucher->voucher_number }} @endif
Invoice Date   @if ($do_date != null) {{ \Carbon\Carbon::parse($do_date)->format('d M Y') }} @else {{ \Carbon\Carbon::parse($inventoryVoucher->voucher_date)->format('d M Y') }} @endif
_____
______
Details of Reciever(Billed to) Details of Consignee (Shipped to)
Name: {{ $bill_to != null ? $bill_to : $inventoryVoucher->sourceLocation->name }} Name: {{ $ship_to != null ? $ship_to : $inventoryVoucher->destinationLocation->name }}
Address: {{ $bill_to_address != null ? $bill_to_address : $inventoryVoucher->sourceLocation->branch->address }} Address: {{ $ship_to_address != null ? $ship_to_address : $inventoryVoucher->destinationLocation->branch->address }}
@if ($show_tax) @endif @php $inventoryVoucherItems = \App\Models\InventoryVoucherItem::where([ 'inventory_voucher_id' => $inventoryVoucher->id, 'flow' => 0, ])->get(); $totalTaxableValue = 0; $totalCgst = 0; $totalSgst = 0; $grandTotal = 0; @endphp @foreach ($inventoryVoucherItems as $key => $item) @php $gst = $item->gst_per; $cess = $item->cess_per; $totalTax = ($gst + $cess) / 100; $price_inc_tax = $item->price + $item->price * $totalTax; $price_inc_tax = round($price_inc_tax, 3); $taxableValue = round($item->quantity * $item->price, 2); $gst = $item->gst_per; $cess = $item->cess_per; $totalTax = $gst + $cess; $tax = round(($taxableValue * $totalTax) / 100, 2); $cgst = round($tax / 2, 2); $sgst = round($tax / 2, 2); $total = $taxableValue + $tax; $totalTaxableValue += $taxableValue; $totalCgst += $cgst; $totalSgst += $sgst; $grandTotal += $total; @endphp @if ($show_tax) @else @endif @if ($show_tax) @endif @endforeach @if ($show_tax) @endif
sno Item HSN Qty Price UnitTaxable Value CGST SGSTAmount
{{ $key + 1 }} {{ $item->stockItem->name }} ({{ $item->stockItem->internal_barcode }}) {{ $item->stockItem->hsn_code }} {{ number_format($item->quantity, 2) }}{{ number_format($item->price, 2) }}{{ number_format($price_inc_tax, 2) }}{{ $item->unit->symbol }}{{ number_format($taxableValue, 2) }} {{ number_format($cgst, 2) }} {{ number_format($sgst, 2) }}{{ number_format($total, 2) }}
Total{{ number_format($totalTaxableValue, 2) }} {{ number_format($totalCgst, 2) }} {{ number_format($totalSgst, 2) }}{{ number_format($grandTotal, 2) }}
@if ($show_tax) @endif @php $roundOff = round($grandTotal) - $grandTotal; $grandTotal += $roundOff; @endphp
Total Taxable Value {{ number_format($totalTaxableValue, 2) }}
Total Cgst {{ number_format($totalCgst, 2) }}
Total Sgst {{ number_format($totalSgst, 2) }}
Round Off {{ number_format($roundOff, 3) }}
Grand Total {{ number_format($grandTotal, 2) }}
{{ $from != null ? $from : $company->name }}



Authorized Signature
@if ($inventoryVouchers->last() != $inventoryVoucher)
@endif @endforeach