@extends('layouts.master') @section('title') Tarifas @endsection @section('content') @component('components.breadcrumb') @slot('li_1') Inicio @endslot @slot('li_2') Panel Facturación @endslot @slot('title') Tarifas @endslot @endcomponent
{{-- BOTÓN ORIGINAL --}}
@foreach ($tarifas as $t) @php $tipoCobro = $t->tipo_cobro ?? 'FIJO_BLOQUE'; $fechaInicio = $t->vigencia_inicio ? \Carbon\Carbon::parse($t->vigencia_inicio)->format('Y-m-d') : ''; $fechaFin = $t->vigencia_fin ? \Carbon\Carbon::parse($t->vigencia_fin)->format('Y-m-d') : ''; @endphp {{-- NUEVO CAMPO --}} @endforeach
Categoría Tipo de Cobro Monto Fijo Monto Variable Vigencia Estado Acciones
{{ $t->categoriaTarifa->nombre_categoria ?? '-' }} @if ($tipoCobro === 'SOLO_CONSUMO') Solo consumo @else Fijo + excedente @endif S/ {{ number_format($t->monto_fijo, 2) }} S/ {{ number_format($t->monto_variable, 2) }} {{ $fechaInicio }} a {{ $fechaFin ?: 'Indefinida' }} {{ $t->estado }}
{{-- ====================================================== MODAL CREAR TARIFA ====================================================== --}} {{-- ====================================================== MODAL EDITAR TARIFA ====================================================== --}} @endsection @section('script') {{-- DATATABLES --}} {{-- ====================================================== DATATABLE ====================================================== --}} {{-- ====================================================== AJAX CREAR / EDITAR / ELIMINAR ====================================================== --}} @endsection