<label for="">  ایڈوانس رقم:</label>
<select name="payable_pump" id="pump_payalbe_p" onchange="p_pump_payable_change()" class="form-control">
    <option value="">----Select Pump Payable----</option>

    @forelse($pump_payables as $payable)

        @php
            if ($payable->adv_short_amount != 0) {
                  $actual_amount = $payable->adv_short_amount;
              } else {
                  $actual_amount = $payable->advance_amount;
              }
        @endphp


        {{-- <option value="{{ $payable->id }}">{{ $payable->advance_amount }}</option> --}}

        {{-- <option value="{{ $payable->id }}" data-amount="{{ $actual_amount }}">TRIP
            #{{ $payable->trip_id }} &nbsp;&nbsp;&nbsp;{{ $actual_amount }} &nbsp;&nbsp;&nbsp;{{ $payable->oil_type }}
            &nbsp;&nbsp;&nbsp; Slip# {{ $payable->slip_number }}</option> --}}

            <option value="{{ $payable->id }}" data-amount="{{  $actual_amount }}">
                {{  $actual_amount }}</option>
    @empty
    @endforelse
</select>
<span class="text-danger error" id="payable_pump_error"></span>
