1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
currency.php
См. документацию.
1
<?php
2
namespace
Bitrix\Sale\Services\Company\Restrictions
;
3
4
use
Bitrix\Currency\CurrencyManager
;
5
use
Bitrix\Main\Localization\Loc
;
6
use
Bitrix\Sale\Delivery\Restrictions
;
7
use
Bitrix\Sale\Internals
;
8
use
Bitrix\Sale
;
9
use
Bitrix\Sale\PaymentCollection
;
10
use
Bitrix\Sale\ShipmentCollection
;
11
use
Bitrix\Sale\Services\Base
;
12
13
Loc::loadMessages(__FILE__);
14
19
class
Currency
extends
Base\Restriction
20
{
25
protected
static
function
extractParams
(
Internals
\
Entity
$entity
)
26
{
27
if
(
$entity
instanceof
Internals
\
CollectableEntity
)
28
{
30
$collection =
$entity
->getCollection();
31
33
$order
= $collection->getOrder();
34
}
35
elseif
(
$entity
instanceof
Sale
\Order)
36
{
38
$order
=
$entity
;
39
}
40
41
if
(!
$order
)
42
return
false
;
43
44
return
$order
->getCurrency();
45
}
46
50
public
static
function
getClassTitle
()
51
{
52
return
Loc::getMessage(
'SALE_COMPANY_RULES_BY_CURRENCY_TITLE'
);
53
}
54
58
public
static
function
getClassDescription
()
59
{
60
return
Loc::getMessage(
'SALE_COMPANY_RULES_BY_CURRENCY_DESC'
);
61
}
62
67
public
static
function
getParamsStructure
(
$entityId
= 0)
68
{
69
return
array
(
70
"CURRENCY"
=>
array
(
71
"TYPE"
=>
"ENUM"
,
72
'MULTIPLE'
=>
'Y'
,
73
"LABEL"
=> Loc::getMessage(
"SALE_COMPANY_RULES_BY_CURRENCY"
),
74
"OPTIONS"
=>
CurrencyManager::getCurrencyList
()
75
)
76
);
77
}
78
85
public
static
function
check
(
$params
,
array
$restrictionParams, $serviceId = 0)
86
{
87
if
(isset($restrictionParams) && is_array($restrictionParams[
'CURRENCY'
]))
88
return
in_array(
$params
, $restrictionParams[
'CURRENCY'
]);
89
90
return
true
;
91
}
92
}
Bitrix\Currency\CurrencyManager
Определения
currencymanager.php:16
Bitrix\Currency\CurrencyManager\getCurrencyList
static getCurrencyList()
Определения
currencymanager.php:109
Bitrix\Main\Localization\Loc
Определения
loc.php:12
Bitrix\Sale\Internals\CollectableEntity
Определения
collectableentity.php:14
Bitrix\Sale\PaymentCollection
Определения
paymentcollection.php:19
Bitrix\Sale\Services\Base\Restriction\extractParams
static extractParams(Entity $entity)
Определения
restriction.php:115
Bitrix\Sale\Services\Company\Restrictions\Currency\check
static check($params, array $restrictionParams, $serviceId=0)
Определения
currency.php:85
Bitrix\Sale\Services\Company\Restrictions\Currency\getClassTitle
static getClassTitle()
Определения
currency.php:50
Bitrix\Sale\Services\Company\Restrictions\Currency\getClassDescription
static getClassDescription()
Определения
currency.php:58
Bitrix\Sale\Services\Company\Restrictions\Currency\getParamsStructure
static getParamsStructure($entityId=0)
Определения
currency.php:67
Bitrix\Sale\ShipmentCollection
Определения
shipmentcollection.php:20
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$entity
$entity
Определения
group_bizproc_workflow_delete.php:17
Bitrix\Catalog\Restriction
Определения
toolavailabilitymanager.php:3
Bitrix\Currency
Bitrix\Main\Entity
Определения
ufield.php:9
Bitrix\Sale\Cashbox\Internals
Bitrix\Sale\Delivery\Restrictions
Определения
base.php:2
Bitrix\Sale\Internals
Определения
accountnumber.php:3
Bitrix\Sale\Services\Base
Определения
concreteproductrestriction.php:3
Bitrix\Sale\Services\Company\Restrictions
Определения
currency.php:2
Bitrix\Sale
$order
$order
Определения
payment.php:8
$entityId
$entityId
Определения
payment.php:4
elseif
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения
prolog_main_admin.php:393
$params
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения
template.php:799
bitrix
modules
sale
lib
services
company
restrictions
currency.php
Создано системой
1.14.0