function helper_not_edited_wh_transfer_products_grid_build(Nosql_grid $grid) { $grid->add_column(array('index' => 'number', 'type' => 'text', 'tdwidth' => '3%'), ' '); $grid->add_column(array('index' => 'sku', 'searchtable' => 'A', 'type' => 'text', 'tdwidth' => '11%'), 'Артикул'); $grid->add_column(array('index' => 'name', 'type' => 'text'), 'Название'); $grid->add_column(array('index' => 'qty', 'type' => 'text', 'tdwidth' => '5%', 'option_string' => 'class="pr_qty"'), 'К-во'); $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('catalogue', 'products', 'view', 'id', '$1')), 'href_values' => array('PR_ID'), 'options' => array('class' => 'icon_view show_product_link', 'title' => 'Просмотр продукта')))), 'Действие'); }
function helper_catalogue_mass_edit_price_categorie_products_grid_build(Nosql_grid $grid, $cat_id) { $grid->set_checkbox_actions('ID', 'products_checkbox[]', array('options' => NULL, 'name' => NULL)); $grid->add_column(array('index' => 'sku', 'type' => 'text', 'tdwidth' => '9%', 'filter' => true), 'Артикул'); $grid->add_column(array('index' => 'name', 'type' => 'text', 'filter' => true), 'Название'); $grid->add_column(array('index' => 'price', 'type' => 'text', 'tdwidth' => '8%'), 'Цена'); $grid->add_column(array('index' => 'special_price', 'type' => 'text', 'tdwidth' => '9%'), 'Спец. цена'); $grid->add_column(array('index' => 'special_price_from', 'type' => 'date', 'tdwidth' => '9%'), 'С.Ц. от'); $grid->add_column(array('index' => 'special_price_to', 'type' => 'date', 'tdwidth' => '9%'), 'С.Ц. до'); $grid->add_column(array('index' => 'status', 'type' => 'select', 'options' => array('' => '', '0' => 'Нет', '1' => 'Да'), 'tdwidth' => '9%', 'filter' => TRUE), 'В поиске'); $grid->add_column(array('index' => 'in_stock', 'type' => 'select', 'options' => array('' => '', '0' => 'Нет', '1' => 'Да'), 'tdwidth' => '9%', 'filter' => TRUE), 'В наличии'); $grid->add_column(array('index' => 'sale', 'type' => 'select', 'options' => array('' => '', '0' => 'Нет', '1' => 'Да'), 'tdwidth' => '7%', 'filter' => TRUE), 'Акция'); $grid->add_column(array('index' => 'action', 'type' => 'action', 'tdwidth' => '8%', '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 products_view', 'title' => 'Просмотр продукта')))), 'Действие'); }
function helper_wh_sale_products_grid_build($wh_id, $sale_id, Nosql_grid $grid) { $c_label = 'Удалить продукты'; if ($sale_id > 0) { $c_label = 'Отменить изменения'; } $grid->add_button($c_label, set_url('warehouse/warehouses_sales/ajax_unset_sale_products_temp_data/wh_id/' . $wh_id . '/sale_id/' . $sale_id), array('rel' => 'add', 'class' => 'addButton', 'id' => 'unset_products_temp_data')); $grid->add_button('Добавить Продукт', set_url('warehouse/warehouses_sales/ajax_get_wh_shop_products_grid/wh_id/' . $wh_id . '/sale_id/' . $sale_id), array('rel' => 'add', 'class' => 'addButton', 'id' => 'add_product_to_sale')); $grid->add_column(array('index' => 'number', 'type' => 'text', 'tdwidth' => '3%'), ' '); $grid->add_column(array('index' => 'sku', 'searchtable' => 'A', 'type' => 'text', 'tdwidth' => '11%'), 'Артикул'); $grid->add_column(array('index' => 'name', 'type' => 'text', 'tdwidth' => '22%'), 'Название'); $grid->add_column(array('index' => 'price', 'type' => 'text'), 'Цена'); $grid->add_column(array('index' => 'qty_str', 'type' => 'text', 'tdwidth' => '5%', 'option_string' => 'class="pr_qty"'), 'К-во'); $grid->add_column(array('index' => 'wh_qty_str', 'type' => 'text', 'tdwidth' => '7%'), 'Остаток'); $grid->add_column(array('index' => 'total', 'type' => 'text'), 'Сумма'); $grid->add_column(array('index' => 'attributes', '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('catalogue', 'products', 'view', 'id', '$1')), 'href_values' => array('PR_ID'), 'options' => array('class' => 'icon_view show_product_link', 'title' => 'Просмотр продукта')), array('type' => 'link', 'html' => '', 'href' => set_url(array('warehouse/warehouses_sales', 'ajax_get_view_edit_product_qty', 'wh_id', $wh_id, 'sale_id', $sale_id, 'sale_pr_id', '$1')), 'href_values' => array('SALES_PR_ID'), 'options' => array('class' => 'icon_edit edit_product_qty', 'title' => 'Редактировать количество')), array('type' => 'link', 'html' => '', 'href' => set_url(array('warehouse/warehouses_sales', 'ajax_detele_product_from_cart', 'wh_id', $wh_id, 'sale_id', $sale_id, 'sale_pr_id', '$1')), 'href_values' => array('SALES_PR_ID'), 'options' => array('class' => 'icon_delete delete_product_qty', 'title' => 'Удалить')))), 'Действие'); }