fixed #2424 #30xc7aw

This commit is contained in:
Denis Duliçi 2022-06-06 14:37:23 +03:00
parent 349e86d299
commit ccca2f8013

View File

@ -34,7 +34,9 @@ class Content extends Component
$this->counts = [];
// Handle documents
$this->documents = $this->contact->documents()->with('transactions')->get();
$docs = $this->contact->isCustomer() ? 'invoices' : 'bills';
$this->documents = $this->contact->$docs()->with('transactions')->get();
$this->counts['documents'] = $this->documents->count();