@@ -20,4 +20,16 @@ class DocumentStore extends AbstractStore | |||
{ | |||
// @TODO : à écrire | |||
} | |||
//findLastInvoice | |||
public function getOneLastInvoice() | |||
{ | |||
$query = $this->query->create(); | |||
$query | |||
->filterByMerchant($this->merchant) | |||
->orderBy('.createdAt', 'DESC'); | |||
return $query->findOne(); | |||
} | |||
} |