@php $totalSales = 0; $totalRegularSales = 0; $totalNetSales = 0; $totalQty = 0; $totalSalesTax = 0; $totalRegularQty = 0; $totalPremiumQty = 0; $totalCogsSales = 0; $totalCogsRegularSales = 0; $totalCogsPremiumSales = 0; $totalDiscount = 0; $totalRegularDiscount = 0; $totalPremiumDiscount = 0; @endphp @if(!empty($productMix)) @foreach($productMix as $key => $categoriesList) @foreach($categoriesList as $dList) @php $regular_qty = $dList['quantity_regular_discount']; $regular_cost_of_goods = $dList['cost_of_goods']*$regular_qty; $premier_cost_of_goods = $dList['cost_of_goods']*$dList['quantity_premium_discount']; $total_discount = $dList['order_discount']+$dList['item_discount']; @endphp @php $totalSales += $dList['sold_price_of_product']; $totalRegularSales += $dList['total_regular_sales']; $totalNetSales += $dList['net_sales']; $totalQty += $dList['quantity']; $totalSalesTax += $dList['sales_tax']; $totalRegularQty += ($dList['quantity']-$dList['quantity_premium_discount']); $totalPremiumQty += $dList['quantity_premium_discount']; $totalCogsSales += ($dList['cost_of_goods']*($dList['quantity'])); $totalCogsRegularSales += $regular_cost_of_goods; $totalCogsPremiumSales += $premier_cost_of_goods; $totalDiscount += $dList['order_discount']+$dList['item_discount']; $totalRegularDiscount += $dList['total_regular_discount']; $totalPremiumDiscount += ($dList['order_discount']+$dList['item_discount'])-$dList['total_regular_discount']; @endphp @endforeach @endforeach @else @endif @php $totalCogsSales = 0; $totalNetSales = 0; $totalRegularSales = 0; $totalcogsRegularSales = 0; $totalcogsPremiumSales = 0; $totalSalesQty = 0; $totalSalesRegularQty = 0; $totalSalesPremiumQty = 0; $totalDiscount = 0; $totalRegularSales = 0; $totalRegularDiscount = 0; $totalPremiumDiscount = 0; $totalSalesTax = 0; @endphp @if(!empty($categoryCogs['cog'])) @foreach($categoryCogs['cog'] as $category => $costofgoods) @php $totalCogsSales += $costofgoods['cogs_sales']; $totalRegularSales += $costofgoods['total_regular_sales']; $totalNetSales += $costofgoods['net_sales']; $totalcogsRegularSales += $costofgoods['cogs_regular_sales']; $totalcogsPremiumSales += $costofgoods['cogs_premium_sales']; $totalSalesQty += $costofgoods['quantity']; $totalSalesRegularQty += $costofgoods['regular_qty']; $totalSalesPremiumQty += $costofgoods['premium_qty']; $totalDiscount += $costofgoods['total_discount']; $totalRegularDiscount += $costofgoods['total_regular_discount']; $totalPremiumDiscount += $costofgoods['total_premium_discount']; $totalSalesTax += $costofgoods['sales_tax']; @endphp @endforeach @endif

{{ __('lbl.cost_of_goods') }} Report

{{ __('lbl.from') }} {{$timeFilter['start']}} {{ __('lbl.to') }} {{$timeFilter['end']}}
{{ __('lbl.establishment') }} {{$storeName}}
{{ __('lbl.categorie') }} {{ __('lbl.sub_cat') }} {{ __('lbl.barcode') }} {{ __('lbl.sku') }} {{ __('lbl.vendor_name') }} {{ __('lbl.vendor_item_id') }} {{ __('lbl.product_name') }} {{ __('lbl.product_cost') }} {{ __('lbl.sales_price') }} {{ __('lbl.regular_sales') }} {{ __('lbl.net_sales') }} {{ __('lbl.total_quantity') }} {{ __('lbl.total_regular_quantity') }} {{ __('lbl.premier_sales_qty') }} {{ __('lbl.cost_of_goods_sales') }} {{ __('lbl.total_regular_sales') }} {{ __('lbl.cogs_premium_sales') }} {{ __('lbl.total_discount') }} {{ __('lbl.regular_discount') }} {{ __('lbl.premier_discount') }} {{ __('lbl.discount_percentage') }} {{ __('lbl.sales_tax') }}
{{ $dList['categorie_name'] }} {{ $dList['sub_cat_name'] }} {{ $dList['product_barcode'] }} {{ $dList['product_sku'] }} {{ $dList['vendor_name'] }} {{ $dList['vendor_item_id'] }} {{ $dList['product_name'] }} {{ $dList['cost_of_goods'] }} {{ $dList['sold_price_of_product'] }} {{ $dList['total_regular_sales'] }} {{ $dList['net_sales'] }} {{ $dList['quantity'] }} {{ $regular_qty }} {{ $dList['quantity_premium_discount'] }} {{ ($dList['cost_of_goods']*$dList['quantity']) }} {{ $regular_cost_of_goods }} {{ $premier_cost_of_goods }} {{ $total_discount }} {{ $dList['total_regular_discount'] }} {{ ($total_discount-$dList['total_regular_discount']) }} @if($dList['sold_price_of_product'] > 0) {{ round($total_discount * 100 / $dList['sold_price_of_product'],2) }}% @else 0% @endif {{ $dList['sales_tax'] }}
{{ __('lbl.no_record_found') }}
{{ $totalSales }} {{ $totalRegularSales }} {{ $totalNetSales }} {{ $totalQty }} {{ $totalRegularQty }} {{ $totalPremiumQty }} {{ $totalCogsSales }} {{ $totalCogsRegularSales }} {{ $totalCogsPremiumSales }} {{ $totalDiscount }} {{ $totalRegularDiscount }} {{ ($totalDiscount-$totalRegularDiscount) }} {{ $totalSalesTax }}
{{ __('lbl.category') }} {{ __('lbl.total_regular_sales') }} {{ __('lbl.total_net_sales') }} {{ __('lbl.total_cogs_sales') }} {{ __('lbl.total_cogs_regular_sales') }} {{ __('lbl.total_cogs_premium_sales') }} {{ __('lbl.total_quantity') }} {{ __('lbl.total_regular_quantity') }} {{ __('lbl.total_premium_quantity') }} {{ __('lbl.total_discount') }} {{ __('lbl.total_discount_regular') }} {{ __('lbl.total_discount_premium') }} {{ __('lbl.total_sales_tax') }}
{{ $category }} {{ $costofgoods['total_regular_sales'] }} {{ $costofgoods['net_sales'] }} {{ $costofgoods['cogs_sales'] }} {{ $costofgoods['cogs_regular_sales'] }} {{ $costofgoods['cogs_premium_sales'] }} {{ $costofgoods['quantity'] }} {{ $costofgoods['regular_qty'] }} {{ $costofgoods['premium_qty'] }} {{ $costofgoods['total_discount'] }} {{ $costofgoods['total_regular_discount'] }} {{ $costofgoods['total_premium_discount'] }} {{ $costofgoods['sales_tax'] }}
{{ $totalRegularSales }} {{ $totalNetSales }} {{ $totalCogsSales }} {{ $totalcogsRegularSales }} {{ $totalcogsPremiumSales }} {{ $totalSalesQty }} {{ $totalSalesRegularQty }} {{ $totalSalesPremiumQty }} {{ $totalDiscount }} {{ $totalRegularDiscount }} {{ $totalPremiumDiscount }} {{ $totalSalesTax }}