3require_once(
$_SERVER[
"DOCUMENT_ROOT"].
"/bitrix/modules/sale/general/order_props_group.php");
12 if (!is_array($arOrder) && !is_array(
$arFilter))
14 $arOrder = strval($arOrder);
20 if (is_array($arGroupBy))
29 "ID" =>
array(
"FIELD" =>
"PG.ID",
"TYPE" =>
"int"),
30 "PERSON_TYPE_ID" =>
array(
"FIELD" =>
"PG.PERSON_TYPE_ID",
"TYPE" =>
"int"),
31 "NAME" =>
array(
"FIELD" =>
"PG.NAME",
"TYPE" =>
"string"),
32 "SORT" =>
array(
"FIELD" =>
"PG.SORT",
"TYPE" =>
"int")
38 $arSqls[
"SELECT"] = str_replace(
"%%_DISTINCT_%%",
"DISTINCT", $arSqls[
"SELECT"]);
40 if (is_array($arGroupBy) &&
count($arGroupBy)==0)
43 "SELECT ".$arSqls[
"SELECT"].
" ".
44 "FROM b_sale_order_props_group PG ".
45 " ".$arSqls[
"FROM"].
" ";
46 if ($arSqls[
"WHERE"] <>
'')
47 $strSql .=
"WHERE ".$arSqls[
"WHERE"].
" ";
48 if ($arSqls[
"GROUPBY"] <>
'')
49 $strSql .=
"GROUP BY ".$arSqls[
"GROUPBY"].
" ";
61 "SELECT ".$arSqls[
"SELECT"].
" ".
62 "FROM b_sale_order_props_group PG ".
63 " ".$arSqls[
"FROM"].
" ";
64 if ($arSqls[
"WHERE"] <>
'')
65 $strSql .=
"WHERE ".$arSqls[
"WHERE"].
" ";
66 if ($arSqls[
"GROUPBY"] <>
'')
67 $strSql .=
"GROUP BY ".$arSqls[
"GROUPBY"].
" ";
68 if ($arSqls[
"ORDERBY"] <>
'')
69 $strSql .=
"ORDER BY ".$arSqls[
"ORDERBY"].
" ";
71 if (is_array($arNavStartParams) && intval($arNavStartParams[
"nTopCount"])<=0)
74 "SELECT COUNT('x') as CNT ".
75 "FROM b_sale_order_props_group PG ".
76 " ".$arSqls[
"FROM"].
" ";
77 if ($arSqls[
"WHERE"] <>
'')
78 $strSql_tmp .=
"WHERE ".$arSqls[
"WHERE"].
" ";
79 if ($arSqls[
"GROUPBY"] <>
'')
80 $strSql_tmp .=
"GROUP BY ".$arSqls[
"GROUPBY"].
" ";
86 if ($arSqls[
"GROUPBY"] ==
'')
94 $cnt =
$dbRes->SelectedRowsCount();
101 $dbRes->NavQuery($strSql, $cnt, $arNavStartParams);
105 if (is_array($arNavStartParams) && intval($arNavStartParams[
"nTopCount"])>0)
106 $strSql .=
"LIMIT ".intval($arNavStartParams[
"nTopCount"]);
123 $arInsert =
$DB->PrepareInsert(
"b_sale_order_props_group",
$arFields);
126 "INSERT INTO b_sale_order_props_group(".$arInsert[0].
") ".
127 "VALUES(".$arInsert[1].
")";
130 $ID = intval(
$DB->LastID());
static PrepareSql(&$arFields, $arOrder, &$arFilter, $arGroupBy, $arSelectFields, $obUserFieldsSql=false, $callback=false, $arOptions=array())
static CheckFields($ACTION, &$arFields, $ID=0)
static GetList($arOrder=array(), $arFilter=array(), $arGroupBy=false, $arNavStartParams=false, $arSelectFields=array())
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
$_SERVER["DOCUMENT_ROOT"]
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"