public function getEndValue(Entity $entity, $field)
 {
     switch ($field) {
         case 'releaseDate':
             return date('Y-m-d', $entity->getReleaseDate());
             break;
         case 'sellDate':
             return date('Y-m-d', $entity->getSellDate());
             break;
         case 'paymentDate':
             return date('Y-m-d', $entity->getPaymentDate());
             break;
         case 'showShipment':
             return $entity->getShowShipment() == 1 ? $this->t('syes') : $this->t('sno');
             break;
         case 'status':
             return $this->t('invoiceStatus' . $entity->getStatus());
             break;
         case 'contractor':
             $contractor = $this->repo('Contractor', 'Contractor')->find($entity->getContractor());
             if ($contractor) {
                 return $contractor->getName();
             } else {
                 $entity->getContractor();
             }
             break;
         case 'owner':
             $user = $this->repo('User', 'User')->find($entity->getOwner());
             if ($user) {
                 return $user->getName() . ' (ID:' . $entity->getOwner() . ')';
             } else {
                 return $entity->getOwner();
             }
             break;
     }
     return parent::getEndValue($entity, $field);
 }