invoiceType, $this->transactionType); } public function getTotalAmount(): RsdAmount { return RsdAmount::fromFloat($this->totalAmount / 10_000); } public function getBuyerId(): ?string { return $this->buyerId; } public function getReceiptNumber(): string { return "{$this->requestedBy}-{$this->signedBy}-{$this->totalCounter}"; } public function getReceiptCounter(): string { $type = $this->getReceiptType(); return "{$this->transactionTypeCounter}/{$this->totalCounter}{$type->value}"; } public function getReceiptDate(): \DateTimeImmutable { $time = $this->dateAndTime / 1000; $format = ($time == round($time)) ? 'U' : 'U.v'; $date = DateTimeImmutable::createFromFormat($format, (string)$time); return $date->setTimezone(new \DateTimeZone('Europe/Belgrade')); } }