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

} }


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


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

Loading…
Cancel
Save