1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
delivery.php
См. документацию.
1
<?php
2
4
class
CSaleDelivery
extends
CAllSaleDelivery
5
{
7
public
static
function
PrepareCurrency4Where
(
$val
,
$key
, $operation, $negative, $field, &$arField, &
$arFilter
)
8
{
9
$val
= DoubleVal(
$val
);
10
11
$baseSiteCurrency =
""
;
12
if
(isset(
$arFilter
[
"LID"
]) &&
$arFilter
[
"LID"
] <>
''
)
13
$baseSiteCurrency =
CSaleLang::GetLangCurrency
(
$arFilter
[
"LID"
]);
14
elseif
(isset(
$arFilter
[
"CURRENCY"
]) &&
$arFilter
[
"CURRENCY"
] <>
''
)
15
$baseSiteCurrency =
$arFilter
[
"CURRENCY"
];
16
17
if
($baseSiteCurrency ==
''
)
18
return
False;
19
20
$strSqlSearch =
""
;
21
22
$dbCurrency =
CCurrency::GetList
(
"sort"
,
"asc"
);
23
while
($arCurrency = $dbCurrency->Fetch())
24
{
25
$val1 =
roundEx
(
CCurrencyRates::ConvertCurrency
(
$val
, $baseSiteCurrency, $arCurrency[
"CURRENCY"
]),
SALE_VALUE_PRECISION
);
26
if
($strSqlSearch <>
''
)
27
$strSqlSearch .=
" OR "
;
28
29
$strSqlSearch .=
"(D.ORDER_CURRENCY = '"
.$arCurrency[
"CURRENCY"
].
"' AND "
;
30
if
($negative ==
"Y"
)
31
$strSqlSearch .=
"NOT"
;
32
$strSqlSearch .=
"("
.$field.
" "
.$operation.
" "
.$val1.
" OR "
.$field.
" IS NULL OR "
.$field.
" = 0)"
;
33
$strSqlSearch .=
")"
;
34
}
35
36
return
"("
.$strSqlSearch.
")"
;
37
}
38
40
public
static
function
PrepareLocation4Where
(
$val
,
$key
, $operation, $negative, $field, &$arField, &
$arFilter
)
41
{
42
return
"(D2L.LOCATION_ID = "
.intval(
$val
).
" AND D2L.LOCATION_TYPE = 'L' "
.
43
" OR L2LG.LOCATION_ID = "
.intval(
$val
).
" AND D2L.LOCATION_TYPE = 'G') "
;
44
}
45
}
CAllCurrency\GetList
static GetList($by='sort', $order='asc', $lang=LANGUAGE_ID)
Определения
currency.php:554
CAllCurrencyRates\ConvertCurrency
static ConvertCurrency($valSum, $curFrom, $curTo, $valDate="")
Определения
currency_rate.php:393
CAllSaleDelivery
Определения
delivery.php:14
CSaleDelivery
Определения
delivery.php:5
CSaleDelivery\PrepareLocation4Where
static PrepareLocation4Where($val, $key, $operation, $negative, $field, &$arField, &$arFilter)
Определения
delivery.php:40
CSaleDelivery\PrepareCurrency4Where
static PrepareCurrency4Where($val, $key, $operation, $negative, $field, &$arField, &$arFilter)
Определения
delivery.php:7
CSaleLang\GetLangCurrency
static GetLangCurrency($siteId)
Определения
settings.php:52
roundEx
roundEx($value, $prec=0)
Определения
tools.php:4635
elseif
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения
prolog_main_admin.php:393
$key
if(empty($signedUserToken)) $key
Определения
quickway.php:257
SALE_VALUE_PRECISION
const SALE_VALUE_PRECISION
Определения
include.php:46
$val
$val
Определения
options.php:1793
$arFilter
$arFilter
Определения
user_search.php:106
bitrix
modules
sale
mysql
delivery.php
Создано системой
1.14.0