diff --git a/htdocs/admin/ticketsup.php b/htdocs/admin/ticketsup.php index 529d64abf9c..9c587ea8264 100644 --- a/htdocs/admin/ticketsup.php +++ b/htdocs/admin/ticketsup.php @@ -1,7 +1,6 @@ - * 2016 Christophe Battarel +/* Copyright (C) 2013-2016 Jean-François FERRY + * Copyright (C) 2016 Christophe Battarel * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,17 +21,8 @@ * \ingroup ticketsup * \brief This file is a module setup page */ -// Dolibarr environment -$res = ''; -if (file_exists("../../main.inc.php")) { - $res = include "../../main.inc.php"; // From htdocs directory -} elseif (!$res && file_exists("../../../main.inc.php")) { - $res = include "../../../main.inc.php"; // From "custom" directory -} else { - die("Include of main fails"); -} -// Libraries +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT . "/core/lib/admin.lib.php"; require_once DOL_DOCUMENT_ROOT."/ticketsup/class/ticketsup.class.php"; require_once DOL_DOCUMENT_ROOT."/core/lib/ticketsup.lib.php"; diff --git a/htdocs/product/price.php b/htdocs/product/price.php index a2afb5f9bb8..61b6316ca01 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -11,6 +11,7 @@ * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2015 Marcos García * Copyright (C) 2016 Ferran Marcet + * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1439,7 +1440,12 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_ // Il doit au moins y avoir la ligne de prix initial. // On l'ajoute donc pour remettre a niveau (pb vieilles versions) - $object->updatePrice($object->price, $object->price_base_type, $user, $newprice_min); + //$object->updatePrice($object->price, $object->price_base_type, $user, $newprice_min); + if (! empty($conf->global->PRODUIT_MULTIPRICES)) { + $object->updatePrice($object->multiprices[1], $object->multiprices_base_type[1], $user, $object->multiprices_tva_tx[1], $object->multiprices_min[1], 1); + } else { + $object->updatePrice($object->price, $object->price_base_type, $user, $object->tva_tx, $object->price_min); + } $result = $db->query($sql); $num = $db->num_rows($result); diff --git a/htdocs/ticketsup/class/ticketsup.class.php b/htdocs/ticketsup/class/ticketsup.class.php index 5aaa3867b86..e507e2e89a7 100644 --- a/htdocs/ticketsup/class/ticketsup.class.php +++ b/htdocs/ticketsup/class/ticketsup.class.php @@ -2246,9 +2246,10 @@ class Ticketsup extends CommonObject * @param int $statut Status of lines to get (-1=all) * @param string $source Source of contact: external or thirdparty (llx_socpeople) or internal (llx_user) * @param int $list 0:Return array contains all properties, 1:Return array contains just id + * @param string $code Filter on this code of contact type ('SHIPPING', 'BILLING', ...) * @return array Array of contacts */ - function liste_contact($statut = -1, $source = 'external', $list = 0) + function liste_contact($statut = -1, $source = 'external', $list = 0, $code = '') { global $langs;