1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

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()
{
if (count($this->documents)) {
if ($this->documents->count()) {
return true;
}
if ($this->account->defaultDocuments->count()) {
return true;
}