public function buildFieldsParams() { return array("ORDER_ID" => array("NAME" => GetMessage("SMOB_FILTER_ORDER_ID"), "TYPE" => "TEXT"), "USER_ID" => array("NAME" => GetMessage("SMOB_FILTER_USER_ID"), "TYPE" => "TEXT"), "DATE_FROM" => array("NAME" => GetMessage("SMOB_FILTER_DATE_ORDER_FROM"), "TYPE" => "DATE"), "DATE_TO" => array("NAME" => GetMessage("SMOB_FILTER_DATE_ORDER_TO"), "TYPE" => "DATE"), "LID" => array("NAME" => GetMessage("SMOB_FILTER_SITE"), "TYPE" => "ONE_SELECT", "ADD_ALL_SELECT" => "Y", "OPTIONS" => CSaleMobileOrderUtils::getSitesNames()), "CURRENCY" => array("NAME" => GetMessage("SMOB_FILTER_CURRENCY"), "TYPE" => "ONE_SELECT", "OPTIONS" => CSaleMobileOrderUtils::getCurrenciesNames()), "PRICE_FROM" => array("NAME" => GetMessage("SMOB_FILTER_PRICE_FROM"), "TYPE" => "TEXT"), "PRICE_TO" => array("NAME" => GetMessage("SMOB_FILTER_PRICE_TO"), "TYPE" => "TEXT"), "STATUS_ID" => array("NAME" => GetMessage("SMOB_FILTER_STATUS_ID"), "TYPE" => "MULTI_SELECT", "OPTIONS" => CSaleMobileOrderUtils::getStatusesNames()), "PAYED" => array("NAME" => GetMessage("SMOB_FILTER_PAYED"), "TYPE" => "ONE_SELECT", "ADD_ALL_SELECT" => "Y", "OPTIONS" => array("Y" => GetMessage("SMOB_FILTER_PAYED_Y"), "N" => GetMessage("SMOB_FILTER_PAYED_N"))), "ALLOW_DELIVERY" => array("NAME" => GetMessage("SMOB_FILTER_ALLOW_DELIVERY"), "TYPE" => "ONE_SELECT", "ADD_ALL_SELECT" => "Y", "OPTIONS" => array("Y" => GetMessage("SMOB_FILTER_ALLOW_DELIVERY_Y"), "N" => GetMessage("SMOB_FILTER_ALLOW_DELIVERY_N"))), "DEDUCTED" => array("NAME" => GetMessage("SMOB_FILTER_DEDUCTED"), "TYPE" => "ONE_SELECT", "ADD_ALL_SELECT" => "Y", "OPTIONS" => array("Y" => GetMessage("SMOB_FILTER_DEDUCTED_Y"), "N" => GetMessage("SMOB_FILTER_DEDUCTED_N"))), "MARKED" => array("NAME" => GetMessage("SMOB_FILTER_MARKED"), "TYPE" => "ONE_SELECT", "ADD_ALL_SELECT" => "Y", "OPTIONS" => array("Y" => GetMessage("SMOB_FILTER_MARKED_Y"), "N" => GetMessage("SMOB_FILTER_MARKED_N")))); }
$arDeliveries = CSaleMobileOrderUtils::getDeliveriesInfo($deliveryIds); } $arPersonTypes = array(); if (in_array("PERSON_TYPE", $arResult['VISIBLE_FIELDS'])) { $arPersonTypes = CSaleMobileOrderUtils::getPersonTypesNames($personTypesIds); } $arPaySysNames = array(); if (in_array("PAYED", $arResult['VISIBLE_FIELDS'])) { $arPaySysNames = CSaleMobileOrderUtils::getPaySystemsNames($paySysIds); } /* $arStatNames = array(); if(in_array("STATUS_NAME", $arResult['VISIBLE_FIELDS'])) $arStatNames = CSaleMobileOrderUtils::getStatusesNames($statIds); */ $arStatNames = CSaleMobileOrderUtils::getStatusesNames(); foreach ($arResult["ORDERS"] as $orderId => &$arOrder) { if (!is_null($arOrder["DELIVERY_ID"]) && isset($arDeliveries[$arOrder["DELIVERY_ID"]])) { $arOrder["ADD_DELIVERY_NAME"] = $arDeliveries[$arOrder["DELIVERY_ID"]]; } else { $arOrder["ADD_DELIVERY_NAME"] = GetMessage("SMOL_NONE"); } if (isset($arPersonTypes[$arOrder["PERSON_TYPE_ID"]])) { $arOrder["PERSON_TYPE"] = $arPersonTypes[$arOrder["PERSON_TYPE_ID"]]; } if (isset($arPaySysNames[$arOrder["PAY_SYSTEM_ID"]])) { $arOrder["ADD_PAY_SYSTEM_NAME"] = $arPaySysNames[$arOrder["PAY_SYSTEM_ID"]] . ' /'; } if (isset($arStatNames[$arOrder["STATUS_ID"]])) { $arOrder["STATUS_NAME"] = $arStatNames[$arOrder["STATUS_ID"]]; }