本文整理汇总了PHP中CSaleOrderTax::DeleteEx方法的典型用法代码示例。如果您正苦于以下问题:PHP CSaleOrderTax::DeleteEx方法的具体用法?PHP CSaleOrderTax::DeleteEx怎么用?PHP CSaleOrderTax::DeleteEx使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSaleOrderTax
的用法示例。
在下文中一共展示了CSaleOrderTax::DeleteEx方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _Delete
function _Delete($ID)
{
global $DB;
$ID = IntVal($ID);
$bSuccess = True;
foreach (GetModuleEvents("sale", "OnBeforeOrderDelete", true) as $arEvent) {
if (ExecuteModuleEventEx($arEvent, array($ID)) === false) {
return false;
}
}
$DB->StartTransaction();
if ($bSuccess) {
$dbBasket = CSaleBasket::GetList(array(), array("ORDER_ID" => $ID));
while ($arBasket = $dbBasket->Fetch()) {
$bSuccess = CSaleBasket::Delete($arBasket["ID"]);
if (!$bSuccess) {
break;
}
}
}
if ($bSuccess) {
$dbRecurring = CSaleRecurring::GetList(array(), array("ORDER_ID" => $ID));
while ($arRecurring = $dbRecurring->Fetch()) {
$bSuccess = CSaleRecurring::Delete($arRecurring["ID"]);
if (!$bSuccess) {
break;
}
}
}
if ($bSuccess) {
$bSuccess = CSaleOrderPropsValue::DeleteByOrder($ID);
}
if ($bSuccess) {
$bSuccess = CSaleOrderTax::DeleteEx($ID);
}
if ($bSuccess) {
$bSuccess = CSaleUserTransact::DeleteByOrder($ID);
}
if ($bSuccess) {
unset($GLOBALS["SALE_ORDER"]["SALE_ORDER_CACHE_" . $ID]);
}
if ($bSuccess) {
$bSuccess = $DB->Query("DELETE FROM b_sale_order WHERE ID = " . $ID . "", true);
}
if ($bSuccess) {
$DB->Commit();
} else {
$DB->Rollback();
}
foreach (GetModuleEvents("sale", "OnOrderDelete", true) as $arEvent) {
ExecuteModuleEventEx($arEvent, array($ID, $bSuccess));
}
return $bSuccess;
}
示例2: _Delete
function _Delete($ID)
{
global $DB, $USER_FIELD_MANAGER;
$ID = IntVal($ID);
$bSuccess = True;
foreach(GetModuleEvents("sale", "OnBeforeOrderDelete", true) as $arEvent)
if (ExecuteModuleEventEx($arEvent, Array($ID))===false)
return false;
$DB->StartTransaction();
if ($bSuccess)
{
$dbBasket = CSaleBasket::GetList(array(), array("ORDER_ID" => $ID));
while ($arBasket = $dbBasket->Fetch())
{
if (CSaleBasketHelper::isSetItem($arBasket)) // set items are deleted when parent is deleted
continue;
$bSuccess = CSaleBasket::Delete($arBasket["ID"]);
if (!$bSuccess)
break;
}
}
if ($bSuccess)
{
$dbRecurring = CSaleRecurring::GetList(array(), array("ORDER_ID" => $ID));
while ($arRecurring = $dbRecurring->Fetch())
{
$bSuccess = CSaleRecurring::Delete($arRecurring["ID"]);
if (!$bSuccess)
break;
}
}
if ($bSuccess)
$bSuccess = CSaleOrderPropsValue::DeleteByOrder($ID);
if ($bSuccess)
$bSuccess = CSaleOrderTax::DeleteEx($ID);
if($bSuccess)
$bSuccess = CSaleUserTransact::DeleteByOrder($ID);
if ($bSuccess)
unset($GLOBALS["SALE_ORDER"]["SALE_ORDER_CACHE_".$ID]);
if ($bSuccess)
$bSuccess = $DB->Query("DELETE FROM b_sale_order WHERE ID = ".$ID."", true);
if ($bSuccess)
$USER_FIELD_MANAGER->Delete("ORDER", $ID);
if ($bSuccess)
$DB->Commit();
else
$DB->Rollback();
foreach(GetModuleEvents("sale", "OnOrderDelete", true) as $arEvent)
ExecuteModuleEventEx($arEvent, Array($ID, $bSuccess));
return $bSuccess;
}