Check default docs in hasDocs

This commit is contained in:
Hillel Coren 2017-07-21 13:43:42 +03:00
parent 6b2cd153d3
commit 947c1e2a12

View File

@ -1330,7 +1330,11 @@ class Invoice extends EntityModel implements BalanceAffecting
*/ */
public function hasDocuments() public function hasDocuments()
{ {
if (count($this->documents)) { if ($this->documents->count()) {
return true;
}
if ($this->account->defaultDocuments->count()) {
return true; return true;
} }