|
|
|
@@ -33,7 +33,8 @@ class PDFDownLoadManager extends ReceiptIssuingOrderManager |
|
|
|
$order = $this->order; |
|
|
|
|
|
|
|
$ret = $this->makeA4() |
|
|
|
->inline(); |
|
|
|
->inline() |
|
|
|
->header("Content-Disposition", sprintf('inline; filename=%s', $this->getFileNameA4())); |
|
|
|
if ($order->status_receipt_download_datetime === null) { |
|
|
|
|
|
|
|
$order->status_receipt_download_datetime = DateUtil::now(); |
|
|
|
@@ -77,7 +78,9 @@ class PDFDownLoadManager extends ReceiptIssuingOrderManager |
|
|
|
$ret = $pdf->setOption('page-height', 148) |
|
|
|
->setOption('page-width', 100) |
|
|
|
->setOption('encoding', 'utf-8') |
|
|
|
->inline(); |
|
|
|
->inline() |
|
|
|
->header("Content-Disposition", sprintf('inline; filename=%s', $this->getFileNameLetter())); |
|
|
|
|
|
|
|
|
|
|
|
return $ret; |
|
|
|
} |
|
|
|
@@ -98,4 +101,13 @@ class PDFDownLoadManager extends ReceiptIssuingOrderManager |
|
|
|
ReceiptIssuingOrderTax::COL_NAME_TAX_AMOUNT => number_format(data_get($tax, ReceiptIssuingOrderTax::COL_NAME_TAX_AMOUNT, 0)) ?? 0, |
|
|
|
]; |
|
|
|
} |
|
|
|
|
|
|
|
protected function getFileNameA4(): string |
|
|
|
{ |
|
|
|
return sprintf("領収証_%s_%s.pdf", $this->order->receipt_no, DateUtil::now()->format('YmdHis')); |
|
|
|
} |
|
|
|
protected function getFileNameLetter(): string |
|
|
|
{ |
|
|
|
return sprintf("領収証はがき_%s_%s.pdf", $this->order->receipt_no, DateUtil::now()->format('YmdHis')); |
|
|
|
} |
|
|
|
} |