allow forced filename
This commit is contained in:
parent
015e85c942
commit
d13dda978d
@ -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
|
||||
*
|
||||
|
@ -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(
|
||||
|
@ -56,6 +56,11 @@ interface pdfdocumentsGenericInterface
|
||||
*/
|
||||
public function genPdf($sFilename, $iSelLang = 0, $target = 'I');
|
||||
|
||||
/**
|
||||
* @param string $filename
|
||||
*/
|
||||
public function setFilename($filename);
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user