<?php

namespace App\Http\Resources;

use Illuminate\Http\Resources\Json\JsonResource;


class IngresoView extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {
        return [
            'idIngreso'             => strval($this->idIngreso),
            'date'                  => date("d.m.y",strtotime($this->dateIngreso)),
            'type'                  => $this->typeIngreso,
            'nameType'              => $this->nameTypeIngreso,
            'ref'                   => $this->refIngreso,       
            'idDTIngreso'           => strval($this->idDTIngreso),
            'idDTIngresoCobro'      => strval($this->idDTIngresoCobro),
            'idPlanilla'            => $this->idPlanilla,
            'idBanco'               => $this->idBAnco,
            'codBanco'              => $this->codBAnco,
            'codCTA'                => $this->codCTA,
            'typeCuenta'            => $this->typeCuenta,
            'visiblePago'           => $this->visiblePago,
            'idE_bancos'            => $this->idE_bancos,
            'idMoneda_bancos'       => $this->idMoneda_bancos,
            'ctaSysOld'             => $this->ctaSysOld,
            'heredable'             => $this->heredable,
            'nroCuenta'             => $this->nroCuenta,
            'descripcionBanco'      => $this->descripcionBanco,
            'nombreBanco'           => $this->nombreBanco,
            'codEBanco'             => $this->codEBanco,
            'nameEBanco'            => $this->nameEBanco,
            'ctaDT'                 => $this->ctaDT,
            'typeDT'                => $this->typeDT,
            'idT'                   => $this->idT,
            'anoDT'                 => $this->anoDT,
            'mesDT'                 => $this->mesDT,
            'dhDT'                  => $this->dhDT,
            'montoDT'               => $this->montoDT,
            'idMoneda_transdt'      => $this->idMoneda_transdt,
            'idE_transdt'           => strval($this->idE_transdt),
            'idTIngreso'            => strval($this->idTIngreso),
            'ctaT'                  => $this->ctaT,
            'dateT'                 => date("d.m.y h:i a",strtotime($this->dateT)),
            'typeT'                 => $this->typeT,
            'refT'                  => $this->refT,
            'descT'                 => $this->descT,
            'enableT'               => $this->enableT,
            'idU'                   => $this->idU,            
        ];
    }
}


