Esempio n. 1
0
 @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();
if ($_POST["plugin_order_references_id"] > 0) {
    $reference_supplier = new PluginOrderReference_Supplier();
    $price = $reference_supplier->getPriceByReferenceAndSupplier($_POST["plugin_order_references_id"], $_POST["suppliers_id"]);
    switch ($_POST["update"]) {
        case 'quantity':
            echo "<input type='text' name='quantity' size='5'>";
            break;
        case 'priceht':
            echo "<input type='text' name='price' value=\"" . Html::formatNumber($price, true) . "\" size='5'>";
            break;
        case 'pricediscounted':
            echo "<input type='text' name='discount' size='5' value='0'>";
            break;
        case 'taxe':
            $config = PluginOrderConfig::getConfig();
            PluginOrderOrderTax::Dropdown(array('name' => "plugin_order_ordertaxes_id", 'value' => $config->getDefaultTaxes(), 'display_emptychoice' => true, 'emptylabel' => __("No VAT", "order")));
            break;
        case 'validate':