@php if(isset($sale_invoice->getSaleInvoiceDiscount)) { $discount = $sale_invoice->getSaleInvoiceDiscount[0]->discount_amount; } else { $discount = 0; } if($discount>0 || $voucher_type->tax_applicable == '1') { $rowspan = 2; }else{ $rowspan = 1; } @endphp
@if($voucher_type && $voucher_type->tax_applicable == '1') @endif @if($discount>0) @endif @if($voucher_type && $voucher_type->tax_applicable == '1') @endif @if($discount>0) @endif @if($voucher_type && $voucher_type->tax_applicable == '1') @endif @php $total_gst_amount = 0; $IGST = $CGST = $SGST = $CESS = 0; $totalMrp = 0; $totalQnt = 0; $totalValue = 0; $totalValueAmount = 0; $totalDiscountAmount = 0; $totalAmount = 0; $IgstAmount = $CgstAmount = $SgstAmount = $CessAmount = 0; $totalIgstAmount = $totalCgstAmount = $totalSgstAmount = $totalCessAmount = 0; @endphp @foreach ($sale_invoice->getOpdBookingDetails as $key => $value) @php $totalMrp +=$value->product_price; $totalQnt+=1; $totalValue+=$value->product_price*1; $totalValueAmount = $value->product_price*1; $totalDiscountAmount+=$value->flat_discount; @endphp @if($voucher_type && $voucher_type->tax_applicable == '1') @endif @if($discount>0) @endif @php $gst = $value->getProduct->getTaxMaster ->total_percentage ?? 0; $gst_amount = taxAmountCalculate($gst,$totalValueAmount); $total_gst_amount += $gst_amount; @endphp @if($voucher_type && $voucher_type->tax_applicable == '1') @php if ( isset( $value->getProduct ->getTaxMaster ->getTaxMasterSub, ) ) { foreach ($value->getProduct->getTaxMaster->getTaxMasterSub as $tax) { if ($tax->name == 'IGST') { $IGST = $tax->percentage ??0; $IgstAmount = taxAmountCalculate($tax->percentage,$totalValueAmount); $totalIgstAmount+=$IgstAmount; } elseif ( $tax->name == 'CGST' ) { $CGST = $tax->percentage ??0; $CgstAmount = taxAmountCalculate($tax->percentage,$totalValueAmount); $totalCgstAmount+=$CgstAmount; } elseif ( $tax->name == 'SGST' ) { $SGST = $tax->percentage ?? 0; $SgstAmount = taxAmountCalculate($tax->percentage,$totalValueAmount); $totalSgstAmount+=$SgstAmount; }elseif($tax->name == 'CESS') { $CESS = $tax->percentage ??0; $CessAmount = taxAmountCalculate($tax->percentage,$totalValueAmount); $totalCessAmount+=$CessAmount; } } } @endphp @endif @endforeach @if($voucher_type && $voucher_type->tax_applicable == '1') @endif @if($discount>0) @endif @if($voucher_type && $voucher_type->tax_applicable == '1') @endif
Sl.No Item Name & DetailsHSN/SACMRP Qty UOM RateDiscountTaxable Amt CGST SGST IGST CESSTotal
% Amt% Amt % Amt % Amt % Amt
{!! $key + 1 !!} {!! $value->getProduct->name ?? '' !!}{!! $value->getProduct->hsncode ?? '' !!} {!! isset($value->product_price)? convertDecimelPoint($value->product_price): '' !!} {!! '1' !!} {!! isset($value->getProduct->getProductPrimaryUnit->code)? $value->getProduct->getProductPrimaryUnit->code: '' !!} {!! isset($value->product_price)? convertDecimelPoint($value->product_price): '' !!} {!! $value->per_discount ?? '' !!} {!! isset($value->flat_discount) ? convertDecimelPoint($value->flat_discount) : '' !!}{!! convertDecimelPoint($totalValueAmount-$value->flat_discount) !!}{!! $CGST !!} {!! $CgstAmount?convertDecimelPoint($CgstAmount):0.00 !!} {!! $SGST !!} {!! $SgstAmount?convertDecimelPoint($SgstAmount):0.00 !!} {!! $IGST !!} {!! $IgstAmount?convertDecimelPoint($IgstAmount):0.00 !!} {!! $CESS !!} {!! $CessAmount?convertDecimelPoint($CessAmount):0.00 !!} {!! convertDecimelPoint($totalValueAmount + $gst_amount - $value->flat_discount) ?? '' !!} @php $newAmount = $totalValueAmount + $gst_amount - $value->flat_discount; $totalAmount+=$newAmount; @endphp
TOTAL {!! $totalMrp?convertDecimelPoint($totalMrp):'' !!} {!! $totalQnt?convertDecimelPoint($totalQnt):'' !!} {!! $totalDiscountAmount?convertDecimelPoint($totalDiscountAmount):'' !!}{!! $total_gst_amount?convertDecimelPoint($total_gst_amount):'' !!} {!! $totalCgstAmount?convertDecimelPoint($totalCgstAmount):0.00 !!} {!! $totalSgstAmount?convertDecimelPoint($totalSgstAmount):0.00 !!} {!! $totalIgstAmount?convertDecimelPoint($totalIgstAmount):0.00 !!} {!! $totalCessAmount?convertDecimelPoint($totalCessAmount):0.00 !!}{!! $totalAmount?convertDecimelPoint($totalAmount):0.00 !!}