function helper_wh_products_grid_build(Grid $grid, $wh_id)
{
    $grid->add_button('Печать продуктов склада', set_url('*/warehouses_products/ajax_print_wh_pr/wh_id/' . $wh_id), array('rel' => 'add', 'id' => 'print_wh_pr'));
    $grid->add_button('Добавить существующий продукт', set_url('*/warehouses_products/ajax_get_not_exists_pr/wh_id/' . $wh_id), array('rel' => 'add', 'id' => 'add_exist_pr'));
    $grid->add_column(array('index' => 'sku', 'searchtable' => 'A', 'type' => 'text', 'tdwidth' => '15%', 'filter' => true, 'sortable' => true), 'Артикул');
    $grid->add_column(array('index' => 'name', 'searchtable' => 'B', 'type' => 'text', 'filter' => true, 'sortable' => true), 'Название');
    $grid->add_column(array('index' => 'qty', 'searchtable' => 'C', 'type' => 'number', 'tdwidth' => '10%', 'filter' => true, 'sortable' => true), 'К-во');
    $grid->add_column(array('index' => 'status', 'searchtable' => 'A', 'type' => 'select', 'options' => array('' => '', '0' => 'Нет', '1' => 'Да'), 'tdwidth' => '9%', 'filter' => true), 'В поиске');
    $grid->add_column(array('index' => 'action', 'type' => 'action', 'tdwidth' => '14%', 'option_string' => 'align="center"', 'sortable' => false, 'filter' => false, 'actions' => array(array('type' => 'link', 'html' => '', 'href' => set_url(array('catalogue', 'products', 'view', 'id', '$1')), 'href_values' => array('ID'), 'options' => array('class' => 'icon_view show_product_link', 'title' => 'Просмотр продукта')), array('type' => 'link', 'html' => '', 'href' => set_url(array('warehouse', 'warehouses_products', 'add_pr_qty', 'wh_id', $wh_id, 'pr_id', '$1')), 'href_values' => array('ID'), 'options' => array('class' => 'icon_plus', 'title' => 'Добавить количество')), array('type' => 'link', 'html' => '', 'href' => set_url(array('warehouse', 'warehouses_products', 'reject_pr_qty', 'wh_id', $wh_id, 'pr_id', '$1')), 'href_values' => array('ID'), 'options' => array('class' => 'icon_minus', 'title' => 'Списать товар')), array('type' => 'link', 'html' => '', 'href' => set_url(array('warehouse', 'warehouses_products', 'delete_pr', 'wh_id', $wh_id, 'pr_id', '$1')), 'href_values' => array('ID'), 'options' => array('class' => 'icon_delete delete_question', 'title' => 'Удалить товар')))), 'Действие');
}
Esempio n. 2
0
function helper_shippings_grid_build(Grid $grid)
{
    $grid->add_button('Инвойсы', set_url('*/invoices'));
    $grid->add_button('Заказы', set_url('*/orders'));
    $grid->add_column(array('index' => 'shippings_number', 'searchtable' => 'A', 'type' => 'text', 'tdwidth' => '15%', 'sortable' => true, 'filter' => true), 'Номер отправки');
    $grid->add_column(array('index' => 'orders_number', 'searchtable' => 'B', 'type' => 'text', 'tdwidth' => '13%', 'sortable' => true, 'filter' => true), 'Номер заказа');
    $grid->add_column(array('index' => 'invoices_number', 'searchtable' => 'C', 'type' => 'text', 'tdwidth' => '14%', 'sortable' => true, 'filter' => true), 'Номер инвойса');
    $grid->add_column(array('index' => 'total', 'type' => 'text'), 'Сумма');
    $grid->add_column(array('index' => 'create_date', 'type' => 'date', 'tdwidth' => '11%', 'sortable' => true, 'filter' => true), 'Создан');
    $grid->add_column(array('index' => 'update_date', 'type' => 'date', 'tdwidth' => '11%', 'sortable' => true, 'filter' => true), 'Обновлен');
    $grid->add_column(array('index' => 'shippings_status', 'type' => 'select', 'options' => array('' => '') + Mshippings::get_shipping_state_collection(), 'tdwidth' => '12%', 'filter' => true), 'Состояние');
    $grid->add_column(array('index' => 'action', 'type' => 'action', 'tdwidth' => '10%', 'option_string' => 'align="center"', 'sortable' => false, 'filter' => false, 'actions' => array(array('type' => 'link', 'html' => '', 'href' => set_url('*/*/view_shipping/shp_id/$1'), 'href_values' => array('ID'), 'options' => array('class' => 'icon_view', 'title' => 'Просмотр')))), 'Actions');
}
Esempio n. 3
0
function helper_reviews_grid_build(Grid $grid)
{
    $grid->add_button('Настройки модуля', set_url('*/*/*/settings'), array('class' => 'addButton'));
    $grid->add_button('Добавить отзыв', set_url('*/*/*/add'), array('class' => 'addButton'));
    $grid->set_checkbox_actions('ID', 'reviews_grid_checkbox', array('options' => array('on' => 'Активность: Да', 'off' => 'Активность: Нет', 'delete' => 'Удалить'), 'name' => 'reviews_grid_select'));
    $grid->add_column(array('index' => 'review', 'type' => 'text', 'filter' => true), 'Отзыв');
    $grid->add_column(array('index' => 'name', 'type' => 'text', 'tdwidth' => '14%', 'filter' => true), 'Имя');
    $grid->add_column(array('index' => 'email', 'type' => 'text', 'tdwidth' => '14%', 'filter' => true), 'E-mail');
    $grid->add_column(array('index' => 'create_date', 'type' => 'date', 'tdwidth' => '10%', 'filter' => true), 'Создан');
    $grid->add_column(array('index' => 'active', 'type' => 'select', 'tdwidth' => '7%', 'filter' => true, 'options' => array('' => '', '0' => 'Нет', '1' => 'Да')), 'Активность');
    $grid->add_column(array('index' => 'is_answer', 'tdwidth' => '6%', 'type' => 'select', 'options' => array('' => '', '0' => 'Нет', '1' => 'Да'), 'filter' => true), 'Ответ');
    $grid->add_column(array('index' => 'new_comment', 'tdwidth' => '8%', 'type' => 'select', 'options' => array('' => '', '0' => 'Нет', '1' => 'Да'), 'filter' => true), 'Новый');
    $grid->add_column(array('index' => 'action', 'type' => 'action', 'tdwidth' => '9%', 'option_string' => 'align="center"', 'actions' => array(array('type' => 'link', 'html' => '', 'href' => set_url('*/*/*/edit/id/$1'), 'href_values' => array('ID'), 'options' => array('class' => 'icon_edit', 'title' => 'Редактировать')), array('type' => 'link', 'html' => '', 'href' => set_url('*/*/*/delete/id/$1'), 'href_values' => array('ID'), 'options' => array('class' => 'icon_detele delete_question', 'title' => 'Удалить'))), 'Действия'));
}
function helper_sales_logs_grid_build(Grid $grid, $wh_array)
{
    $grid->add_button('Все логи', set_url('*/warehouses_logs'));
    $grid->add_button('Переносы', set_url('*/warehouses_transfers'));
    $grid->add_button('Количество добавлено', set_url('*/warehouses_logs/edit_pr_logs'));
    $grid->add_button('Списан', set_url('*/warehouses_logs/reject_pr_logs'));
    $grid->add_column(array('index' => 'sales_number', 'tdwidth' => '10%', 'type' => 'text', 'filter' => true), 'Номер продажи');
    $grid->add_column(array('index' => 'total_qty', 'tdwidth' => '6%', 'type' => 'text'), 'С-ое к-во');
    $grid->add_column(array('index' => 'total', 'tdwidth' => '8%', 'type' => 'text'), 'Сумма');
    $grid->add_column(array('index' => 'create_date', 'type' => 'date', 'tdwidth' => '13%', 'sortable' => true, 'filter' => true), 'Дата создания');
    $grid->add_column(array('index' => mwarehouses_logs::ID_WH, 'type' => 'select', 'options' => array('' => '') + $wh_array, 'tdwidth' => '11%', 'filter' => true), 'Склад');
    $grid->add_column(array('index' => 'comment', 'type' => 'text'), 'Комментарий');
    $grid->add_column(array('index' => 'action', 'type' => 'action', 'tdwidth' => '10%', 'option_string' => 'align="center"', 'sortable' => false, 'filter' => false, 'actions' => array(array('type' => 'link', 'html' => '', 'href' => set_url(array('*', 'warehouses_logs', 'ajax_view_log', 'wh_id', '$1', 'log_id', '$2')), 'href_values' => array(mwarehouses_logs::ID_WH, 'ID'), 'options' => array('class' => 'icon_view view_wh_sale', 'title' => 'Просмотр')))), 'Действие');
}
Esempio n. 5
0
function helper_credit_memo_grid_build(Grid $grid)
{
    $grid->add_button('Отправки', set_url('*/shippings'));
    $grid->add_button('Инвойсы', set_url('*/invoices'));
    $grid->add_button('Заказы', set_url('*/orders'));
    $grid->add_column(array('index' => 'credit_memo_number', 'searchtable' => 'A', 'type' => 'text', 'tdwidth' => '14%', 'sortable' => true, 'filter' => true), 'Номер возврата');
    $grid->add_column(array('index' => 'orders_number', 'searchtable' => 'B', 'type' => 'text', 'tdwidth' => '10%', 'filter' => true), 'Номер заказа');
    $grid->add_column(array('index' => 'invoices_number', 'searchtable' => 'C', 'type' => 'text', 'tdwidth' => '10%', 'filter' => true), 'Номер инвойса');
    $grid->add_column(array('index' => 'shippings_number', 'searchtable' => 'D', 'type' => 'text', 'tdwidth' => '10%', 'filter' => true), 'Номер отправки');
    $grid->add_column(array('index' => 'total', 'type' => 'text'), 'Сумма');
    $grid->add_column(array('index' => 'admin_note', 'type' => 'text'), 'Комментарий');
    $grid->add_column(array('index' => 'create_date', 'type' => 'date', 'tdwidth' => '11%', 'sortable' => true, 'filter' => true), 'Создан');
    $grid->add_column(array('index' => 'action', 'type' => 'action', 'tdwidth' => '10%', 'option_string' => 'align="center"', 'sortable' => false, 'filter' => false, 'actions' => array(array('type' => 'link', 'html' => '', 'href' => set_url('*/*/view_credit_memo/cm_id/$1'), 'href_values' => array('ID'), 'options' => array('class' => 'icon_view', 'title' => 'Просмотр')))), 'Actions');
}
function helper_products_types_set_grid_build(Grid $grid, $categories)
{
    $grid->add_button('Добавить набор фильтров', set_url('*/*/select_category'), array('class' => 'addButton'));
    $grid->add_column(array('index' => 'show_id', 'type' => 'text', 'tdwidth' => '5%', 'filter' => true), 'ID');
    $grid->add_column(array('index' => 'set_name', 'type' => 'text', 'tdwidth' => '20%', 'filter' => true), 'Название');
    $grid->add_column(array('index' => 'set_description', 'type' => 'text'), 'Описание набора');
    $grid->add_column(array('index' => 'url', 'type' => 'text', 'tdwidth' => '20%'), 'URL набора');
    $grid->add_column(array('index' => 'cat_name', 'searchtable' => 'A', 'searchname' => Mproducts_types_set::ID_CAT, 'type' => 'select', 'options' => array('' => '') + $categories, 'tdwidth' => '20%', 'filter' => true), 'Категория');
    $grid->add_column(array('index' => 'action', 'type' => 'action', 'tdwidth' => '12%', 'option_string' => 'align="center"', 'actions' => array(array('type' => 'link', 'html' => '', 'href' => set_url('*/*/edit/cat_id/$2/id/$1'), 'href_values' => array('ID', 'CAT_ID'), 'options' => array('class' => 'icon_edit', 'title' => 'Редактировать')), array('type' => 'link', 'html' => '', 'href' => set_url('*/*/delete/id/$1'), 'href_values' => array('ID'), 'options' => array('class' => 'icon_detele  delete_question', 'title' => 'Удалить')))), 'Действия');
}
function helper_orders_grid_build(Grid $grid)
{
    $grid->add_button('Добавить заказ', set_url('*/*/add'), array('rel' => 'add', 'class' => 'addButton'));
    $grid->add_column(array('index' => 'orders_number', 'searchname' => 'orders_number', 'searchtable' => 'A', 'type' => 'number', 'tdwidth' => '13%', 'sortable' => true, 'filter' => true), 'Номер заказа');
    $grid->add_column(array('index' => 'name', 'type' => 'text', 'tdwidth' => '20%', 'filter' => true), 'Имя покупателя');
    $grid->add_column(array('index' => 'total', 'type' => 'text'), 'Сумма');
    $grid->add_column(array('index' => 'create_date', 'type' => 'date', 'tdwidth' => '11%', 'sortable' => true, 'filter' => true), 'Создан');
    $grid->add_column(array('index' => 'update_date', 'type' => 'date', 'tdwidth' => '11%', 'sortable' => true, 'filter' => true), 'Обновлен');
    $grid->add_column(array('index' => 'orders_state', 'type' => 'select', 'options' => array('' => '') + Morders::get_order_state_collection(), 'tdwidth' => '14%', 'filter' => true), 'Состояние');
    $grid->add_column(array('index' => 'action', 'type' => 'action', 'tdwidth' => '10%', 'option_string' => 'align="center"', 'sortable' => false, 'filter' => false, 'actions' => array(array('type' => 'link', 'html' => '', 'href' => set_url(array('*', '*', 'view', 'ord_id', '$1')), 'href_values' => array('ID'), 'options' => array('class' => 'icon_view', 'title' => 'Просмотр')))), 'Actions');
}
function helper_wh_sales_grid_build(Grid $grid)
{
    $CI =& get_instance();
    $CI->load->model('warehouse/mwarehouses');
    $wh_array = $CI->mwarehouses->get_wh_to_select();
    $grid->add_button('Возвраты', set_url('*/warehouses_credit_memo'), array('rel' => 'add', 'class' => 'addButton'));
    $grid->add_button('Отправки', set_url('*/warehouses_shippings'), array('rel' => 'add', 'class' => 'addButton'));
    $grid->add_button('Инвойсы', set_url('*/warehouses_invoices'), array('rel' => 'add', 'class' => 'addButton'));
    $grid->add_button('Создать продажу', set_url('*/warehouses_sales/prepare_add_sale'), array('rel' => 'add', 'class' => 'addButton'));
    $grid->add_column(array('index' => 'wh_sale_number', 'type' => 'text', 'filter' => true, 'tdwidth' => '7%'), 'Продажа');
    $grid->add_column(array('index' => 'orders_number', 'type' => 'text', 'searchtable' => 'ORD', 'tdwidth' => '7%', 'filter' => true), 'Заказ');
    $grid->add_column(array('index' => 'name', 'searchtable' => 'ADDR', 'type' => 'text', 'tdwidth' => '12%', 'filter' => true), 'Покупатель');
    $grid->add_column(array('index' => 'total_qty', 'type' => 'text', 'tdwidth' => '4%'), 'К-во');
    $grid->add_column(array('index' => 'total', 'type' => 'text', 'tdwidth' => '8%'), 'Сумма');
    $grid->add_column(array('index' => 'comment', 'type' => 'text'), 'Комментарий');
    $grid->add_column(array('index' => 'wh_alias', 'type' => 'select', 'searchtable' => 'C', 'searchname' => 'id_wh', 'options' => array('' => '') + $wh_array, 'filter' => true, 'tdwidth' => '10%'), 'Склад');
    $grid->add_column(array('index' => 'wh_sale_state', 'type' => 'text', 'tdwidth' => '10%'), 'Статус продажи');
    $grid->add_column(array('index' => 'create_date', 'searchtable' => 'A', 'type' => 'date', 'tdwidth' => '12%', 'filter' => true), 'Дата создания');
    $grid->add_column(array('index' => 'action', 'type' => 'action', 'tdwidth' => '9%', 'option_string' => 'align="center"', 'actions' => array(array('type' => 'link', 'html' => '', 'href' => set_url(array('*', 'warehouses_sales', 'view_sale', 'wh_id', '$2', 'sale_id', '$1')), 'href_values' => array('ID', 'WH_ID'), 'options' => array('class' => 'icon_view', 'title' => 'Просмотр')))), 'Действия');
}
function helper_type_properties_grid_build(Grid $grid, $type_id)
{
    $grid->add_button('Группы фильтров', set_url('*/*'));
    $grid->add_button('Добавить свойство фильтра', set_url('*/*/add_property/type_id/' . $type_id), array('class' => 'addButton'));
    $grid->set_checkbox_actions('ID', 'products_properties_grid_checkbox', array('options' => array('on' => 'Активность: Да', 'off' => 'Активность: Нет', 'delete' => 'Удалить выбраные'), 'name' => 'products_properties_grid_select'));
    $grid->add_column(array('index' => 'sort', 'tdwidth' => '6%', 'option_string' => 'align="center"'), 'Позиция');
    $grid->add_column(array('index' => 'show_id', 'type' => 'text', 'tdwidth' => '6%', 'filter' => TRUE), 'ID');
    $grid->add_column(array('index' => 'alias', 'type' => 'text', 'tdwidth' => '15%', 'filter' => TRUE), 'Идентификатор');
    $grid->add_column(array('index' => 'name', 'type' => 'text', 'filter' => TRUE), 'Название свойста');
    /*$grid->add_column(
    		array(
    			'index' 		=> 'id_m_c_products_types',
    			'type' 			=> 'select',
    			'tdwidth' 		=> '25%',
    			'filter' 		=> TRUE,
    			'sortable' 		=> TRUE,
    			'options' 		=> array('' => '')+$data['types']
    		), 'Группа свойства продукции');*/
    $grid->add_column(array('index' => 'active', 'type' => 'select', 'tdwidth' => '8%', 'filter' => TRUE, 'options' => array('' => '', '0' => 'Нет', '1' => 'Да')), 'Активность');
    $grid->add_column(array('index' => 'action', 'type' => 'action', 'tdwidth' => '10%', 'option_string' => 'align = "center"', 'actions' => array(array('type' => 'link', 'html' => '', 'href' => set_url('*/*/edit_property/type_id/' . $type_id . '/prop_id/$1'), 'href_values' => array('ID'), 'options' => array('class' => 'icon_edit', 'title' => 'Редактировать свойство')), array('type' => 'link', 'html' => '', 'href' => set_url('*/*/delete_property/type_id/' . $type_id . '/prop_id/$1'), 'href_values' => array('ID'), 'options' => array('class' => 'icon_detele delete_question', 'title' => 'Удалить свойство')))), 'Действия');
}
function helper_wh_transfers_grid_build(Grid $grid)
{
    $CI =& get_instance();
    $CI->load->model('warehouse/mwarehouses');
    $wh_array = $CI->mwarehouses->get_wh_to_select();
    $grid->add_button('Создать перенос', set_url('*/warehouses_transfers/prepare_add_transfer'), array('rel' => 'add', 'class' => 'addButton'));
    $grid->add_column(array('index' => 'wh_transfer_number', 'type' => 'text', 'filter' => true, 'tdwidth' => '7%'), 'Номер');
    $grid->add_column(array('index' => 'total_qty', 'type' => 'text', 'tdwidth' => '4%'), 'К-во');
    $grid->add_column(array('index' => 'admin_note', 'type' => 'text'), 'Комментарий');
    $grid->add_column(array('index' => 'wh_from_alias', 'type' => 'select', 'searchtable' => 'A', 'searchname' => 'id_wh_from', 'options' => array('' => '') + $wh_array, 'filter' => true, 'tdwidth' => '9%'), 'Со склада');
    $grid->add_column(array('index' => 'wh_to_alias', 'type' => 'select', 'searchtable' => 'A', 'searchname' => 'id_wh_to', 'options' => array('' => '') + $wh_array, 'filter' => true, 'tdwidth' => '9%'), 'На склад');
    $grid->add_column(array('index' => 'create_date', 'searchtable' => 'A', 'type' => 'date', 'tdwidth' => '12%', 'filter' => true), 'Дата создания');
    $grid->add_column(array('index' => 'action', 'type' => 'action', 'tdwidth' => '9%', 'option_string' => 'align="center"', 'actions' => array(array('type' => 'link', 'html' => '', 'href' => set_url(array('*', 'warehouses_transfers', 'view_transfer', 'tr_id', '$1')), 'href_values' => array('ID'), 'options' => array('class' => 'icon_view', 'title' => 'Просмотр')))), 'Действия');
}
Esempio n. 11
0
function helper_wh_shops_grid_build(Grid $grid, $data)
{
    $grid->add_button('Склады', set_url('*/*'));
    $grid->add_button('Добавить точку продажи', set_url('*/*/add_wh_shop'), array('rel' => 'add', 'class' => 'addButton'));
    $grid->add_column(array('index' => 'alias', 'searchtable' => 'A', 'type' => 'text', 'filter' => true), 'Артикул');
    $grid->add_column(array('index' => 'active', 'searchtable' => 'A', 'type' => 'select', 'options' => array('' => '', '0' => 'Нет', '1' => 'Да'), 'tdwidth' => '8%', 'filter' => true), 'Активность');
    $grid->add_column(array('index' => Mwarehouses::ID_WH, 'type' => 'select', 'options' => array('' => '') + $data['wh'], 'tdwidth' => '20%', 'filter' => true), 'Склады точки продаж');
    $grid->add_column(array('index' => 'action', 'type' => 'action', 'tdwidth' => '12%', 'option_string' => 'align="center"', 'sortable' => false, 'filter' => false, 'actions' => array(array('type' => 'link', 'html' => '', 'href' => set_url(array('*', '*', 'view', 'id', '$1')), 'href_values' => array('ID'), 'options' => array('class' => 'icon_arrow_r products_view', 'title' => 'Просмотр продукта')), array('type' => 'link', 'html' => '', 'href' => set_url(array('*', '*', 'edit_wh_shop', 'wh_shop_id', '$1')), 'href_values' => array('ID'), 'options' => array('class' => 'icon_edit', 'title' => 'Редактировать')), array('type' => 'link', 'html' => '', 'href' => set_url(array('*', '*', 'delete_wh_shop', 'wh_shop_id', '$1')), 'href_values' => array('ID'), 'options' => array('class' => 'icon_detele delete_question', 'title' => 'Удалить')))), 'Действия');
}