Commit eb6ad5b2 authored by Julien Fastré's avatar Julien Fastré
Browse files

add export for providers

parent 587849e0
......@@ -47,6 +47,8 @@ $providers = \Pasteque\providersService::getAll();
\i18n('Add a provider', PLUGIN_NAME), 'img/btn_add.png');?></li>
<li><?php \Pasteque\tpl_btn('btn', \Pasteque\get_module_url_action(PLUGIN_NAME, "providersManagement"),
\i18n('Import providers', PLUGIN_NAME), 'img/btn_add.png');?></li>
<li><?php \Pasteque\tpl_btn('btn bt_export ', \Pasteque\get_report_url(PLUGIN_NAME, "providers_export"),
\i18n('Export Providers', PLUGIN_NAME), 'img/btn_add.png');?></li>
</ul>
</div>
......
......@@ -25,6 +25,7 @@
"Providers": "Providers",
"Edit a provider": "Edit a provider",
"Export Providers":"Export Providers",
"Import providers": "Import providers",
"Import providers from csv file": "Import providers from csv file",
"Add a provider": "Add a provider",
......
......@@ -25,6 +25,7 @@
"Providers": "Fournisseurs",
"Edit a provider": "Éditer un fournisseur",
"Export Providers":"Exporter les fournisseurs",
"Import providers": "Importer des fournisseurs",
"Import providers from csv file": "Importer des fournisseurs depuis un fichier CSV",
"Add a provider": "Ajouter un fournisseur",
......
<?php
// Pastèque Web back office, Users module
//
// Copyright (C) 2015 Scil (http://scil.coop)
//
// This file is part of Pastèque.
//
// Pastèque is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Pastèque is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Pastèque. If not, see <http://www.gnu.org/licenses/>.
namespace BaseProducts;
$sql = "SELECT `NAME`, `DISPORDER` FROM `PROVIDERS` ";
$fields = array('NAME', 'DISPORDER');
$headers = array(\i18n("Provider.label"),
\i18n("Provider.dispOrder"));
$report = new \Pasteque\Report(PLUGIN_NAME, "providers_export",
\i18n("Export providers", PLUGIN_NAME),
$sql, $headers, $fields);
\Pasteque\register_report($report);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment