@php //REFACTOR LATER // $install_charge = $order_detail->sum(function($item) { // return $item->install_price * $item->quantity; // }); $install_charge = $order->install_charge; $warranty_charge = $order->warranty_charge; if($type == "order"){ $install_charge = $order->install_charge + $balance_due_install; $warranty_charge = $order->warranty_charge + $balance_due_warranty; } $item_delivery_charge_quantity = $order_detail->where('fulfillment_type', 1)->sum(function ($q) { return $q->quantity; }); $item_delivery_charge = $order_detail->where('fulfillment_type', 1)->sum(function ($q) { return $q->delivery_charge * $q->quantity; }); // $tax = ($order->tax * $order->subtotal) / 100; $tax = $order->tax_price; // if(!$order->tax_exempted){ // $tax = $order_detail->sum(function($item) use ($order) { // return $item->is_taxed ? ($item->subtotal_price * $order->tax) / 100:0; // }); // } $total = $order->subtotal + $install_charge + $warranty_charge + $tax + $order->delivery_charge + $item_delivery_charge + $order->item_haul_away_charge + $order->trip_charge; $total_after_refund = 0; $refund = 0; if ($type == 'order') { $refund = $order_detail->sum(function($item) { return $item->order_detail_return->sum(function($val) { return $val->order_return->amount; }); }); $total_after_refund = $total - $refund; } $payment = 0; @endphp {{-- --}} {{-- --}} {{-- --}}
Subtotals ${{ number_format($order->subtotal + $install_charge + $warranty_charge, 2) }}
Sales Tax @if ((stripos($order->ship_address, $order->store->state_code ) == false && stripos($order->ship_address, $order->store->state_name) == false) && $order->out_of_state == 0) (Out of State) @else {{removeSlymanBros($order->store->store_name)}} ({{$order->tax}}%) @endif Sales Tax${{ number_format($order->tax_price,2) }}${{ number_format($tax,2) }}
Line item delivery charges x{{ $item_delivery_charge_quantity }} ${{ number_format($item_delivery_charge, 2) }}
Delivery Zone additional charge ${{ number_format($order->delivery_charge,2) }}
Instant Rebate
@foreach ($order->rebates as $key => $item)
{{ $item->name }}
@endforeach
{{-- ${{ number_format($order->discount,2) }} --}} @foreach ($order->rebates as $key => $item) @if ($item->type == 0)
-{{ $item->amount }}%
@else
-${{ number_format($item->amount ,2) }}
@endif @endforeach
Environmental Fee ${{ number_format(($order->qty_haul * 4.00), 2) }}
Extend Protection Plan Charge ${{ number_format($warranty_charge, 2) }}
Install Charge ${{ number_format($install_charge, 2) }}
Haul Away Charge ${{ number_format($order->item_haul_away_charge,2) }}
Trip Charges ${{ number_format($order->trip_charge,2) }}
Total ${{ number_format($total - $order->discount,2) }}
{{-- @if($type == 'quote')
*Please give at least 1-3 weeks' notice of the desired delivery date. The delivery date may vary depending on the manufacturers' availability of stock. Manufacturer backorders may occur and availability dates rely solely on the manufacturers, not Slyman Bros. Deposits only holds current sale pricing. Appliances will not be ordered and delivery will not be set until paid in full. Deposits on out-of-box or store showroom inventory are non-refundable. Special order items (trim kits, parts, accessories, insert hoods, disposals) and brands (Summit, Frigidaire) are non-returnable and non-cancelable and must be serviced if issues occur.
@endif @if($type == 'order')

  Disclaimer

Delivery date is subject to change if the item goes on manufacturer backorder. Backorders may occur and availability dates rely solely on the manufacturers, not Slyman Bros. Special order items (trim kits, parts, accessories, insert hoods, disposals) and brands (Summit, Frigidaire) are non-returnable and non-cancelable and must be serviced if issues occur. Store showroom models or out-of-box inventory are non-returnable and non-cancelable. Cosmetic damage must be reported within 7 days of the delivery date. If an appliance has an issue within 30 days of delivery, it must be serviced by the manufacturer at least once before deemed replaceable, which is determined by the manufacturer, not Slyman Bros. All promotional rebates are done by the consumer and are your responsibility to submit on time.

@endif --}}