-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://forge.glpi-project.org/svn/order/tags/1.9.0@820 349b9182-4a13-0410-896f-e5e9767dd1b3
- Loading branch information
wawax
committed
Dec 10, 2014
0 parents
commit 5e3e22e
Showing
113 changed files
with
30,393 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
/* | ||
* @version $Id$ | ||
LICENSE | ||
This file is part of the order plugin. | ||
Order plugin 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 2 of the License, or | ||
(at your option) any later version. | ||
Order plugin 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 GLPI; along with Order. If not, see <http://www.gnu.org/licenses/>. | ||
-------------------------------------------------------------------------- | ||
@package order | ||
@author the order plugin team | ||
@copyright Copyright (c) 2010-2011 Order plugin team | ||
@license GPLv2+ | ||
http://www.gnu.org/licenses/gpl.txt | ||
@link https://forge.indepnet.net/projects/order | ||
@link http://www.glpi-project.org/ | ||
@since 2009 | ||
---------------------------------------------------------------------- */ | ||
|
||
include ("../../../inc/includes.php"); | ||
header("Content-Type: text/html; charset=UTF-8"); | ||
Html::header_nocache(); | ||
|
||
if (!defined('GLPI_ROOT')) { | ||
die("Can not acces directly to this file"); | ||
} | ||
|
||
if (isset($_POST["action"])) { | ||
switch($_POST["action"]) { | ||
case "bill": | ||
echo " <input type='hidden' name='plugin_order_orders_id' " . | ||
" value='".$_POST["plugin_order_orders_id"]."'>"; | ||
PluginOrderBill::Dropdown(array('condition' => | ||
"`plugin_order_orders_id`='".$_POST['plugin_order_orders_id']."'")); | ||
break; | ||
} | ||
|
||
PluginOrderBillState::Dropdown(array('comments' => true)); | ||
echo" <input type='submit' name='action' class='submit' " . | ||
" value='"._sx('button', 'Post')."'>"; | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
/* | ||
* @version $Id: bill.tabs.php 530 2011-06-30 11:30:17Z walid $ | ||
LICENSE | ||
This file is part of the order plugin. | ||
Order plugin 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 2 of the License, or | ||
(at your option) any later version. | ||
Order plugin 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 GLPI; along with Order. If not, see <http://www.gnu.org/licenses/>. | ||
-------------------------------------------------------------------------- | ||
@package order | ||
@author the order plugin team | ||
@copyright Copyright (c) 2010-2011 Order plugin team | ||
@license GPLv2+ | ||
http://www.gnu.org/licenses/gpl.txt | ||
@link https://forge.indepnet.net/projects/order | ||
@link http://www.glpi-project.org/ | ||
@since 2009 | ||
---------------------------------------------------------------------- */ | ||
|
||
include ("../../../inc/includes.php"); | ||
header("Content-Type: text/html; charset=UTF-8"); | ||
Html::header_nocache(); | ||
|
||
if (!defined('GLPI_ROOT')){ | ||
die("Can not acces directly to this file"); | ||
} | ||
|
||
Session::checkCentralAccess(); | ||
|
||
$rand = $_POST["rand"]; | ||
$paramsaction = array('plugin_order_references_id' => '__VALUE__', | ||
'entity_restrict' => $_POST["entity_restrict"], | ||
'suppliers_id' => $_POST["suppliers_id"], | ||
'itemtype' => $_POST['itemtype']); | ||
$fields = array ("quantity", "priceht", "pricediscounted", "taxe", "validate"); | ||
|
||
foreach ($fields as $field) { | ||
$paramsaction['update'] = $field; | ||
Ajax::updateItem("show_$field", $CFG_GLPI["root_doc"]."/plugins/order/ajax/referencedetail.php", | ||
$paramsaction, "dropdown_reference$rand"); | ||
Ajax::updateItemOnSelectEvent("dropdown_reference$rand", "show_$field", | ||
$CFG_GLPI["root_doc"]."/plugins/order/ajax/referencedetail.php", | ||
$paramsaction); | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
/* | ||
* @version $Id: bill.tabs.php 530 2011-06-30 11:30:17Z walid $ | ||
LICENSE | ||
This file is part of the order plugin. | ||
Order plugin 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 2 of the License, or | ||
(at your option) any later version. | ||
Order plugin 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 GLPI; along with Order. If not, see <http://www.gnu.org/licenses/>. | ||
-------------------------------------------------------------------------- | ||
@package order | ||
@author the order plugin team | ||
@copyright Copyright (c) 2010-2011 Order plugin team | ||
@license GPLv2+ | ||
http://www.gnu.org/licenses/gpl.txt | ||
@link https://forge.indepnet.net/projects/order | ||
@link http://www.glpi-project.org/ | ||
@since 2009 | ||
---------------------------------------------------------------------- */ | ||
|
||
include ("../../../inc/includes.php"); | ||
header("Content-Type: text/html; charset=UTF-8"); | ||
Html::header_nocache(); | ||
|
||
if (!defined('GLPI_ROOT')){ | ||
die("Can not acces directly to this file"); | ||
} | ||
|
||
Session::checkCentralAccess(); | ||
|
||
$params = array('itemtype' => $_POST['itemtype'], | ||
'orders_id' => $_POST['orders_id'], | ||
'suppliers_id' => $_POST['suppliers_id'], | ||
'entity' => $_POST['entity_restrict'], | ||
'span' => $_POST['span'], | ||
'action' => $CFG_GLPI["root_doc"]."/plugins/order/ajax/detail.php", | ||
'condition' => ''); | ||
$ref = new PluginOrderReference(); | ||
$ref->dropdownReferencesByEnterprise("PluginOrderReference",$params); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<?php | ||
/* | ||
* @version $Id: bill.tabs.php 530 2011-06-30 11:30:17Z walid $ | ||
LICENSE | ||
This file is part of the order plugin. | ||
Order plugin 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 2 of the License, or | ||
(at your option) any later version. | ||
Order plugin 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 GLPI; along with Order. If not, see <http://www.gnu.org/licenses/>. | ||
-------------------------------------------------------------------------- | ||
@package order | ||
@author the order plugin team | ||
@copyright Copyright (c) 2010-2011 Order plugin team | ||
@license GPLv2+ | ||
http://www.gnu.org/licenses/gpl.txt | ||
@link https://forge.indepnet.net/projects/order | ||
@link http://www.glpi-project.org/ | ||
@since 2009 | ||
---------------------------------------------------------------------- */ | ||
|
||
if (strpos($_SERVER['PHP_SELF'],"dropdownContact.php")) { | ||
include ("../../../inc/includes.php"); | ||
header("Content-Type: text/html; charset=UTF-8"); | ||
Html::header_nocache(); | ||
} | ||
if (!defined('GLPI_ROOT')) { | ||
die("Can not acces directly to this file"); | ||
} | ||
|
||
Session::checkCentralAccess(); | ||
|
||
// Make a select box with all glpi users | ||
$where=" WHERE `glpi_contacts_suppliers`.`contacts_id` = `glpi_contacts`.`id` " . | ||
" AND (`glpi_contacts_suppliers`.`suppliers_id` = '".$_POST['suppliers_id']."' " . | ||
" AND `glpi_contacts`.`is_deleted` = '0' ) "; | ||
|
||
|
||
if (isset($_POST["entity_restrict"])) { | ||
if (!is_numeric($_POST["entity_restrict"]) && !is_array($_POST["entity_restrict"])) { | ||
$_POST["entity_restrict"] = unserialize(Toolbox::stripslashes_deep($_POST["entity_restrict"])); | ||
} | ||
$where.=getEntitiesRestrictRequest("AND","glpi_contacts",'',$_POST["entity_restrict"],true); | ||
} else { | ||
$where.=getEntitiesRestrictRequest("AND","glpi_contacts",'','',true); | ||
} | ||
|
||
if ($_POST['searchText']!=$CFG_GLPI["ajax_wildcard"]) | ||
$where.=" AND `glpi_contacts`.`name` ".makeTextSearch($_POST['searchText']); | ||
|
||
$NBMAX=$CFG_GLPI["dropdown_max"]; | ||
$LIMIT="LIMIT 0,$NBMAX"; | ||
if ($_POST['searchText']==$CFG_GLPI["ajax_wildcard"]) $LIMIT=""; | ||
|
||
|
||
$query = "SELECT `glpi_contacts`.* | ||
FROM `glpi_contacts`,`glpi_contacts_suppliers` | ||
$where | ||
ORDER BY `entities_id`, `name` $LIMIT"; | ||
//error_log($query); | ||
$result = $DB->query($query); | ||
|
||
echo "<select name=\"contacts_id\">"; | ||
|
||
echo "<option value=\"0\">".Dropdown::EMPTY_VALUE."</option>"; | ||
|
||
if ($DB->numrows($result)) { | ||
$prev=-1; | ||
while ($data=$DB->fetch_array($result)) { | ||
if ($data["entities_id"]!=$prev) { | ||
if ($prev>=0) { | ||
echo "</optgroup>"; | ||
} | ||
$prev=$data["entities_id"]; | ||
echo "<optgroup label=\"". Dropdown::getDropdownName("glpi_entities", $prev) ."\">"; | ||
} | ||
$output=formatUserName($data["id"],"",$data["name"],$data["firstname"]); | ||
if($_SESSION["glpiis_ids_visible"]||empty($output)){ | ||
$output.=" (".$data["id"].")"; | ||
} | ||
echo "<option value=\"".$data["id"]."\" title=\"$output\">". | ||
substr($output,0,$CFG_GLPI["dropdown_chars_limit"])."</option>"; | ||
} | ||
if ($prev>=0) { | ||
echo "</optgroup>"; | ||
} | ||
} | ||
|
||
echo "</select>"; | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?php | ||
/* | ||
* @version $Id: bill.tabs.php 530 2011-06-30 11:30:17Z walid $ | ||
LICENSE | ||
This file is part of the order plugin. | ||
Order plugin 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 2 of the License, or | ||
(at your option) any later version. | ||
Order plugin 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 GLPI; along with Order. If not, see <http://www.gnu.org/licenses/>. | ||
-------------------------------------------------------------------------- | ||
@package order | ||
@author the order plugin team | ||
@copyright Copyright (c) 2010-2011 Order plugin team | ||
@license GPLv2+ | ||
http://www.gnu.org/licenses/gpl.txt | ||
@link https://forge.indepnet.net/projects/order | ||
@link http://www.glpi-project.org/ | ||
@since 2009 | ||
---------------------------------------------------------------------- */ | ||
|
||
if (strpos($_SERVER['PHP_SELF'],"dropdownSupplier.php")) { | ||
include ("../../../inc/includes.php"); | ||
header("Content-Type: text/html; charset=UTF-8"); | ||
Html::header_nocache(); | ||
} | ||
|
||
Session::checkCentralAccess(); | ||
|
||
// Make a select box | ||
|
||
if (isset($_POST["suppliers_id"])) { | ||
|
||
$rand=$_POST['rand']; | ||
|
||
$use_ajax=false; | ||
if ($CFG_GLPI["use_ajax"] && | ||
countElementsInTable('glpi_suppliers', | ||
"`glpi_suppliers`.`id` = '".$_POST["suppliers_id"]."' ". | ||
getEntitiesRestrictRequest("AND", "glpi_suppliers","", | ||
$_POST["entity_restrict"],true)) > | ||
$CFG_GLPI["ajax_limit_count"]){ | ||
$use_ajax = true; | ||
} | ||
|
||
$paramssuppliers_id=array('searchText' => '__VALUE__', | ||
'suppliers_id' => $_POST["suppliers_id"], | ||
'entity_restrict'=> $_POST["entity_restrict"], | ||
'rand' => $_POST['rand'], | ||
'myname' => $_POST['myname']); | ||
|
||
$default="<select name='".$_POST["myname"]."'><option value='0'>".Dropdown::EMPTY_VALUE. | ||
"</option></select>"; | ||
Ajax::Dropdown($use_ajax,"/plugins/order/ajax/dropdownContact.php", $paramssuppliers_id, $default, | ||
$rand); | ||
|
||
} | ||
|
||
?> |
Oops, something went wrong.