@extends('layout') @section('content')

Editar cierre de caja

{{ $datos->tienda->nombre.' - '.\Carbon\Carbon::parse($datos->fecha)->format('d/m/Y') }}
@csrf

Totales cálculados

@php $total = $datos->efectivo + $datos->tarjeta + $datos->transferencias @endphp @php $saldo_final = $datos->saldo_real - $datos->retiro; @endphp
Forma de pago Confirmar
Efectivo ({{ $cantidad['efectivo'] }}) ${{ number_format($datos->efectivo,0,'.','.') }}
Tarjeta ({{ $cantidad['tarjeta'] }}) ${{ number_format($datos->tarjeta,0,'.','.') }}
Transferencia ({{ $cantidad['transferencia'] }}) ${{ number_format($datos->transferencias,0,'.','.') }}
TOTAL VENTAS${{ number_format($total,0,'.','.') }}
Saldo inicial
Gastos - ${{ number_format($datos->gastos,0,'.','.') }}
SALDO CAJA CALCULADO
(Saldo inicial + efectivo - Gastos)
${{ number_format($datos->efectivo + $datos->saldo_inicial - $datos->gastos,0,'.','.') }}
SALDO CAJA REAL
@php $resto = $datos->saldo_inicial + $datos->efectivo - $datos->gastos - $datos->saldo_real; @endphp @if($resto < 0) Saldo a favor ${{ number_format(abs($resto),0,'.','.') }} @elseif($resto > 0) Saldo en contra -${{ number_format(abs($resto),0,'.','.') }} @else @endif
RETIRO
SALDO FINAL${{ number_format($saldo_final,0,'.','.') }}

Gastos

@if(count($gastos) > 0) @foreach($gastos as $g) @endforeach
ITEM MONTO
{{ $g->item }} ${{ number_format($g->monto,0,'.','.') }}
@else

No hay gastos ingresados en este cierre de caja.

@endif
@endsection @push('scripts') @endpush