Скорректирован Document::jsonSerialize() - не выдаёт пустого кассира

pull/2/head
Anthony Axenov 2020-05-28 22:55:53 +08:00
parent 12b98dcdac
commit 9ea1c81666
1 changed files with 5 additions and 5 deletions

View File

@ -401,11 +401,11 @@ class Document extends Entity
*/
public function jsonSerialize()
{
$json = [
'company' => $this->getCompany()->jsonSerialize(), // обязательно
'payments' => $this->payments->jsonSerialize(), // обязательно
'cashier' => $this->getCashier() ?? '',
];
$json['company'] = $this->getCompany()->jsonSerialize();// обязательно
$json['payments'] = $this->payments->jsonSerialize(); // обязательно
if ($this->getCashier()) {
$json['cashier'] = $this->getCashier();
}
if ($this->getCorrectionInfo()) {
$json['correction_info'] = $this->getCorrectionInfo()->jsonSerialize(); // обязательно для коррекционных
} else {