Created
June 6, 2018 19:40
-
-
Save kuntashov/69fd8265999b391d4c2f36379af382cb to your computer and use it in GitHub Desktop.
Удаление оффлайн-заказов, у которых ID_1C по ошибке не заполнилось на сайте
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
<?php | |
CModule::IncludeModule('sale'); | |
$res = $DB->Query("select ID from b_sale_order where EXTERNAL_ORDER = 'Y' and ID_1C is null order by id ASC LIMIT 1000"); | |
$count = 0; | |
while ($row = $res->Fetch()) { | |
CSaleOrder::Delete($row['ID']); | |
$count += 1; | |
} | |
echo "Deleted $count orders" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment