Explorar el Código

[Backend] Documents : correctif problème génération pdf (nom fichier brouillon)

refactoring
Guillaume Bourgeois hace 2 años
padre
commit
b79c8ca379
Se han modificado 1 ficheros con 12 adiciones y 1 borrados
  1. +12
    -1
      common/models/Document.php

+ 12
- 1
common/models/Document.php Ver fichero

@@ -480,7 +480,18 @@ class Document extends ActiveRecordCommon

public function getFilename()
{
return $this->getType() . '-' . $this->reference . '.pdf';
$filename = $this->getType() . '-';

if($this->isStatusValid()) {
$filename .= $this->reference;
}
elseif($this->isStatusDraft()) {
$filename .= 'Brouillon-'.$this->id;
}

$filename .= '.pdf';

return $filename;
}

public function getFilenameComplete()

Cargando…
Cancelar
Guardar