@extends('layout.app') @section('title', 'Edit Freight Invoice') @push('header_script') @endpush @section('content')
Back to List
{!! Form::open([ 'route' => ['freight-billing.update', $freightBilling->id], 'class' => 'needs-validation', 'method' => 'put', 'autocomplete' => 'off', 'id' => 'invoiceForm', 'onsubmit' => 'document.getElementById("BtnSubmit").disabled = true', ]) !!}
Invoice Details
{{ $errors->first('invoice_date') }}
Party Details
@php $partyDetail = $freightBilling->party; @endphp
{{ $partyDetail->party_name ?? 'N/A' }}
{{ $partyDetail->gst_no ?? 'N/A' }}
{{ $partyDetail->mobile_no ?? 'N/A' }}
{{ $partyDetail->address ?? 'N/A' }}
{{ $partyDetail->city ?? '' }} - {{ $partyDetail->state->state_name ?? '' }}
{{-- Hidden inputs --}}
Bank Details
{!! Form::select('client_bank_id', ['' => '--Select Bank Account--'] + $bank, $freightBilling->client_bank_id, [ 'class' => 'form-control select2', 'id' => 'client_bank_id', 'required', ]) !!}
Bank Name: -
Account No: -
IFSC Code: -
Selected GR Details
{{-- {{ count($freightBilling->freightBillDetail) }} Items --}}
@php $rowNum = 1; @endphp @foreach ($freightBilling->freightBillDetail as $detail) @php $freight = $detail->freightEntry; $groupedUnits = $freight->items->groupBy('weight_unit'); $freightSubTotal = floatval($freight->sub_total ?? 0); $halting = floatval($detail->halting_charge ?? 0); $extra = floatval($detail->extra_charge ?? 0); $deduction = floatval($detail->any_deduction ?? 0); $netAmount = floatval($detail->net_amount ?? 0); @endphp {{-- FROM TO --}} {{-- QTY MULTI UNIT --}} {{-- RATE MULTI UNIT --}} {{-- SUB TOTAL (AUTO CALCULATED) --}} {{-- HALTING --}} {{-- EXTRA --}} {{-- DEDUCTION --}} {{-- NET --}} {{-- Hidden IDs for Update --}} {{-- Remove Button --}} @endforeach {{-- --}}
# GR No Date Truck No From - To Qty Rate Sub Total (+) Halting (+) Extra (-) Deduct Net Amount Action
{{ $rowNum++ }} {{ $freight->lr_no }} {{ date('d-M-y', strtotime($freight->date)) }} {{ $freight->vehicle->vehicle_no ?? '-' }}
{{ $freight->from_location }} {{ $freight->to_location }}
@foreach ($groupedUnits as $unit => $rows)
{{ number_format($rows->sum('charge_weight'), 2) }} {{ $unit }}
@endforeach
@foreach ($freight->items as $item)
{{ number_format($item->rate, 2) }} / {{ $item->weight_unit }}
@endforeach
Total0 0.00 0.00 0.00 0.00 0.00
Invoice Summary
{{-- Total Amount --}}
Sub Total
{{-- Less Discount --}}
Discount
{{-- Total After Discount --}}
Taxable Amount
{{-- GST Section --}}
@if (($taxSettings['enable_gst_type'] ?? '') == 'rcm')
RCM Applied (5%)
@else
{{-- GST Amount --}}
GST Amount
@endif
{{-- Final Total --}}
Grand Total

₹ {{ number_format($freightBilling->grand_total, 2) }}

{{-- Submit Button --}}
{!! Form::close() !!}
@endsection @push('footer_script') @endpush