Created
January 20, 2019 15:21
-
-
Save anoriar/17cfb2e99a90b96a4454515ad8960638 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$db_sales = CSaleOrder::GetList(array("DATE_INSERT" => "ASC"), $arFilter, false, ["nTopCount" => 1], ["ID", "STATUS_ID"]); | |
if($sale = $db_sales->Fetch()) | |
{ | |
$lastOrderId = $sale["ID"]; | |
$arProps = array(); | |
$orderProps = CSaleOrderPropsValue::GetList( | |
[], | |
array( | |
"ORDER_ID" => $lastOrderId, | |
"CODE" => ["DELIVERY_SHOP_ID"] | |
), | |
false, | |
false, | |
array() | |
); | |
while ($arRes = $orderProps->GetNext()) | |
{ | |
$arProps[$arRes["CODE"]] = $arRes; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment