foreach($orderPositions as $positionKey => $position)
{
//Order properties adding
$props[] = array(
"NAME" => "Склад",
"CODE" => "WAREHOUSE",
"VALUE" => $position["WAREHOUSE_ID"],
"SORT" => "100"
);
$props[] = array(
"NAME" => "Статус",
"CODE" => "STATUS",
"VALUE" => $position["STATUS_ID"],
"SORT" => "200"
);
$props[] = array(
"NAME" => "Отгружено",
"CODE" => "SHIPPED",
"VALUE" => $position["SHIPPED"],
"SORT" => "300"
);
$props[] = array(
"NAME" => "Дата отгрузки",
"CODE" => "DATE_SHIPPED",
"VALUE" => $position["DATE_SHIPPED"],
"SORT" => "400"
);
$props[] = array(
"NAME" => "ID брака",
"CODE" => "BRAQUE_ID",
"VALUE" => $position["BRAQUE_ID"],
"SORT" => "500"
);
$props[] = array(
"NAME" => "XML_ID",
"CODE" => "PRODUCT.XML_ID",
"VALUE" => $position["PRODUCT_XML_ID"],
"SORT" => "9999"
);
$aF = array(
"PRODUCT_ID" => $nomenclature[$position["PRODUCT_XML_ID"]]["ID"],
"PRICE" => $position["PRICE"],
"CURRENCY" => shiftPriceCode($position["CURRENCY"]),
"QUANTITY" => $position["QUANTITY"],
"LID" => "s1",
"NAME" => $nomenclature[$position["PRODUCT_XML_ID"]]["NAME"],
"DETAIL_PAGE_URL" => $nomenclature[$position["PRODUCT_XML_ID"]]["DETAIL_PAGE_URL"],
"PROPS" => $props,
"MODULE" => "sale",
"FUSER_ID" => $fuser_id,
);
var_dump($aF);
var_dump($tempOrder->Add($a |