@foreach($bills as $bill) @php $isNewBill = isset($bill->rounding_amount) && !is_null($bill->rounding_amount) && $bill->rounding_amount != 0; if ($isRoundingEnabled) { if ($isNewBill) { $finalGrandTotal = $bill->grandtotal; $roundValue = $bill->rounding_amount; } else { $grandAmount = $bill->grandtotal; $ceilAmount = ceil($grandAmount); $floorAmount = floor($grandAmount); $roundValue = $ceilAmount - $grandAmount; $finalGrandTotal = ($roundValue > 0 && $roundValue <= 0.50) ? $ceilAmount : $floorAmount; } } else { $finalGrandTotal = $isNewBill ? $bill->grandtotal - $bill->rounding_amount : $bill->grandtotal; $roundValue = 0; } $billAmount = $bill->amount; $serviceChAmount = ($billAmount * $bill->service_charge_percent)/100; $amountAndService = $billAmount + $serviceChAmount; $fuelAmount = ($amountAndService * $bill->fchpercent)/100; $otherChAmount = $bill->other_charge; $totAmount = $amountAndService + $fuelAmount + $otherChAmount; $totalAmount = isset($parcels[0]) ? $parcels[0]->total_amount : 0; $grandAlount = $bill->grandtotal; $final_value = number_format((double)($totalAmount - $bill->amount), 2); if ($final_value > 0) { $value = 'Positive'; } else { $value = 'Negative'; } @endphp

{{$branch->name}}

{{$branch->address}}, {{$branch->city}} - {{$branch->zipcode}}

TAX INVOICE (ORIGINAL FOR RECIPIENT)

Consignor Details

GSTIN :

{{$bill->gstno}}

PAN No :

PAN No :

Lorem ipsum dolor

PAN No :

Lorem ipsum dolor

Place of Supply

Name :

{{$bill->name}}

Address :

{{@$bill->address1.' '.@$bill->address2.' '.@$bill->city}}

State Name :

{{@$bill->state}}

Tax Details

SAC - SERVICE DESCRIPTION :

996812 - COURIER SERVICE

GST NO :

{{@$branch->gstno}}

STATE - STATE CODE :

{{ (@$branch->gstno) ? substr(@$branch->gstno,0,2) : '' }}

STATE - STATE CODE :

01/08/2024

Bill Details

Bill No. :

{{$bill->billno}}

BILL DATE :

{{date("d/m/Y", strtotime($bill->created_at))}}

PERIOD :

{{strtoupper(date("d/m/Y", strtotime($bill->start_date)))}} ~ {{strtoupper(date("d/m/Y", strtotime($bill->end_last)))}}

PO NO. / VENDOR CODE :

-/-

@if(count($all_parcels) > 0) @php $previousDate = ''; $skipDate = false; $dayAmountTotal = 0; @endphp @foreach($all_parcels as $parcels) @php $checkDate = strtotime(@$parcels->date); if ($previousDate != '' && $previousDate == $checkDate) { $skipDate = true; // $dayAmountTotal = $dayAmountTotal + $parcels->net_amt; } else { $skipDate = false; $previousDate = $checkDate; // $dayAmountTotal = $dayAmountTotal + $parcels->net_amt; } @endphp @if($skipDate == false) @endif @php $srno++; @endphp @endforeach

NO.

Consignee

Address

Doc No.

Package Type

Remarks

Weight

Freight Charges

Date : {{date("d/m/Y", strtotime(@$parcels->date))}}

{{$srno}}

{{@$parcels->receiver_name}}

{{@$parcels->city_name}}

{{@$parcels->consignment_no}}

{{@$parcels->dp_name}}

{{@$parcels->remakrs}}

{{@$parcels->weight}} {{strtoupper(@$parcels->weight_type)}}

{{Laracore::showPrice(@$parcels->net_amt)}}

@endif

Bank Name:

{{@$branch->bank_address}}

Account No.:

{{@$branch->bank_acno}}

IFSC Code:

{{@$branch->ifsc_code}}

MICR Code:

{{@$branch->micr_code}}

@if($value == 'Positive') @endif @if($roundValue > 0 && $roundValue <= 0.50) @endif

Gross Total ++:

₹ {{Laracore::showPrice($bill->amount)}}

Discount:

- {{ Laracore::showPrice($totalAmount - $bill->amount) }}

{{$bill->fchpercent}}% Fuel Surcharge:

₹ {{Laracore::showPrice(($bill->amount * $bill->fchpercent)/100)}}

Total value of supply:

₹ {{Laracore::showPrice($totAmount)}}

{{$bill->cgstpercent}}% CGST:

₹ {{Laracore::showPrice(($totAmount * $bill->cgstpercent)/100)}}

{{$bill->sgstpercent}}% SGST/UTGST:

₹ {{Laracore::showPrice(($totAmount * $bill->sgstpercent)/100)}}

{{$bill->igstpercent}}% IGST:

₹ {{Laracore::showPrice(($totAmount * $bill->igstpercent)/100)}}

Round Off (Add):

₹ {{Laracore::showPrice($roundValue)}}

Net Amt:

₹ {{ Laracore::showPrice($finalGrandTotal) }}

Amount in Words : {{ getIndianCurrency($finalGrandTotal) }}

For, {{@$branch->name}}

Please make payment in favor of {{@$branch->name}}

Authorized Signature

@if($branch['bill_terms_and_conditions'] != '') @endif
Remarks: @php $termsAndConditionsArr = explode("\n", str_replace("\r", "", @$branch->bill_terms_and_conditions)); @endphp @foreach($termsAndConditionsArr as $termsAndConditions)

{{$termsAndConditions}}

@endforeach
@endforeach