</table> </div> <div class="span8"> <h3>Заказы клиента</h3> <?php // Create table body $table_body = []; foreach ($orders as $o) { $table_body[] = [$o->id, HTML::anchor(Route::url('b_shop', ['controller' => 'orders', 'action' => 'edit', 'id' => $o->id]), '№' . $o->number, ['data-toggle' => 'tooltip', 'data-original-title' => 'Редактировать заказ']), Format::price($o->total), Date::format($o->created, Date::FULL), $o->status->get_title(), TB::act($request->routename, ['controller' => $request->controller, 'action' => 'edit', 'id' => $o->id]) . TB::act($request->routename, ['controller' => $request->controller, 'action' => 'delete', 'id' => $o->id])]; } // Create table echo TB_Table::open(); echo TB_Table::colgroup([50, 100, 0, 0, 0]); echo TB_Table::headers_sorter(['id' => ['string', __('#ID')], 'number' => ['string', __('Номер')], 'total' => ['string', __('Сумма')], 'created' => ['string', __('Дата заказа')], '_status' => ['none', __('Статус')], '_action' => ['none', __('settings.actions')]]); echo TB_Table::body($table_body); echo TB_Table::close(); ?> <span class="badge badge-info"> Заказов: <?php echo $total_items; ?> </span> <br> <span class="badge badge-info"> Cумма заказов: <?php echo Format::price($total_sum); ?> </span>
<?php defined('SYSPATH') or die('No direct script access.'); if ($pg->total_items > 0) { // Create table body $table_body = []; foreach ($obj as $o) { $table_body[] = [HTML::anchor(Route::url('b_shop', ['controller' => 'customers', 'action' => 'view', 'id' => $o->id]), $o->fio, ['data-toggle' => 'tooltip', 'data-original-title' => 'Редактировать профиль']), Format::mobile($o->phone), $o->email, HTML::anchor(Route::url('b_shop', ['controller' => 'customers', 'action' => 'view', 'id' => $o->id]), '<span class="badge badge-info"> ' . $o->orders->count_all() . ' ' . '<i class="icon icon-eye-open"></i>' . '</span>', ['data-toggle' => 'tooltip', 'data-original-title' => 'Профиль и заказы клиента']), Format::price(Model_Shop_Customer::total($o->id)), TB::act($request->routename, ['controller' => $request->controller, 'action' => 'edit', 'id' => $o->id]) . TB::act($request->routename, ['controller' => $request->controller, 'action' => 'delete', 'id' => $o->id])]; } // Create table echo TB_Table::open(); echo TB_Table::colgroup([0, 0, 0, 0, 0, 0]); echo TB_Table::headers_sorter(['fio' => ['string', __('Клиент')], 'phone' => ['string', __('Телефон')], 'email' => ['string', __('Email')], '_orders' => ['none', __('Заказы')], '_total' => ['none', __('На сумму')], '_action' => ['none', __('settings.actions')]]); echo TB_Table::body($table_body); echo TB_Table::close(); echo '<span class="badge badge-info">Всего клиентов: ' . $pg->total_items . '</span>'; echo $pg; } else { ?> <div class="alert alert-block alert-info"> <button type="button" class="close" data-dismiss="alert">×</button> Клиентов нет. </div> <?php }
<?php defined('SYSPATH') or die('No direct script access.'); if ($total_items > 0) { // Create table body $table_body = []; foreach ($obj as $o) { $table_body[] = [HTML::anchor(Route::url('b_shop', ['controller' => 'orders', 'action' => 'edit', 'id' => $o->id]), '№' . $o->number, ['data-toggle' => 'tooltip', 'data-original-title' => 'Редактировать заказ']), Format::price($o->total), Date::format($o->created, Date::FULL), $o->status->get_title(), HTML::anchor(Route::url('b_shop', ['controller' => 'customers', 'action' => 'view', 'id' => $o->customer->id]), $o->customer->fio, ['data-toggle' => 'tooltip', 'data-original-title' => 'Профиль и заказы клиента']), Format::mobile($o->customer->phone), TB::act($request->routename, ['controller' => $request->controller, 'action' => 'edit', 'id' => $o->id]) . TB::act($request->routename, ['controller' => $request->controller, 'action' => 'delete', 'id' => $o->id])]; } // Create table echo TB_Table::open(); echo TB_Table::colgroup([100, 0, 0, 0, 0, 0, 0]); echo TB_Table::headers_sorter(['number' => ['string', __('Номер')], 'total' => ['string', __('Сумма')], 'created' => ['string', __('Дата заказа')], '_status' => ['none', __('Статус')], '_fio' => ['none', __('Клиент')], '_phone' => ['none', __('Телефон')], '_action' => ['none', __('settings.actions')]]); echo TB_Table::body($table_body); echo TB_Table::close(); echo '<span class="badge badge-info">Всего заказов: ' . $total_items . '</span>'; if (isset($pg)) { echo $pg; } } else { ?> <div class="alert alert-block alert-info"> <button type="button" class="close" data-dismiss="alert">×</button> Заказов нет. </div> <?php }
<?php defined('SYSPATH') or die('No direct script access.'); if ($total_items > 0) { $table_body = []; foreach ($obj as $o) { $table_body[] = [HTML::anchor('http://novaposhta.ua/office/list?city=' . $o->DescriptionRu, $o->DescriptionRu, ['target' => '_blank', 'data-toggle' => 'tooltip', 'data-original-title' => 'Отделения в населенном пункте'])]; } echo '<div class="btns-top">'; // echo TB_Button::link(ADMIN . '/novaposhta/npupdate', ' Обновить базу для Новой Почты', ['class' => 'btn-small'])->with_icon('refresh'); echo TB::btns_top([Route::url($request->routename, ['controller' => $request->controller, 'action' => 'npupdate']) => __('shop.novaposhta_update')]); echo '</div>'; // Create table echo TB_Table::open(); echo TB_Table::headers_sorter(['title' => ['string', __('Населенный пункт')]]); echo TB_Table::body($table_body); echo TB_Table::close(); echo '<span class="badge badge-info">Всего населенных пунктов: ' . $total_items . '</span>'; if (isset($pg)) { echo $pg; } }