first commit

This commit is contained in:
2025-08-02 16:30:27 +02:00
commit 23646bfcee
14851 changed files with 1750626 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<?php
use KupShop\KupShopBundle\Util\Compat\ServiceContainer;
use KupShop\OrderingBundle\Util\Order\OrderInfo;
/**
* Smarty plugin.
*/
function smarty_function_get_named_vats($params, &$smarty)
{
if (!isset($params['vats'])) {
throw new InvalidArgumentException('Parameter \'vats\' is required!');
}
if (!is_array($params['vats'])) {
throw new InvalidArgumentException('Parameter \'vats\' must be of type array!');
}
$orderInfo = ServiceContainer::getService(OrderInfo::class);
$namedVats = $orderInfo->getNamedVats($params['vats']);
if (!empty($params['assign'])) {
$smarty->assign($params['assign'], $namedVats);
} else {
return $namedVats;
}
}