@extends('admin.layouts.master') @section('title','Payout Detail | ') @section('body')
Payment Methods:
Subtotal: | +{{ sprintf("%.2f", $order->subtotal) }} |
---|---|
Tax | + {{ sprintf("%.2f",$order->tax) }} |
Commission: | - @php $commissions = App\CommissionSetting::all(); $commissionRate = 0; foreach ($commissions as $commission) { if ($commission->type == "flat") { if ($commission->p_type == "f") { $price = $order->singleorder->variant->products->vender_price + $commission->rate; $offer = $order->singleorder->variant->products->vender_offer_price + $commission->rate; $sellPrice = $price; $sellofferPrice = $offer; $cursym = $defCurrency->currency_symbol; echo "$commissionRate = $commission->rate "; } else { $taxrate = $commission->rate; $price1 = $order->singleorder->variant->products->vender_price; $price2 = $order->singleorder->variant->products->vender_offer_price; $tax1 = ($price1 * (($taxrate / 100))); $tax2 = ($price2 * (($taxrate / 100))); $sellPrice = $price1 + $tax1; $sellofferPrice = $price2 + $tax2; $cursym = $defCurrency->currency_symbol; if (!empty($tax2)) { $commissionRate = $tax2; echo sprintf("%.2f",$commissionRate)." "; } else { $commissionRate = $tax1; echo sprintf("%.2f",$commissionRate)." "; } } } else { $cursym = $defCurrency->currency_symbol; $comm = App\Commission::where('category_id', $order->singleorder->variant->products->category_id) ->first(); if (isset($comm)) { if ($comm->type == 'f') { $price = $order->singleorder->variant->products->vender_price + $comm->rate; $offer = $order->singleorder->variant->products->vender_offer_price + $comm->rate; $sellPrice = $price; $sellofferPrice = $offer; $commissionRate = $comm->rate; echo sprintf("%.2f",$commissionRate).""; } else { $taxrate = $comm->rate; $price1 = $order->singleorder->variant->products->vender_price; $price2 = $order->singleorder->variant->products->vender_offer_price; $tax1 = ($price1 * (($taxrate / 100))); $tax2 = ($price2 * (($taxrate / 100))); $price = $price1 + $tax1; $offer = $price2 + $tax2; $sellPrice = $price; $sellofferPrice = $offer; if (!empty($tax2)) { $commissionRate = $tax2; echo sprintf("%.2f",$commissionRate).""; } else { $commissionRate = $tax1; echo sprintf("%.2f",$commissionRate).""; } } } } } /**/ @endphp |
Total: | @php $total = round(($order->orderamount)-$commissionRate,2); @endphp{{ $total }} |