replace tcpdf with TCPDF

This commit is contained in:
Dennis Eichhorn 2023-09-29 03:30:44 +00:00
parent 3aa5f09708
commit 9b0006890a
2 changed files with 7 additions and 4 deletions

View File

@ -822,7 +822,7 @@ final class ApiBillController extends Controller
->where('id', $templateId)
->execute();
require_once __DIR__ . '/../../../Resources/tcpdf/tcpdf.php';
require_once __DIR__ . '/../../../Resources/tcpdf/TCPDF.php';
$response->header->set('Content-Type', MimeType::M_PDF, true);
@ -961,7 +961,7 @@ final class ApiBillController extends Controller
->where('id', $templateId)
->execute();
require_once __DIR__ . '/../../../Resources/tcpdf/tcpdf.php';
require_once __DIR__ . '/../../../Resources/tcpdf/TCPDF.php';
$view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/' . \substr($template->getSourceByName('bill.pdf.php')->getPath(), 0, -8), 'pdf.php');

View File

@ -55,10 +55,13 @@ final class ApiPurchaseController extends Controller
*/
public function apiSupplierBillUpload(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void
{
$originalType = $request->getDataInt('type') ?? ((int) $this->app->appSettings->get(
/** @var \Model\Setting $setting */
$setting = $this->app->appSettings->get(
names: SettingsEnum::ORIGINAL_MEDIA_TYPE,
module: self::NAME
)->content);
);
$originalType = $request->getDataInt('type') ?? ((int) $setting->content);
/** @var \Modules\Billing\Models\BillType $purchaseTransferType */
$purchaseTransferType = BillTypeMapper::get()