allow forced filename

This commit is contained in:
Daniel Seifert 2020-06-05 09:37:11 +02:00
bovenliggende 015e85c942
commit d13dda978d
Getekend door: DanielS
GPG sleutel-ID: 8A7C4C6ED1915C6F
3 gewijzigde bestanden met toevoegingen van 21 en 0 verwijderingen

Bestand weergeven

@ -39,6 +39,9 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
/** @var Smarty */
public $oSmarty;
/** @var string */
public $filename;
/**
* pdfDocumentsGeneric constructor.
*/
@ -126,6 +129,14 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
return [self::PDF_ORIENTATION_PORTRAIT, 'A4', 'de'];
}
/**
* @param $filename
*/
public function setFilename($filename)
{
$this->filename = $filename;
}
/**
* Gets proper file name
*

Bestand weergeven

@ -66,6 +66,11 @@ abstract class pdfdocumentsOrder extends pdfdocumentsGeneric implements orderInt
*/
public function getFilename()
{
// forced filename from setFilename()
if ($this->filename) {
return $this->filename;
}
$sTrimmedBillName = trim($this->getOrder()->getFieldData('oxbilllname'));
return implode(

Bestand weergeven

@ -56,6 +56,11 @@ interface pdfdocumentsGenericInterface
*/
public function genPdf($sFilename, $iSelLang = 0, $target = 'I');
/**
* @param string $filename
*/
public function setFilename($filename);
/**
* @return string
*/