<?php
 namespace Modules\RemoteData\EntityManagementWs\Model\Entity\CashingDocument; class Select extends \Modules\RemoteData\EntityManagementWs\Model\Entity\SelectAbstract { protected $entityClass = 'InvoiceCashing'; protected function getResponseFieldsFromEntity(\App\Entity\SelectAbstract $entityObj) : \stdClass { $outputFields = parent::getResponseFieldsFromEntity($entityObj); $cashingEnt = \Entity\InvoiceCashing::select($this->id); $outputFields->idInvoice = $cashingEnt->idInvoice; $outputFields->docType = $cashingEnt->docTypeCode; $outputFields->docDate = $cashingEnt->docDate; $outputFields->docNumber = $cashingEnt->docNumber?:null; $outputFields->value = $cashingEnt->value; $outputFields->currency = $cashingEnt->currency; $outputFields->addTime = \Engine\DateTime::createFromTimestamp($cashingEnt->addTime)->formatDatetimeIso(); $outputFields->issueTime = ($cashingEnt->issueTime)?\Engine\DateTime::createFromTimestamp($cashingEnt->issueTime)->formatDatetimeIso():null; $outputFields->voidTime = ($cashingEnt->voidTime)?\Engine\DateTime::createFromTimestamp($cashingEnt->voidTime)->formatDatetimeIso():null; if ($cashingEnt->documentsList) { $outputFields->documentsList = array_keys($cashingEnt->documentsList); } else { $outputFields->documentsList = null; } return $outputFields; } } 