diff --git a/hesabixCore/src/Service/Explore.php b/hesabixCore/src/Service/Explore.php index 44fea77..9a3d963 100644 --- a/hesabixCore/src/Service/Explore.php +++ b/hesabixCore/src/Service/Explore.php @@ -475,8 +475,10 @@ class Explore return null; $jdate = new Jdate; $label = ''; - if ($cheque->getType() == 'input') - $label = 'چک شماره ' . $cheque->getNumber() . ' مربوط به ' . $cheque->getPerson()->getNikename() . ' با مبلغ ' . $cheque->getAmount(); + if ($cheque->getType() == 'input') { + $personName = $cheque->getPerson() ? $cheque->getPerson()->getNikename() : 'نامشخص'; + $label = 'چک شماره ' . $cheque->getNumber() . ' مربوط به ' . $personName . ' با مبلغ ' . $cheque->getAmount(); + } return [ 'id' => $cheque->getId(), 'number' => $cheque->getNumber(), @@ -727,4 +729,4 @@ class Explore 'upper' => $item->getUpper() ]; } -} +} \ No newline at end of file