From 9f7496ce04b0ec565889f8bf0782e0e3e5980018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 5 Feb 2018 17:47:29 +0100 Subject: [PATCH 1/3] Update price.php --- htdocs/product/price.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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); From 741d69fabeeedc0cb35a1996456da9d7741d33b9 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 11 Mar 2018 18:20:42 +0100 Subject: [PATCH 2/3] Fix: dolibarrize --- htdocs/admin/ticketsup.php | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) 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"; From d77bde47210195fc7d88c40be863f662c15a5215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 11 Mar 2018 18:25:22 +0100 Subject: [PATCH 3/3] Update ticketsup.class.php --- htdocs/ticketsup/class/ticketsup.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/ticketsup/class/ticketsup.class.php b/htdocs/ticketsup/class/ticketsup.class.php index 33bd82c38e6..5ceb9ed75a2 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;