Skip to content

Commit

Permalink
Fix auto-incrementing invoice and quote IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
pierredup committed Jun 1, 2023
1 parent 4e5db9e commit 5d15bab
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function generate(object $entity, string $field): string
$lastId = $this->registry
->getRepository(get_class($entity))
->createQueryBuilder('e')
->select('MAX(e.' . $field . ')')
->select('MAX(ABS(e.' . $field . '))')
->getQuery()
->getSingleScalarResult();
} catch (NonUniqueResultException|NoResultException $e) {
Expand Down

0 comments on commit 5d15bab

Please sign in to comment.