mirror of
https://github.com/anthonyaxenov/atol-online.git
synced 2024-11-26 07:34:14 +00:00
Скорректирован Document::jsonSerialize() - не выдаёт пустого кассира
This commit is contained in:
parent
12b98dcdac
commit
9ea1c81666
@ -401,11 +401,11 @@ class Document extends Entity
|
|||||||
*/
|
*/
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
$json = [
|
$json['company'] = $this->getCompany()->jsonSerialize();// обязательно
|
||||||
'company' => $this->getCompany()->jsonSerialize(), // обязательно
|
$json['payments'] = $this->payments->jsonSerialize(); // обязательно
|
||||||
'payments' => $this->payments->jsonSerialize(), // обязательно
|
if ($this->getCashier()) {
|
||||||
'cashier' => $this->getCashier() ?? '',
|
$json['cashier'] = $this->getCashier();
|
||||||
];
|
}
|
||||||
if ($this->getCorrectionInfo()) {
|
if ($this->getCorrectionInfo()) {
|
||||||
$json['correction_info'] = $this->getCorrectionInfo()->jsonSerialize(); // обязательно для коррекционных
|
$json['correction_info'] = $this->getCorrectionInfo()->jsonSerialize(); // обязательно для коррекционных
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user