Skip to content

Commit

Permalink
Merge pull request Dolibarr#25643 from MaximilienR-easya/dev_Fix_tick…
Browse files Browse the repository at this point in the history
…et_ref

Fix a bug with fetch with the object used to create the ticket
  • Loading branch information
eldy authored Aug 19, 2023
2 parents 70a36bd + 58c864b commit 4b98108
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion htdocs/ticket/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@
$db->begin();

$getRef = GETPOST("ref", 'alphanohtml');
if ($object->fetch('', $getRef) > 0) {
$test = new Ticket($db);
if ($test->fetch('', $getRef) > 0) {
$object->ref = $object->getDefaultRef();
$object->track_id = null;
setEventMessage($langs->trans('TicketRefAlreadyUsed', $getRef, $object->ref));
Expand Down

0 comments on commit 4b98108

Please sign in to comment.