| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 41 | public static function groupAction($dataManager, $ids, $actionParams) |
||
| 42 | { |
||
| 43 | if (\App::$cur->Exchange1c) { |
||
| 44 | throw new \Exception('Недоступно при подключенной 1с'); |
||
| 45 | } |
||
| 46 | $carts = Cart::getList(['where' => [['id', $ids, 'IN'], ['cart_status_id', 5, '!=']]]); |
||
| 47 | foreach ($carts as $cart) { |
||
| 48 | $cart->cart_status_id = 5; |
||
| 49 | $cart->save(); |
||
| 50 | } |
||
| 51 | $count = count($carts); |
||
| 52 | return 'Завершено <b>' . $count . '</b> ' . \Tools::getNumEnding($count, ['корзина', 'корзины', 'корзин']); |
||
| 53 | } |
||
| 54 | |||
| 56 |