瀏覽代碼

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

dev
Guillaume Bourgeois 4 年之前
父節點
當前提交
a3498b06b0
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      common/models/Document.php

+ 1
- 1
common/models/Document.php 查看文件

@@ -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…
取消
儲存