- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
if ($ID>0)
{
if (!CSaleOrderProps::Update($ID, $arFields))
$strError .= GetMessage("ERROR_EDIT_PROP")."<br>";
if (strlen($strError)<=0)
{
$db_order_props_tmp = CSaleOrderPropsValue::GetList(($b="NAME"), ($o="ASC"), Array("ORDER_PROPS_ID"=>$ID));
while ($ar_order_props_tmp = $db_order_props_tmp->Fetch())
{
CSaleOrderPropsValue::Update($ar_order_props_tmp["ID"], array("CODE"=>(strlen($CODE)<=0 ? False : $CODE)));
}
}
}
else
{
$ID = CSaleOrderProps::Add($arFields);
if ($ID<=0) // <=> if (true)
$strError .= GetMessage("ERROR_ADD_PROP")."<br>";
}