$request = new Requests\PrintReceiptsRequest([
'CopyCount' => 1,
]);
$request->addOrder(Common\Order::withDispatchNumber(1109472596));
$response = $client->sendPrintReceiptsRequest($request);
if ($response->hasErrors()) {
// обработка ошибок
}
// Или возвращаем содержимое PDF файла...
$string = (string)$response->getBody();
return view('pdf', compact('string'));
<?
header('Content-Type: application/pdf');
echo $string;
?>
<?
header('Content-Type: application/pdf');
echo $string;
?>
AddEventHandler("catalog", "OnDiscountUpdate", "refreshDiscountSales");
AddEventHandler("catalog", "OnDiscountAdd", "refreshDiscountSalesAdd");
AddEventHandler("catalog", "OnDiscountDelete", "refreshDiscountSalesDelete");
AddEventHandler("catalog", "OnDiscountUpdate", "refreshDiscountSalesUpdate");
$eventManager = \Bitrix\Main\EventManager::getInstance();
$eventManager->addEventHandler(
"sale",
"\Bitrix\Sale\Internals\Discount::OnAfterUpdate",
"refreshDiscountSales"
);
AddEventHandler("sale", "\Bitrix\Catalog\DiscountTable::OnAfterUpdate", "refreshDiscountSales");
$eventManager = \Bitrix\Main\EventManager::getInstance();
$eventManager->addEventHandler(
"sale",
"\Bitrix\Sale\Internals\Discount::OnAfterUpdate",
"refreshDiscountSales"
);
function refreshDiscountSales ($primary, $fields) {
writeLog("Скидка обновилась");
}
$eventManager = \Bitrix\Main\EventManager::getInstance();
$eventManager->addEventHandler(
"sale",
"\Bitrix\Sale\Internals\Discount::OnAfterUpdate",
"refreshDiscountSales"
);
function refreshDiscountSales () {
writeLog("Скидка обновилась");
}