Browse Source

[backend] Référence documents : correction bug génération référence

dev
Guillaume Bourgeois 4 years ago
parent
commit
a3498b06b0
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      common/models/Document.php

+ 1
- 1
common/models/Document.php View File

@@ -193,7 +193,7 @@ class Document extends ActiveRecordCommon
}

$prefix = Producer::getConfig('document_' . $classLower . '_prefix');
$oneDocumentExist = $class::searchOne([], ['orderby' => 'reference DESC']);
$oneDocumentExist = $class::searchOne(['status' => Document::STATUS_VALID] , ['orderby' => 'reference DESC']);

if ($oneDocumentExist) {
$reference = $oneDocumentExist->reference;

Loading…
Cancel
Save