소스 검색

[Administration] Documents : problème génération des références

feature/souke
Guillaume Bourgeois 1 년 전
부모
커밋
2c14f0bd62
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. +2
    -2
      common/logic/Document/Document/Service/DocumentReferenceGenerator.php

+ 2
- 2
common/logic/Document/Document/Service/DocumentReferenceGenerator.php 파일 보기

} }


$prefix = $this->producerSolver->getConfig('document_' . $classLower . '_prefix'); $prefix = $this->producerSolver->getConfig('document_' . $classLower . '_prefix');
$oneDocumentExist = $classComplete::searchOne(['status' => Document::STATUS_VALID], ['orderby' => 'reference DESC']);
$oneDocumentExist = $classComplete::searchOne(['status' => Document::STATUS_VALID], ['orderby' => 'reference_number DESC']);


if ($oneDocumentExist) { if ($oneDocumentExist) {
$referenceNumberDocumentExist = $oneDocumentExist->reference_number; $referenceNumberDocumentExist = $oneDocumentExist->reference_number;


public function strPadReference(int $referenceNumber): string public function strPadReference(int $referenceNumber): string
{ {
return str_pad($referenceNumber, 6, '0', STR_PAD_LEFT);
return str_pad($referenceNumber, 5, '0', STR_PAD_LEFT);
} }


private function getMainName(User $user): string private function getMainName(User $user): string

Loading…
취소
저장