Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2018-03-11 18:35:01 +01:00
commit 6709b0934b
3 changed files with 12 additions and 15 deletions

View File

@ -1,7 +1,6 @@
<?php
/* Ticket incident/support management
* Copyright (C) 2013-2016 Jean-François FERRY <hello@librethic.io>
* 2016 Christophe Battarel <christophe@altairis.fr>
/* Copyright (C) 2013-2016 Jean-François FERRY <hello@librethic.io>
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
*
* 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";

View File

@ -11,6 +11,7 @@
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* 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);

View File

@ -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;