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

Detalle del cierre de caja

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

Comprobante de Retiro

@csrf

Comprobante de Transbank

Totales cálculados

@php $total = $datos->efectivo + $datos->tarjeta + $datos->transferencias @endphp @php $saldo_calculado = $datos->efectivo + $datos->saldo_inicial - $datos->gastos; @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 ${{ number_format($datos->saldo_inicial,0,'.','.') }}
Gasto - ${{ number_format($datos->gastos,0,'.','.') }}
SALDO CAJA CALCULADO
(Saldo inicial + efectivo - Gastos)
${{ number_format($saldo_calculado,0,'.','.') }}
SALDO CAJA REAL ${{ number_format($datos->saldo_real,0,'.','.') }} @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,'.','.') }} @endif
RETIRO ${{ number_format($datos->retiro,0,'.','.') }}
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

Resumen de ventas

DOCUMENTO CLIENTE FECHA F. PAGO MONTO
@endsection @push('styles') @endpush @push('scripts') @endpush