27 $query =
new Entity\Query(self::CONN_ENTITY_NAME);
30 'D_SPIKE' =>
'D_SPIKE',
31 'LLOCATION_ID' =>
'C.ID',
32 'LOCATION_CODE' =>
'C.CODE',
33 'LOCATION_GROUP_ID' =>
'LOCATION_GROUP_ID'
36 'LLOCATION_ID' =>
'LOCATION_ID',
39 $query->registerRuntimeField(
42 'data_type' =>
'integer',
43 'expression' =>
array(
50 $query->registerRuntimeField(
53 'data_type' => self::LOCATION_ENTITY_NAME,
55 '=this.LOCATION_ID' =>
'ref.ID',
57 'join_type' =>
'inner'
61 $query->registerRuntimeField(
64 'data_type' => self::LOCATION_ENTITY_NAME,
68 '>=ref.LEFT_MARGIN' =>
'this.L.LEFT_MARGIN',
69 '<=ref.RIGHT_MARGIN' =>
'this.L.RIGHT_MARGIN'
72 '=ref.ID' =>
'this.L.ID'
75 'join_type' =>
'inner'
89 $res->addReplacedAliases($fieldProxy);
102 $arSqlSearch = Array();
105 $filter_keys = Array();
109 $countFieldKey =
count($filter_keys);
110 for(
$i=0;
$i < $countFieldKey;
$i++)
113 if (
$val ==
'')
continue;
124 switch(mb_strtoupper(
$key))
127 $arSqlSearch[] =
"LOCATION_ID ".($bInvert?
"<>":
"=").
" ".intval(
$val).
" ";
129 case "LOCATION_GROUP_ID":
130 $arSqlSearch[] =
"LOCATION_GROUP_ID ".($bInvert?
"<>":
"=").
" ".intval(
$val).
" ";
136 $countSqlSearch =
count($arSqlSearch);
137 for(
$i=0;
$i < $countSqlSearch;
$i++)
139 $strSqlSearch .=
" AND ";
140 $strSqlSearch .=
" (".$arSqlSearch[
$i].
") ";
144 "SELECT LOCATION_ID, LOCATION_GROUP_ID ".
145 "FROM b_sale_location2location_group ".
147 " ".$strSqlSearch.
" ";
161 "SELECT ID, LOCATION_GROUP_ID, LID, NAME ".
162 "FROM b_sale_location_group_lang ".
163 "WHERE LOCATION_GROUP_ID = ".$ID.
" ".
164 " AND LID = '".$DB->ForSql($strLang, 2).
"'";
187 while ($arLang = $db_lang->Fetch())
191 for (
$i = 0;
$i < $coountarFieldLang;
$i++)
215 while ($arEvent = $db_events->Fetch())
220 while ($arEvent = $events->Fetch())
223 $strUpdate =
$DB->PrepareUpdate(
"b_sale_location_group",
$arFields);
224 $strSql =
"UPDATE b_sale_location_group SET ".$strUpdate.
" WHERE ID = ".
$ID.
"";
229 $DB->Query(
"DELETE FROM b_sale_location_group_lang WHERE LOCATION_GROUP_ID = ".
$ID.
"");
232 for (
$i = 0;
$i < $countFieldLang;
$i++)
234 $arInsert =
$DB->PrepareInsert(
"b_sale_location_group_lang",
$arFields[
"LANG"][
$i]);
236 "INSERT INTO b_sale_location_group_lang(LOCATION_GROUP_ID, ".$arInsert[0].
") ".
237 "VALUES(".$ID.
", ".$arInsert[1].
")";
248 $entityClass = self::CONN_ENTITY_NAME.
'Table';
249 $entityClass::resetMultipleForOwner(
$ID,
array(
259 $DB->Query(
"DELETE FROM b_sale_location2location_group WHERE LOCATION_GROUP_ID = ".
$ID.
"");
262 for (
$i = 0;
$i < $countArFieldLoc;
$i++)
265 "INSERT INTO b_sale_location2location_group(LOCATION_ID, LOCATION_GROUP_ID) ".
266 "VALUES(".$arFields[
"LOCATION_ID"][
$i].
", ".
$ID.
")";
281 while ($arEvent = $db_events->Fetch())
286 while ($arEvent = $events->Fetch())
289 $DB->Query(
"DELETE FROM b_sale_delivery2location WHERE LOCATION_ID = ".
$ID.
" AND LOCATION_TYPE = 'G'",
true);
291 $DB->Query(
"DELETE FROM b_sale_location2location_group WHERE LOCATION_GROUP_ID = ".
$ID.
"",
true);
292 $DB->Query(
"DELETE FROM b_sale_location_group_lang WHERE LOCATION_GROUP_ID = ".
$ID.
"",
true);
294 return $DB->Query(
"DELETE FROM b_sale_location_group WHERE ID = ".
$ID.
"",
true);
300 $DB->Query(
"DELETE FROM b_sale_location_group_lang WHERE LID = '".
$DB->ForSql($strLang).
"'",
true);
static GetList($by="sort", $order="asc", $arFilter=[])
static GetGroupLangByID($ID, $strLang=LANGUAGE_ID)
static OnLangDelete($strLang)
static GetLocationList($arFilter=Array())
const LOCATION_ENTITY_NAME
static CheckFields($ACTION, &$arFields)
static Update($ID, $arFields)
static processFilterForGetList($arFilter, $fieldMap=array(), $fieldProxy=array(), $query=null)
static isLocationProMigrated()
static processSelectForGetList($arSelectFields, $fieldMap)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
ExecuteModuleEventEx($arEvent, $arParams=[])
GetModuleEvents($MODULE_ID, $MESSAGE_ID, $bReturnArray=false)
if(empty($signedUserToken)) $key
</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."%"