@extends('layouts.invoice') @section('content') @php $sub_total =0; $tax =0; foreach ($invoice->products as $product){ $sub_total += $product->unit_price*$product->invoiced_qty; } $tax = $sub_total * $invoice->salesorder->tax_percentage / 100; @endphp
| Product Name | Amount |
|---|---|
|
{{$product->details->name}}
{{$product->invoiced_qty}} X ${{$product->unit_price}}
|
{{number_format($product->unit_price*$product->invoiced_qty, 2, '.', '')}} |
| Sub Total | ${{number_format($sub_total, 2, '.', '')}} |
| ${{number_format($tax, 2, '.', '')}} | |
| Total | ${{number_format($sub_total+$tax, 2, '.', '')}} |